Open jedisct1 opened 1 year ago
I face similar issue as you did. It took me quite a while to build the wasix sysroot. I believe the build instruction need to be updated. Here is what I found.
First, there is not need to run build32.sh and build64.sh. What these script did (except the final make step, because /sysroot is in the .gitignore file) is already reflect in the current commit of the repo.
Second I found some issues in the Makefile, as the output suggest
find: ‘libc-bottom-half/getpid’: No such file or directory
find: ‘build/-wasi’: No such file or directory
The first line is complaining about not finding getpid.c
which is not in /libc-bottom-half
but inside /libc-bottom-half/sources
Correcting the Makefile get me through this part.
The second line is caused by missing environment variables.
# or wasm64
export TARGET_ARCH=wasm32
export TARGET_OS=wasix
Finally, I use wasi-sdk to build the sysroot
CC=${WASI_SDK_PATH}/bin/clang AR=${WASI_SDK_PATH}/bin/llvm-ar NM=${WASI_SDK_PATH}/bin/llvm-nm make -j $NUM_OF_CPUS
# or wasm64 export TARGET_ARCH=wasm32 export TARGET_OS=wasix
Finally, I use wasi-sdk to build the sysroot
CC=${WASI_SDK_PATH}/bin/clang AR=${WASI_SDK_PATH}/bin/llvm-ar NM=${WASI_SDK_PATH}/bin/llvm-nm make -j $NUM_OF_CPUS
Worked!!!!
I tried to build
wasix-libc
as documented:But that fails with:
The
build32.sh
script fails on macOS due to GNUisms. On Linux, it successfully completes. But then, thesysroot
folder contains headers, butlib/wasm32-wasi
folder is empty.How to build
wasix-libc
?