[solved] [WebGL] Compilation Error: SIMD is used, but not supported in WASM mode yet


#1

Hi,

I am trying to run tests/web/prepare_test_libs.py, I get the error:

RuntimeError: Compilation error:
Traceback (most recent call last):
  File "/opt/emsdk/emscripten/1.38.31/emcc.py", line 3308, in <module>
    sys.exit(run(sys.argv))
  File "/opt/emsdk/emscripten/1.38.31/emcc.py", line 1938, in run
    final = shared.Building.emscripten(final, target + '.mem', js_libraries)
  File "/opt/emsdk/emscripten/1.38.31/tools/shared.py", line 2209, in emscripten
    emscripten.run(infile, outfile, memfile, js_libraries)
  File "/opt/emsdk/emscripten/1.38.31/emscripten.py", line 2562, in run
    return temp_files.run_and_clean(lambda: emscripter(
  File "/opt/emsdk/emscripten/1.38.31/tools/tempfiles.py", line 105, in run_and_clean
    return func()
  File "/opt/emsdk/emscripten/1.38.31/emscripten.py", line 2563, in <lambda>
    infile, outfile_obj, memfile, libraries, shared.COMPILER_ENGINE, temp_files, shared.DEBUG)
  File "/opt/emsdk/emscripten/1.38.31/emscripten.py", line 96, in emscript_fastcomp
    glue, forwarded_data = compiler_glue(metadata, libraries, compiler_engine, temp_files, DEBUG)
  File "/opt/emsdk/emscripten/1.38.31/emscripten.py", line 232, 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 installed the WebGL backend using the following instructions.

Edit: it seems that asm.js is currently being replaced by emscripten in favor of webassembly.
Has someone managed to tun the web examples lately?


#2

Passing option -s WASM=0 to emcc solved the problem. Some other options were also needed, so here is the full parameter:

options = ["-s", "WASM=0", "-s", "USE_GLFW=3", "-s", "USE_WEBGL2=1", "-lglfw"]

needed to be passed to emscripten.create_js in the test examples.


#3

Great find, really helped me out, thanks!