seL4 / sel4test

Test suite for seL4.
http://sel4.systems
Other
25 stars 63 forks source link

seL4test/projects/musllibc/configure: not found #75

Closed wangzhankun closed 2 years ago

wangzhankun commented 2 years ago

I have successfully executed repo sync,and ../init-build.sh -DPLATFORM=x86_64 -DSIMULATION=TRUE executed successfully. But when I do ninja, I get the following error:

[15/263] Invoking muslc build system
FAILED: apps/sel4test-driver/musllibc/build-temp/stage/lib/libc.a
cd /home/wang/Documents/sel4/seL4test/build-x86/apps/sel4test-driver/musllibc && rm -r build-temp && mkdir -p build-temp && /usr/bin/cmake -E env TOOLPREFIX= C_COMPILER=/usr/bin/gcc MAKEFLAGS="${MAKEFLAGS:--s}" NK_CFLAGS="-nostdinc -fno-pic -fno-pie -fno-stack-protector -fno-asynchronous-unwind-tables -ftls-model=local-exec -mtls-direct-seg-refs -m64 -D__KERNEL_64__ -march=nehalem " TARGET=x86_64 make -C build-temp -j18 -f /home/wang/Documents/sel4/seL4test/projects/musllibc/Makefile STAGE_DIR=/home/wang/Documents/sel4/seL4test/build-x86/apps/sel4test-driver/musllibc/build-temp/stage SOURCE_DIR=/home/wang/Documents/sel4/seL4test/projects/musllibc && mkdir -p /home/wang/Documents/sel4/seL4test/.sel4_cache/musllibc/1d8a33c8cb8209203aed9a0a99fb54c9 && tar -zcf code.tar.gz -C /home/wang/Documents/sel4/seL4test/build-x86/apps/sel4test-driver/musllibc/build-temp/stage . && mv code.tar.gz /home/wang/Documents/sel4/seL4test/.sel4_cache/musllibc/1d8a33c8cb8209203aed9a0a99fb54c9/
/bin/sh: 2: /home/wang/Documents/sel4/seL4test/projects/musllibc/configure: not found
sed: can't read config.mak: No such file or directory
Please set ARCH in config.mak before running make.
make[1]: *** [Makefile.muslc:83: all] Error 1
make: *** [/home/wang/Documents/sel4/seL4test/projects/musllibc/Makefile:73: build_muslc] Error 2
[23/263] Generate syscall invocations
ninja: build stopped: subcommand failed.

I try to only execute the sh command independently, and I get the error:

cmake -E env TOOLPREFIX= C_COMPILER=/usr/bin/gcc MAKEFLAGS="${MAKEFLAGS:--s}" NK_CFLAGS="-nostdinc -fno-pic -fno-pie -fno-stack-protector -fno-asynchronous-unwind-tables -ftls-model=local-exec -mtls-direct-seg-refs -m64 -D__KERNEL_64__ -march=nehalem " TARGET=x86_64 make -C build-temp -j18 -f /home/wang/Documents/sel4/seL4test/projects/musllibc/Makefile STAGE_DIR=/home/wang/Documents/sel4/seL4test/build-x86/apps/sel4test-driver/musllibc/build-temp/stage SOURCE_DIR=/home/wang/Documents/sel4/seL4test/projects/musllibc
/bin/sh: 2: /home/wang/Documents/sel4/seL4test/projects/musllibc/configure: not found
sed: can't read config.mak: No such file or directory
Please set ARCH in config.mak before running make.
make[1]: *** [Makefile.muslc:83: all] Error 1
make: *** [/home/wang/Documents/sel4/seL4test/projects/musllibc/Makefile:73: build_muslc] Error 2
Ivan-Velickovic commented 2 years ago

Some questions: Does the configure file in the path /home/wang/Documents/sel4/seL4test/projects/musllibc/configure exist? What does repo manifest output? What system are you running on?

wangzhankun commented 2 years ago

Yes, I find the error. Because after I clone the repo, the configure file is changed into CR mode. After I chang it into CRLF mode, it's all right.

Another question is why the file is changed into CR mode? I have to write a code to walk through all the files and change the '\r' into '\r\n'.

Here is my gitconfig:

[core]
        autocrlf = true
        filemode = false
[color]
        ui = auto
[url "https://githubcn.hgnet.workers.dev/google/boringssl.git"]
        insteadOf = https://boringssl.googlesource.com/boringssl
[url "https://ghp.quickso.cn/https://github.com"]
        insteadof = https://github.com
lsf37 commented 2 years ago

So what system are you running on?

\r sounds very strange. It should be all \n. \r\n would be Windows which is not supported as build host (you might be able to get it working, but we have not tried).

wangzhankun commented 2 years ago

I'm running on WSL2-ubuntu20.04. I use this command to change the \r.

sed -i 's/\r$//' $1
Smattr commented 2 years ago

This is what happens when you clone/checkout on Windows and then switch into WSL. If you want to avoid this, either do the clone/checkout under WSL to begin with or use core.autocrlf=false when checking out or cloning under Windows.

Ivan-Velickovic commented 2 years ago

@wangzhankun does using the repo tool in WSL work for you? I can confirm that seL4test works for me in Ubuntu 20.04 running in WSL2, if I run all the commands inside WSL.

lsf37 commented 2 years ago

@wangzhankun does using the repo tool in WSL work for you? I can confirm that seL4test works for me in Ubuntu 20.04 running in WSL2, if I run all the commands inside WSL.

Ooh, that would be very nice to document on the host deps page!

wangzhankun commented 2 years ago

I clone the repo under WSL not on windows. And the repo tool works well on WSL.

Ivan-Velickovic commented 2 years ago

Since a solution has been found, we can close this.