emscripten-core / emscripten-core/emscripten
How do I see what linker input files the "error: DISABLE_EXCEPTION_THROWING was ..." refers to?
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.30 (cfe2bdfe2692457cb5f5770672f6e5ccb3ffc2f2)
clang version 16.0.0 (https://github.com/llvm/llvm-project 800f0f1546b2352ba42a4777149afb13cb874fcd)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/tml/src/emsdk/upstream/bin
**Failing command line in full:**
/home/tml/src/emsdk/upstream/emscripten/em++ -g -s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm -g -O1 -Wall -Wextra -Wshadow -Wundef -Werror -std=c++17 -g -v -s ALLOW_BLOCKING_ON_MAIN_THREAD=0 -s VERBOSE=1 -s MODULARIZE -s EXPORT_NAME=createOnlineModule -s USE_PTHREADS=1 -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=15 --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s "EXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16,UTF8ToString,allocateUTF8,ccall,cwrap,FS]" -s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm -s "EXPORTED_FUNCTIONS=[_main,_libreofficekit_hook,_libreofficekit_hook_2,_lok_preinit,_lok_preinit_2,_handle_cool_message]" -gseparate-dwarf --pre-js /home/tml/lo/core-cool-wasm/workdir/CustomTarget/static/emscripten_fs_image/soffice.data.js.link --preload-file /home/tml/lo/online-wasm-hacking/collabora-sample-docs@ -o online.js ../wasm/wasmapp.o -L/home/tml/lo/core-cool-wasm/workdir/UnpackedTarball/libwebp/sharpyuv/.libs -L/home/tml/lo/core-cool-wasm/workdir/UnpackedTarball/libxslt/libxslt/.libs -L/home/tml/lo/core-cool-wasm/workdir/UnpackedTarball/libxml2/.libs -L/home/tml/lo/core-cool-wasm/workdir/UnpackedTarball/liborcus/src/parser/.libs -L/opt/poco.emsc.3.1.30/lib -L/opt/zstd.emsc.3.1.30/lib libonline.a /opt/poco.emsc.3.1.30/lib/libPocoEncodings.a /opt/poco.emsc.3.1.30/lib/libPocoNet.a /opt/poco.emsc.3.1.30/lib/libPocoUtil.a /opt/poco.emsc.3.1.30/lib/libPocoXML.a /opt/poco.emsc.3.1.30/lib/libPocoJSON.a /opt/poco.emsc.3.1.30/lib/libPocoFoundation.a /opt/zstd.emsc.3.1.30/lib/libzstd.a -L/home/tml/lo/core-cool-wasm/instdir/program [tons of static archives] /home/tml/lo/core-cool-wasm/workdir/UnpackedTarball/libwps/src/lib/.libs/libwps-0.4.a /home/tml/lo/core-cool-wasm/workdir/UnpackedTarball/librevenge/src/lib/.libs/librevenge-0.0.a -licudata -pthread
(Yes, I know that the command line has multiple copies of "-s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm". Just some makefile imperfections.)
** The problematic part of the output **
[...]
adding setValue and deps : function setValue(ptr, value, type = 'i8
adding warnOnce and deps : function warnOnce(text) {
if (!warnO
adding ___assert_fail and deps : function ___assert_fail(condition, filen
adding ___call_sighandler and deps $getWasmTableEntry : function ___call_sighandler(fp, sig) {
error: DISABLE_EXCEPTION_THROWING was set (likely due to -fno-exceptions), which means no C++ exception throwing support code is linked in, but exception catching code appears. Either do not set DISABLE_EXCEPTION_THROWING (if you do want exception throwing) or compile all source files with -fno-except (so that no exceptions support code is required); also make sure DISABLE_EXCEPTION_CATCHING is set to the right value - if you want exceptions, it should be off, and vice versa.
error: DISABLE_EXCEPTION_THROWING was set (likely due to -fno-exceptions), which means no C++ exception throwing support code is linked in, but exception catching code appears. Either do not set DISABLE_EXCEPTION_THROWING (if you do want exception throwing) or compile all source files with -fno-except (so that no exceptions support code is required); also make sure DISABLE_EXCEPTION_CATCHING is set to the right value - if you want exceptions, it should be off, and vice versa.
error: DISABLE_EXCEPTION_THROWING was set (likely due to -fno-exceptions), which means no C++ exception throwing support code is linked in, but exception catching code appears. Either do not set DISABLE_EXCEPTION_THROWING (if you do want exception throwing) or compile all source files with -fno-except (so that no exceptions support code is required); also make sure DISABLE_EXCEPTION_CATCHING is set to the right value - if you want exceptions, it should be off, and vice versa.
error: DISABLE_EXCEPTION_THROWING was set (likely due to -fno-exceptions), which means no C++ exception throwing support code is linked in, but exception catching code appears. Either do not set DISABLE_EXCEPTION_THROWING (if you do want exception throwing) or compile all source files with -fno-except (so that no exceptions support code is required); also make sure DISABLE_EXCEPTION_CATCHING is set to the right value - if you want exceptions, it should be off, and vice versa.
adding ___emscripten_init_main_thread_js and deps $PThread : function ___emscripten_init_main_thread_
adding ___emscripten_thread_cleanup and deps $PThread : function ___emscripten_thread_cleanup(th
adding ___pthread_create_js and deps $spawnThread,pthread_self,$pthreadCreateProxied,$PThread : function ___pthread_create_js(pthread_pt
adding pthreadCreateProxied and deps __pthread_create_js,$PThread : function pthreadCreateProxied(pthread_pt
The problem is that I don't see what the errors refer to. The immediately preceding ___call_sighandler thing?
Contributor guide
Assessment
This issue has not been assessed yet.