Open quangvu3 opened 2 years ago
Failed when building MyMonero emscripten on Ubuntu 20.04:
$ npm run build:emscripten
Error:
[100%] Linking CXX executable MyMoneroCoreCpp_WASM.js emcc:WARNING: --llvm-lto ignored when using llvm backend wasm-ld: error: unknown file type: thread.o em++: error: '/emsdk/upstream/bin/wasm-ld -o MyMoneroCoreCpp_WASM.wasm CMakeFiles/MyMoneroCoreCpp_WASM.dir/src/index.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/src/emscr_async_send_bridge.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_address_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_paymentID_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_key_image_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_fee_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_transfer_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_fork_rules.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_wallet_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/serial_bridge_index.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_send_routine.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/serial_bridge_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/tools__ret_vals.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_basic/cryptonote_basic_impl.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_basic/account.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_basic/cryptonote_format_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/crypto.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/slow-hash-dummied.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/oaes_lib.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/crypto-ops.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/crypto-ops-data.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/keccak.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/chacha.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/random.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/aesb.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/tree-hash.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-blake.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/blake256.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-groestl.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-jh.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-skein.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/groestl.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/jh.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/skein.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_core/cryptonote_tx_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/base58.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/threadpool.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/aligned.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/util.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/hex.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/string_tools.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/memwipe.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/mlocker.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/wipeable_string.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/device/device.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/device/device_default.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctOps.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctTypes.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctCryptoOps.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctSigs.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/bulletproofs.cc.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/multiexp.cc.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/mnemonics/electrum-words.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/vtlogger/logger.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/contrib/libsodium/src/crypto_verify/verify.c.o boost/lib/libboost_chrono.a boost/lib/libboost_system.a boost/lib/libboost_thread.a -L/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten --whole-archive -lembind-rtti --no-whole-archive -lGL -lal -lhtml5 -lstubs-debug -lnoexit -lc-optz-debug -ldlmalloc-debug -lcompiler_rt -lc++ -lc++abi -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__stdio_exit --export-if-defined=emscripten_stack_get_end --export-if-defined=emscripten_stack_get_free --export-if-defined=emscripten_stack_get_base --export-if-defined=emscripten_stack_init --export-if-defined=__cxa_demangle --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=__errno_location --export-if-defined=malloc --export-if-defined=free --export-if-defined=__cxa_is_pointer_type --export-if-defined=__cxa_can_catch --export-if-defined=setThrew --export-table -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=2147483648 --global-base=1024' failed (returned 1) make[2]: *** [CMakeFiles/MyMoneroCoreCpp_WASM.dir/build.make:970: MyMoneroCoreCpp_WASM.js] Error 1 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/MyMoneroCoreCpp_WASM.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 emmake: error: 'cmake --build .' failed (returned 2) cp: cannot stat 'build/MyMoneroCoreCpp_WASM.wasm': No such file or directory
The build scripts on master have been streamlined to no longer require boost to be compiled as well as the newer versions of emscripten
Failed when building MyMonero emscripten on Ubuntu 20.04:
$ npm run build:emscripten
Error:
[100%] Linking CXX executable MyMoneroCoreCpp_WASM.js emcc:WARNING: --llvm-lto ignored when using llvm backend wasm-ld: error: unknown file type: thread.o em++: error: '/emsdk/upstream/bin/wasm-ld -o MyMoneroCoreCpp_WASM.wasm CMakeFiles/MyMoneroCoreCpp_WASM.dir/src/index.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/src/emscr_async_send_bridge.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_address_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_paymentID_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_key_image_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_fee_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_transfer_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_fork_rules.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_wallet_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/serial_bridge_index.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/monero_send_routine.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/serial_bridge_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-cpp/src/tools__ret_vals.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_basic/cryptonote_basic_impl.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_basic/account.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_basic/cryptonote_format_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/crypto.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/slow-hash-dummied.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/oaes_lib.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/crypto-ops.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/crypto-ops-data.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/keccak.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/chacha.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/random.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/aesb.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/tree-hash.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-blake.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/blake256.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-groestl.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-jh.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/hash-extra-skein.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/groestl.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/jh.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/crypto/skein.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/cryptonote_core/cryptonote_tx_utils.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/base58.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/threadpool.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/aligned.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/common/util.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/hex.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/string_tools.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/memwipe.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/mlocker.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/epee/src/wipeable_string.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/device/device.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/device/device_default.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctOps.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctTypes.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctCryptoOps.c.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/rctSigs.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/bulletproofs.cc.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/ringct/multiexp.cc.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/mnemonics/electrum-words.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/vtlogger/logger.cpp.o CMakeFiles/MyMoneroCoreCpp_WASM.dir/node_modules/@mymonero/mymonero-core-custom/contrib/libsodium/src/crypto_verify/verify.c.o boost/lib/libboost_chrono.a boost/lib/libboost_system.a boost/lib/libboost_thread.a -L/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten --whole-archive -lembind-rtti --no-whole-archive -lGL -lal -lhtml5 -lstubs-debug -lnoexit -lc-optz-debug -ldlmalloc-debug -lcompiler_rt -lc++ -lc++abi -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__stdio_exit --export-if-defined=emscripten_stack_get_end --export-if-defined=emscripten_stack_get_free --export-if-defined=emscripten_stack_get_base --export-if-defined=emscripten_stack_init --export-if-defined=__cxa_demangle --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=__errno_location --export-if-defined=malloc --export-if-defined=free --export-if-defined=__cxa_is_pointer_type --export-if-defined=__cxa_can_catch --export-if-defined=setThrew --export-table -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=2147483648 --global-base=1024' failed (returned 1) make[2]: *** [CMakeFiles/MyMoneroCoreCpp_WASM.dir/build.make:970: MyMoneroCoreCpp_WASM.js] Error 1 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/MyMoneroCoreCpp_WASM.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 emmake: error: 'cmake --build .' failed (returned 2) cp: cannot stat 'build/MyMoneroCoreCpp_WASM.wasm': No such file or directory