Skip to content

Bootstrapping failed on windows because of CRLF #22

@ThakeeNathees

Description

@ThakeeNathees

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions