emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
2.97k stars 676 forks source link

couldn’t compile hello world on mac #281

Open isomorphisms opened 5 years ago

isomorphisms commented 5 years ago
isomorphismes@scheherezade ~/wasm.learn/0: emcc 0.c -s WASM=1 -o 0.html
cache:INFO: generating system asset: is_vanilla.txt... (this will be cached in "/Users/isomorphismes/.emscripten_cache/is_vanilla.txt" for subsequent builds)
cache:INFO:  - ok
shared:INFO: (Emscripten: Running sanity checks)
cache:INFO: generating system library: libdlmalloc.bc... (this will be cached in "/Users/isomorphismes/.emscripten_cache/asmjs/libdlmalloc.bc" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libpthreads_stub.bc... (this will be cached in "/Users/isomorphismes/.emscripten_cache/asmjs/libpthreads_stub.bc" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libc.bc... (this will be cached in "/Users/isomorphismes/.emscripten_cache/asmjs/libc.bc" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libcompiler_rt.a... (this will be cached in "/Users/isomorphismes/.emscripten_cache/asmjs/libcompiler_rt.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: libc-wasm.bc... (this will be cached in "/Users/isomorphismes/.emscripten_cache/asmjs/libc-wasm.bc" for subsequent builds)
cache:INFO:  - ok
Traceback (most recent call last):
  File "/opt/emsdk/fastcomp/emscripten/emcc.py", line 3420, in <module>
    sys.exit(run(sys.argv))
  File "/opt/emsdk/fastcomp/emscripten/emcc.py", line 1907, in run
    final = shared.Building.link(linker_inputs, DEFAULT_FINAL, force_archive_contents=force_archive_contents, just_calculate=just_calculate)
  File "/opt/emsdk/fastcomp/emscripten/tools/shared.py", line 1978, in link
    Building.read_link_inputs([x for x in files if not x.startswith('-')])
  File "/opt/emsdk/fastcomp/emscripten/tools/shared.py", line 1757, in read_link_inputs
    object_names_in_archives = pool.map(extract_archive_contents, archive_names)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 253, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 572, in get
    raise self._value
tools.shared.Py2CalledProcessError: Command '['/opt/emsdk/fastcomp/fastcomp/bin/llvm-ar', 'xo', '/Users/isomorphismes/.emscripten_cache/asmjs/libcompiler_rt.a']' returned non-zero exit status -11
kripken commented 5 years ago

The output with EMCC_DEBUG=1 in the environment may be more helpful to understand what's going on here (it will log a lot more information).