我正在尝试让 EMScripten 工作。我非常有信心我已经按照教程进行操作,并确保安装了提到的依赖项。
在尝试构建示例项目时,它会像这样失败;
tv@apu:~/git/emscripten$ EMCC_DEBUG=1 ./emcc tests/hello_world.c
emcc invocation: ./emcc tests/hello_world.c
emcc: compiling to bitcode
emcc: compiling source file: tests/hello_world.c
emcc running: /usr/bin/clang -m32 -U__i386__ -U__x86_64__ -U__i386 -U__x86_64 -U__SSE__ -U__SSE2__ -U__MMX__ -UX87_DOUBLE_ROUNDING -UHAVE_GCC_ASM_FOR_X87 -DEMSCRIPTEN -U__STRICT_ANSI__ -U__CYGWIN__ -D__STDC__ -Xclang -triple=i386-pc-linux-gnu -nostdinc -nostdinc++ -Xclang -nobuiltininc -Xclang -nostdinc++ -Xclang -nostdsysteminc -Xclang -isystem/home/tv/git/emscripten/system/include -Xclang -isystem/home/tv/git/emscripten/system/include/bsd -Xclang -isystem/home/tv/git/emscripten/system/include/libc -Xclang -isystem/home/tv/git/emscripten/system/include/libcxx -Xclang -isystem/home/tv/git/emscripten/system/include/gfx -Xclang -isystem/home/tv/git/emscripten/system/include/net -Xclang -isystem/home/tv/git/emscripten/system/include/SDL -U__APPLE__ -emit-llvm -c tests/hello_world.c -o /tmp/tmpMvgQiE/hello_world_0.o
clang: warning: argument unused during compilation: '-nostdinc++'
emcc: will generate JavaScript
emcc: considering including libcxx: we need |[]| and have |[]|
emcc: considering including libcxxabi: we need |[]| and have |[]|
emcc: considering including dlmalloc: we need |[]| and have |[]|
emcc: saving intermediate processing steps to /tmp/emscripten_temp
emcc: LLVM dead globals elimination
Traceback (most recent call last):
File "./emcc", line 837, in <module>
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), ['-internalize', '-globaldce'])
File "/home/tv/git/emscripten/tools/shared.py", line 545, in llvm_opt
output = Popen([LLVM_OPT, filename] + opts + ['-o=' + filename + '.opt.bc'], stdout=PIPE).communicate()[0]
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
的内容~/.emscripten
:
tv@apu:~/git/emscripten$ cat ~/.emscripten | egrep -v '^#|^$'
EMSCRIPTEN_ROOT = os.path.expanduser('~/git/emscripten') # this helps projects using emscripten find it
LLVM_ROOT = os.path.expanduser('/usr/bin')
NODE_JS = 'node'
TEMP_DIR = '/tmp' # You will need to modify this on Windows
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
我不知道问题是什么 - 需要帮助进行故障排除。有没有人对这里可能出现的问题有任何想法?我错过了什么?