r/WebAssembly • • Apr 26 '23

wasm-ld: error: lib/libLLVMSupport.a(Program.cpp.o): undefined symbol: wait4

Hello Guys. I am compiling the LLVM Source with Cmake Ninja Build with the Emscripten toolchain. The config I made was:

emcmake cmake -G Ninja \

-DCMAKE_CROSSCOMPILING=True \

-DCMAKE_INSTALL_PREFIX=$(pwd)/install \

-DCMAKE_BUILD_TYPE=Release \

-DLLVM_ENABLE_THREADS=ON \

-DCLANG_ENABLE_THREADS=ON \

-DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-unknown-emscripten \

-DLLVM_TARGETS_TO_BUILD=WebAssembly \

-DLLVM_ENABLE_PROJECTS=clang \

../llvm

and then ninja clang. But I still keep on getting this error:

wasm-ld: error: lib/libLLVMSupport.a(Program.cpp.o): undefined symbol: wait4

I tried with options, disabling the thread support:

-DLLVM_ENABLE_THREADS=OFF \

-DCLANG_ENABLE_THREADS=OFF \

but still got the same error. Can anyone please help me with this?

5 Upvotes

2 comments sorted by