注意:我已在emscripten github issue #5215添加了评论,但尚未收到回复。
我在运行使用emsdk-portable.tar.gz
安装和配置的emscripten版本时尝试使用emcc时遇到问题。我按照这里的说明进行操作:
我在根据指示解压缩到的根文件夹中使用了这些命令:
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
完成此操作后,文件/home/pete/.emscripten
如下所示:
import os
LLVM_ROOT='/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit'
EMSCRIPTEN_NATIVE_OPTIMIZER='/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/optimizer'
BINARYEN_ROOT='/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/binaryen'
NODE_JS='/home/pete/Programming/Emscripten/emsdk-portable/node/4.1.1_64bit/bin/node'
EMSCRIPTEN_ROOT='/home/pete/Programming/Emscripten/emsdk-portable/emscripten/1.37.22'
SPIDERMONKEY_ENGINE = ''
V8_ENGINE = ''
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
检查./emcc的版本时,我得到了这个输出:
pete@PetesUbu:~/Programming/Emscripten/emsdk-portable/emscripten/1.37.22$ ./emcc -v
INFO:root:generating system asset: is_vanilla.txt... (this will be cached in "/home/pete/.emscripten_cache/is_vanilla.txt" for subsequent builds)
/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/llc: relocation error: /home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/llc: symbol _ZNKSt3_V214error_category10_M_messageB5cxx11Ei, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
INFO:root: - ok
WARNING:root:(Emscripten: unknown: cannot concatenate 'str' and 'NoneType' objects, clearing cache)
CRITICAL:root:Could not verify LLVM version: argument of type 'NoneType' is not iterable
/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/llc: relocation error: /home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/llc: symbol _ZNKSt3_V214error_category10_M_messageB5cxx11Ei, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
(no targets could be identified: need more than 1 value to unpack)
===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
CRITICAL:root:failing sanity checks due to previous fastcomp failure
第一个警告看起来与python有关,我注意到环境变量中没有设置python ...所以我把它添加到./emscripten看起来像这样:
import os
LLVM_ROOT='/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit'
EMSCRIPTEN_NATIVE_OPTIMIZER='/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/optimizer'
BINARYEN_ROOT='/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/binaryen'
NODE_JS='/home/pete/Programming/Emscripten/emsdk-portable/node/4.1.1_64bit/bin/node'
EMSCRIPTEN_ROOT='/home/pete/Programming/Emscripten/emsdk-portable/emscripten/1.37.22'
SPIDERMONKEY_ENGINE = ''
V8_ENGINE = ''
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
PYTHON = 'python'
'python'调用的python 2.7.x版本高于指令中建议的最小值...我不记得我的头顶,但我查了一下。
所以我再次打电话给./emcc版本,以获得此输出:
pete@PetesUbu:~/Programming/Emscripten/emsdk-portable/emscripten/1.37.22$ ./emcc -v
WARNING:root:(Emscripten: settings file has changed, clearing cache)
CRITICAL:root:Could not verify LLVM version: argument of type 'NoneType' is not iterable
/home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/llc: relocation error: /home/pete/Programming/Emscripten/emsdk-portable/clang/e1.37.22_64bit/llc: symbol _ZNKSt3_V214error_category10_M_messageB5cxx11Ei, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
(no targets could be identified: need more than 1 value to unpack)
===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
CRITICAL:root:failing sanity checks due to previous fastcomp failure
看起来好像我修复了python问题,但我不确定我的下一步是什么。任何人都有任何想法,我应该尝试或看下一步?