问题
Having trouble with the emsdk under Debian Jessie on an ODROID SBC. When I enter "emsdk list", it shows node is indeed installed:
node-4.1.1-32bit node-4.1.1-64bit * node-8.9.1-32bit INSTALLED node-8.9.1-64bit
Yet when I enter emcc -v to check for warnings, I get:
INFO:root:Checking JS engine ['/home/jackalope/emsdk/node/8.9.1_32bit/bin/node'] failed. Check your config file. Details: [Errno 8] Exec format error WARNING:root:cannot check node version: [Errno 8] Exec format error INFO:root:(Emscripten: Running sanity checks) CRITICAL:root:The JavaScript shell used for compiling (['/home/jackalope/emsdk/node/8.9.1_32bit/bin/node']) does not seem to work, check the paths in /home/jackalope/.emscripten
It looks like there's a binary file called "node" in the location it checks, but for some reason it is expecting a different format. I'm looking at the .emscripten file mentioned, but not sure what the path should be. It is as follows:
import os
LLVM_ROOT='/home/jackalope/emsdk/clang/tag-e1.37.36/build_tag-e1.37.36_32/bin'
NODE_JS='/home/jackalope/emsdk/node/8.9.1_32bit/bin/node'
EMSCRIPTEN_ROOT='/home/jackalope/emsdk/emscripten/tag-1.37.36'
EMSCRIPTEN_NATIVE_OPTIMIZER='/home/jackalope/emsdk/emscripten/tag-1.37.36_32bit_optimizer/optimizer'
SPIDERMONKEY_ENGINE = ''
V8_ENGINE = ''
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
回答1:
Ok, I believe I found the problem: I needed to edit the .emscripten file and change
NODE_JS='/home/jackalope/emsdk/node/8.9.1_32bit/bin/node'
to
NODE_JS='node'
来源:https://stackoverflow.com/questions/49483622/how-do-i-tell-the-emscripten-sdk-where-to-find-node