Open ang-st opened 5 years ago
I ended to pass through this error by adding an extra flag -s SEPARATE_ASM_MODULE_NAME=xxx
like :
/home/ang-st/code/bc-gw/bc-gw/monero-playground/emsdk/emscripten/1.38.30/emcc.py -std=c++11 -Wall -std=c++11 --bind -s MODULARIZE=1 -s EXPORT_NAME=MyMoneroCoreCpp --llvm-lto 1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s ASSERTIONS=2 -s EXIT_RUNTIME=0 -s BINARYEN_TRAP_MODE='clamp' -s PRECISE_F32=1 -s DISABLE_EXCEPTION_CATCHING=0 -s EXCEPTION_DEBUG=1 -s DEMANGLE_SUPPORT=1 -s NO_DYNAMIC_EXECUTION=1 -s NODEJS_CATCH_EXIT=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=\["UTF8ToString"\] -s WASM=0 -Os --separate-asm -s AGGRESSIVE_VARIABLE_ELIMINATION=1 -s ALLOW_MEMORY_GROWTH=0 --memory-init-file 0 @CMakeFiles/MyMoneroCoreCpp_ASMJS.dir/objects1.rsp -o MyMoneroCoreCpp_ASMJS.js @CMakeFiles/MyMoneroCoreCpp_ASMJS.dir/linklibs.rsp --emscripten-cxx -s SEPARATE_ASM_MODULE_NAME=xxx
shared:WARNING: --separate-asm works best when compiling to HTML. Otherwise, you must yourself load the '.asm.js' file that is emitted separately, and must do so before loading the main '.js' file. [-Wseparate-asm]
warning: undefined symbol: err
What version of emscripten are you using? What version did they add SEPARATE_ASM_MODULE_NAME?
Your build log indicates some irregularities as well, but none of them seem overtly impactful, though they could be another good starting place to look.
The error message mention https://github.com/emscripten-core/emscripten/pull/7949
I'm using the latest release : emscripten 1.38.30
what version is known to successfully build the repo ?
It works until emscripten 1.38.21
Awesome ! It built successfully from master with https://github.com/mymonero/mymonero-core-js/pull/97 merged. Thanks
Same issue. Removing the line from cmake makes it compile: https://github.com/mymonero/mymonero-core-js/blob/2d072e00dbfc975761a542960e5b99d00ed2b3a3/CMakeLists.txt#L166
@moneroexamples what version of emscripten you have? I've tested it with latest and works perfectly
@italocoin-project
38.16
.
It works on my end, did you tried on a clean environment? Maybe some cache issue?
@italocoin-project
Haven't tried much really. Just made it compile by removing the said line and I moved to other things. Also made note of this in this issue for completeness. Maybe later will try on the newest version of emsdk
, as I see now that mine is not the latest one.
This fix is needed for newest emsdk. From emscripten 1.38.30 above, you need this fix
Just upgraded to 38.30
and it works fine.