emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
3.04k stars 694 forks source link

32-bit emcc fails to work in Linux #217

Open mcandre opened 5 years ago

mcandre commented 5 years ago

Hi, I am able to build 64-bit WASM artifacts with emcc in Debian Buster. However, when I install and activate the 32-bit edition, then emcc fails:

$ . /emsdk/emsdk_env.sh && emcc -s WASM=1 -o bin/hello.wasm hello.c
Adding directories to PATH:
PATH += /emsdk
PATH += /emsdk/clang/fastcomp/build_incoming_32/bin
PATH += /emsdk/node/8.9.1_32bit/bin
PATH += /emsdk/emscripten/incoming
PATH += /emsdk/binaryen/master_32bit_binaryen/bin

Setting environment variables:
EMSDK = /emsdk
EM_CONFIG = /root/.emscripten
LLVM_ROOT = /emsdk/clang/fastcomp/build_incoming_32/bin
EMSDK_NODE = /emsdk/node/8.9.1_32bit/bin/node
EMSCRIPTEN = /emsdk/emscripten/incoming
EMSCRIPTEN_NATIVE_OPTIMIZER = /emsdk/emscripten/incoming_32bit_optimizer/optimizer
BINARYEN_ROOT = /emsdk/binaryen/master_32bit_binaryen

emscripten:INFO: generating system asset: is_vanilla.txt... (this will be cached in "/root/.emscripten_cache/is_vanilla.txt" for subsequent builds)
emscripten:INFO:  - ok
root:INFO: Checking JS engine ['/emsdk/node/8.9.1_32bit/bin/node'] failed. Check your config file. Details: Expected the command ['/emsdk/node/8.9.1_32bit/bin/node', '/emsdk/emscripten/incoming/src/hello_world.js'] to finish with return code 0, but it returned with code 255 instead! Output: 
root:CRITICAL: The JavaScript shell (['/emsdk/node/8.9.1_32bit/bin/node']) does not seem to work, check the paths in the config file
make: *** [test-wasm32] Error 1
kripken commented 5 years ago

I don't thikn the emsdk provides 32-bit builds anymore - we just have one linux builder, which is 64-bit.

kripken commented 5 years ago

If you built fastcomp yourself, then it could work. In that case maybe something's wrong with that node build - you can just edit the .emscripten file to point it to the system node.js (node LTS or later would work).

kripken commented 5 years ago

You can also do what the error message suggests, to run that command manually (after Expected the command in that output), and see if there's an error message.