Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error of the release version: wasm-ld: error: --shared-memory is disallowed #81

Open
modcos opened this issue Oct 20, 2023 · 1 comment

Comments

@modcos
Copy link

modcos commented Oct 20, 2023

I tried to compile it according to the instructions for Windows.
The compatibility version is built without errors.
But in the release version I get:

``
em++: warning: -pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see WebAssembly/design#1271 [-Wpthreads-mem-growth]
wasm-ld: error: --shared-memory is disallowed by sfnt.c.o because it was not compiled with 'atomics' or 'bulk-memory' features.

em++: error: 'F:/lovejs/emsdk/upstream/bin\wasm-ld.exe -o love.wasm CMakeFiles/love.dir/src/love.cpp.o libliblove.a ../freetype/libfreetype.a ../libvorbis/libvorbisfile-static.a ../libvorbis/libvorbis-static.a ../libtheora/libtheora-static.a ../libogg/libogg-static.a ../libmodplug/libmodplug-static.a ../zlib/libz.a ../mpg123/libmpg123.a liblove_3p_box2d.a liblove_3p_ddsparse.a liblove_3p_enet.a liblove_3p_glad.a liblove_3p_glslang.a liblove_3p_lodepng.a liblove_3p_luasocket.a liblove_3p_lua53.a ../lua51/liblua51.a liblove_3p_lz4.a liblove_3p_noise1234.a liblove_3p_physfs.a liblove_3p_wuff.a liblove_3p_xxhash.a -LF:\lovejs\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten F:\lovejs\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libSDL2-mt.a F:\lovejs\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\crtbegin.o -lGL-mt -lal -lhtml5 -lbulkmemory -lstubs -lnoexit -lc-mt -ldlmalloc-mt -lcompiler_rt-mt -lc++-mt -lc++abi-mt -lsockets-mt -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr C:\Users\modcos\AppData\Local\Temp\tmplqt101folibemscripten_js_symbols.so --import-memory --shared-memory --strip-debug --export-if-defined=main --export-if-defined=_emscripten_thread_init --export-if-defined=_emscripten_thread_exit --export-if-defined=_emscripten_thread_crashed --export-if-defined=_emscripten_tls_init --export-if-defined=pthread_self --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=_emscripten_thread_free_data --export=emscripten_main_runtime_thread_id --export=emscripten_main_thread_process_queued_calls --export=_emscripten_run_on_main_thread_js --export=emscripten_stack_set_limits --export=__get_temp_ret --export=__set_temp_ret --export=malloc --export=free --export=__cxa_is_pointer_type --export=__cxa_can_catch --export=__cxa_increment_exception_refcount --export=__cxa_decrement_exception_refcount --export=setThrew --export=__cxa_free_exception --export=__wasm_call_ctors --export=_emscripten_thread_init --export=_emscripten_thread_exit --export-table -z stack-size=65536 --initial-memory=16777216 --max-memory=2147483648 --no-entry --table-base=1 --global-base=1024' failed (returned 1)

make[2]: *** [love/love.js] Error 1
make[1]: *** [love/CMakeFiles/love.dir/all] Error 2
make: *** [all] Errors 2

emmake: error: 'make -j 6' failed (returned 2)
``

@alexjgriffith
Copy link

Which version of emsdk were you using? Unfortunately this port doesn't work with emscripten version newer than ~2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants