Comments (8)
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.
$'\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.
./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.
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.
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.
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.
Meh. No Jetbrains CLion for you, then.
from jo.
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)
- RFE: Do not split quoted keys with -d HOT 2
- Gaps in variable HOT 2
- Delete nested element HOT 5
- Assertion `utf8_validate(str)' failed - again? HOT 9
- Generating JSON and including JSON output from another program appears to result in double encoded JSON? HOT 3
- Suberflous `\` if try to escape `}` in value HOT 8
- feature allow string vals with spaces deep nested HOT 1
- Question: how to produce multiline strings? HOT 2
- UTF-8 crash - `Assertion failed: (utf8_validate(str))` HOT 5
- Passing an empty file with `@` syntax now throws an error on 1.7 HOT 5
- FAIL: tests/jo.test 20 - read json array elements HOT 7
- 1.9 build for Windows missing HOT 1
- jo will drop the trailing newline at the end of file HOT 8
- Dynamic array of nested oneofs HOT 1
- Disable type coercion HOT 6
- possible bug: use of `-a` on outer command in nested jo fails to render inside object element when space exists in internal object property value HOT 2
- Modifications to GPLv2 license make jo difficult to adopt in enterprise environment HOT 2
- Please support empty array HOT 1
- pass multiple variables to jo? HOT 3
- jo extends fractional part of some floats HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jo.