Code Monkey home page Code Monkey logo

Comments (8)

isotopp avatar isotopp commented on July 17, 2024

Ubuntu 20.04 in WSL2 on Windows, The ~/C/jo is local, not on the 9P bridge

kris@Kris-Yoga:~/C/jo$ df -Th .
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sdb       ext4  251G  6,4G  232G   3% /

from jo.

gromgit avatar gromgit commented on July 17, 2024

$'\r' is bash's character expansion for a carriage return character, so I'm betting that file (and maybe some others) were written with MS-DOS line endings (CR/LF) instead of Unix ones (LF).

I don't do Windows, so I don't have an environment to test it in, but I know for sure that all the source files were checked in with Unix line endings. Is there a setting in WSL2's Git Bash (or whatever you used to download the sources) that quietly "corrects" line endings in text files to Windows standard?

from jo.

jpmens avatar jpmens commented on July 17, 2024

./build-aux/tap-driver.sh: line 16: $'\r': command not found

line 16 is the first empty line in the file, and the other line numbers correspond to empty lines as well. I tend to also think something has extracted those *.sh with CRNL ...

Crazy idea: %s/^$/#/ ? :-)

from jo.

gromgit avatar gromgit commented on July 17, 2024

Unfortunately, I suspect the entire file has CR/LF line endings; see the line 30 set error for instance. Likely the entire source tree is similarly tainted, so the tests may fail regardless.

@isotopp, if you checked out the jo sources via git, what does git status under your jo source tree output?

from jo.

isotopp avatar isotopp commented on July 17, 2024

Hm, nothing weird shows:

kris@Kris-Yoga:~/C$ rm -rf jo
kris@Kris-Yoga:~/C$ git clone [email protected]:jpmens/jo.git
Cloning into 'jo'...
remote: Enumerating objects: 985, done.
remote: Counting objects: 100% (155/155), done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 985 (delta 78), reused 99 (delta 40), pack-reused 830
Receiving objects: 100% (985/985), 289.94 KiB | 4.75 MiB/s, done.
Resolving deltas: 100% (544/544), done.
kris@Kris-Yoga:~/C$ cd jo
kris@Kris-Yoga:~/C/jo$ autoreconf -i
configure.ac:7: installing 'build-aux/compile'
configure.ac:32: installing 'build-aux/install-sh'
configure.ac:32: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
kris@Kris-Yoga:~/C/jo$ ./configure > /dev/null
configure: WARNING: pandoc not found, man pages rebuild will not be possible
kris@Kris-Yoga:~/C/jo$ make
  CC       jo.o
  CC       json.o
  CC       base64.o
  CCLD     jo
kris@Kris-Yoga:~/C/jo$ make check
make  check-TESTS
make[1]: Entering directory '/home/kris/C/jo'
make[2]: Entering directory '/home/kris/C/jo'
./build-aux/tap-driver.sh: line 16: $'\r': command not found
./build-aux/tap-driver.sh: line 21: $'\r': command not found
./build-aux/tap-driver.sh: line 25: $'\r': command not found
./build-aux/tap-driver.sh: line 27: $'\r': command not found
: invalid optiondriver.sh: line 30: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
./build-aux/tap-driver.sh: line 31: $'\r': command not found
./build-aux/tap-driver.sh: line 33: $'\r': command not found
./build-aux/tap-driver.sh: line 34: syntax error near unexpected token `$'\r''
'/build-aux/tap-driver.sh: line 34: `fatal ()
make[2]: *** [Makefile:936: tests/jo.log] Error 2
make[2]: Leaving directory '/home/kris/C/jo'
make[1]: *** [Makefile:918: check-TESTS] Error 2
make[1]: Leaving directory '/home/kris/C/jo'
make: *** [Makefile:1120: check-am] Error 2

from jo.

isotopp avatar isotopp commented on July 17, 2024

Aaargh.

kris@Kris-Yoga:~/C/jo$ git config  --global --get-regexp '.'
user.email [email protected]
user.name Kristian Koehntopp
core.excludesfile /home/kris/win/.gitignore
core.autocrlf true

That's set so that the Linux- and Windows-Side of the machine can both git the files. If not set, bad things happen with everything else.

kris@Kris-Yoga:~/C/jo$ git config --local core.autocrlf false
kris@Kris-Yoga:~/C/jo$ git config --get-regexp '.'
user.email [email protected]
user.name Kristian Koehntopp
core.excludesfile /home/kris/win/.gitignore
core.autocrlf true
core.repositoryformatversion 0
core.filemode true
core.bare false
core.logallrefupdates true
core.autocrlf false
remote.origin.url [email protected]:jpmens/jo.git
remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
branch.master.remote origin
branch.master.merge refs/heads/master

and

kris@Kris-Yoga:~/C/jo$ git reset --hard
HEAD is now at eefaf71 change URL again         addresses #174
kris@Kris-Yoga:~/C/jo$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
kris@Kris-Yoga:~/C/jo$ autoreconf -i
configure.ac:7: installing 'build-aux/compile'
configure.ac:32: installing 'build-aux/install-sh'
configure.ac:32: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
kris@Kris-Yoga:~/C/jo$ ./configure > /dev/null
configure: WARNING: pandoc not found, man pages rebuild will not be possible
kris@Kris-Yoga:~/C/jo$ make
  CC       jo.o
  CC       json.o
  CC       base64.o
  CCLD     jo
kris@Kris-Yoga:~/C/jo$ make check
make  check-TESTS
make[1]: Entering directory '/home/kris/C/jo'
make[2]: Entering directory '/home/kris/C/jo'
PASS: tests/jo.test 1 -  basic logo
PASS: tests/jo.test 2 -  basic logo (stdin)
PASS: tests/jo.test 3 -  basic two values
PASS: tests/jo.test 4 -  nested with executable
PASS: tests/jo.test 5 -  nested native
...

Ok, so something in that test script thingie is incredibly sensitive to line endings.

from jo.

isotopp avatar isotopp commented on July 17, 2024

Meh. No Jetbrains CLion for you, then.

from jo.

gromgit avatar gromgit commented on July 17, 2024

Ok, so something in that test script thingie is incredibly sensitive to line endings.

bash (being a Unix shell) is sensitive to line endings. I'm actually surprised Microsoft didn't patch bash to use Windows line-endings; perhaps they found that it would break too many other WSL utilties.

from jo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.