emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
3.08k stars 701 forks source link

Why does emscripten always give "simd"? But I never used SIMD on Ubuntu 18.04 #171

Open ghost opened 6 years ago

ghost commented 6 years ago

Hello everyone,

I am really mad because it looks like emscripten ignores me. I am new for wasm for Webassembly.

I am disappointed because I can't get successful compilation.

Check What is that? But I don't have to install SIMD. Why do I need f***cking SIMD?

$ lime build emscripten -webassembly
Creating /home/sourceskyboxer/emsdk/Shading/Export/emscripten/obj/obj/emscripten-stat/__pch/haxe/hxcpp.h.gch...

Compiling group: haxe
emcc -Iinclude -c -fvisibility=hidden -O1 -fpic -fPIC -DEMSCRIPTEN -Wno-overflow -Wno-parentheses -Wno-unknown-warning-option -Wno-null-dereference -Wno-unused-value -Wno-format-extra-args -Wno-bool-conversion -Wno-warn-absolute-paths -DSTATIC_LINK(static) -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) -I/home/sourceskyboxer/haxelib/hxcpp/4,0,4/include ... tags=[haxe,static]
 - src/lime/utils/AssetCache.cpp  [haxe,release]
Clean: libApplicationMain.a
Link: libApplicationMain.a
Ranlib: libApplicationMain.a
emcc Export/emscripten/obj/Main.cpp -o Export/emscripten/obj/Main.o
emcc Main.o /home/sourceskyboxer/lime/ndll/Emscripten/liblime.a libApplicationMain.a -o ApplicationMain.o
emcc ApplicationMain.o -s WASM=1 -s NO_EXIT_RUNTIME=1 -s USE_SDL=2 -lpthread -lopenal --preload-file assets -o ../bin/Shading.js
Traceback (most recent call last):
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emcc.py", line 3062, in <module>
    sys.exit(run())
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emcc.py", line 1778, in run
    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/tools/shared.py", line 2268, in emscripten
    emscripten._main(cmdline)
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emscripten.py", line 2228, in _main
    return temp_files.run_and_clean(lambda: main(
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/tools/tempfiles.py", line 93, in run_and_clean
    return func()
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emscripten.py", line 2233, in <lambda>
    DEBUG=DEBUG,
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emscripten.py", line 2159, in main
    temp_files=temp_files, DEBUG=DEBUG)
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emscripten.py", line 86, in emscript
    glue, forwarded_data = compiler_glue(metadata, libraries, compiler_engine, temp_files, DEBUG)
  File "/home/sourceskyboxer/emsdk/emscripten/1.38.12/emscripten.py", line 215, in compiler_glue
    assert not (metadata['simd'] and shared.Settings.WASM), 'SIMD is used, but not supported in WASM mode yet'
AssertionError: SIMD is used, but not supported in WASM mode yet

I have searched google but nothing solution with SIMD. Why do I should need SIMD? But How do I ignore SIMD. I don't use SIMD. But I want only WASM!

Thanks! And I am sorry for my bad English.

kripken commented 6 years ago

That error says that one of the source files you are compiling contains SIMD code, and emscripten doesn't have a way to compile it yet.

Sometimes a project may have a flag to disable SIMD in its source files (and use a generic C path), can look in their docs or ask them directly.