Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrapping failed on windows because of CRLF #22

Open
ThakeeNathees opened this issue Jun 4, 2022 · 0 comments
Open

Bootstrapping failed on windows because of CRLF #22

ThakeeNathees opened this issue Jun 4, 2022 · 0 comments

Comments

@ThakeeNathees
Copy link

I was trying to compile paka on windows with mingw and it failed with a message unknown ident: i (bellow is the full log). On windows git automatically replace LFs to CRLFs, and further investigating I found out that minivm read files in binary mode, but \r\n will only be read as \n in text mode.

mkdir -p bin
make -C minivm minivm
make[1]: Entering directory '/c/dev/repo/paka/minivm'
cc -Os vm/minivm.c -o minivm
make[1]: Leaving directory '/c/dev/repo/paka/minivm'
cp minivm/minivm bin/minivm
bin/minivm bins/boot.bc src/main.paka -o bin/stage1.bc
unknown ident: i
bin/minivm bin/stage1.bc src/main.paka -o bin/stage2.bc
cannot run vm: file to run could not be read
bin/minivm bin/stage2.bc src/main.paka -o bin/stage3.bc
cannot run vm: file to run could not be read

After changing the line ending of src/main.paka it worked just fine

mkdir -p bin
make -C minivm minivm
make[1]: Entering directory '/c/dev/repo/paka/minivm'
cc -Os vm/minivm.c -o minivm
make[1]: Leaving directory '/c/dev/repo/paka/minivm'
cp minivm/minivm bin/minivm
bin/minivm bins/boot.bc src/main.paka -o bin/stage1.bc
bin/minivm bin/stage1.bc src/main.paka -o bin/stage2.bc
bin/minivm bin/stage2.bc src/main.paka -o bin/stage3.bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant