love.js icon indicating copy to clipboard operation
love.js copied to clipboard

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

Open modcos opened this issue 2 years ago • 1 comments

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 https://github.com/WebAssembly/design/issues/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) ``

modcos avatar Oct 20 '23 07:10 modcos

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

alexjgriffith avatar Apr 18 '24 01:04 alexjgriffith