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

emscripten toolset does not work #170

Closed
jonathanpoelen opened this issue Jun 26, 2022 · 1 comment · Fixed by #310
Closed

emscripten toolset does not work #170

jonathanpoelen opened this issue Jun 26, 2022 · 1 comment · Fixed by #310
Labels
bug Something isn't working

Comments

@jonathanpoelen
Copy link

Environment and version details

  • Operating System+version: Manjaro Linux
  • Compiler+version: emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.9
  • Shell: zsh
  • B2 Version: B2 Version 4.7. OS=LINUX. / B2 4.7-git

Brief problem description

Options not recognized by emscripten are injected and it does not compile.

Steps to reproduce the issue

$ cat Jamroot
project test : requirements : default-build release ;
exe test : test.cpp ;
$ b2 toolset=emscripten

Actual behavior summary

Compilation error:

$ b2 toolset=emscripten --debug-configuration
notice: found boost-build.jam at /usr/share/boost-build/src/kernel/boost-build.jam
notice: loading B2 from /usr/share/boost-build/src/kernel/bootstrap.jam
notice: Searching '/etc' '/home/jonathan' '/usr/share/boost-build/src/kernel' '/usr/share/boost-build/src/kernel' '/usr/share/boost-build/src/util' '/usr/share/boost-build/src/build' '/usr/share/boost-build/src/tools' '/usr/share/boost-build/src/contrib' '/usr/share/boost-build/src/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/home/jonathan' '/usr/share/boost-build/src/kernel' '/usr/share/boost-build/src/kernel' '/usr/share/boost-build/src/util' '/usr/share/boost-build/src/build' '/usr/share/boost-build/src/tools' '/usr/share/boost-build/src/contrib' '/usr/share/boost-build/src/.'.
notice: Searching '/home/jonathan' '/usr/share/boost-build/src/kernel' '/usr/share/boost-build/src/kernel' '/usr/share/boost-build/src/util' '/usr/share/boost-build/src/build' '/usr/share/boost-build/src/tools' '/usr/share/boost-build/src/contrib' '/usr/share/boost-build/src/.' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from '/home/jonathan'.
notice: will use 'g++' for gcc, condition <toolset>gcc-12
notice: using gcc libraries :: <toolset>gcc-12 :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
notice: using gcc archiver :: <toolset>gcc-12 :: /usr/bin/ar
warning: toolset gcc initialization: can not find tool windres
warning: initialized from /home/jonathan/user-config.jam:6
notice: using rc compiler :: <toolset>gcc-12 :: /usr/bin/as
notice: will use 'clang++' for clang-linux, condition <toolset>clang-linux-13
notice: will use 'clang++' for clang-linux, condition <toolset>clang-linux-libc++
notice: [cmdline-cfg] toolset emscripten not previously configured; attempting to auto-configure now
notice: will use 'emcc' for emscripten, condition <toolset>emscripten-2.0.9
...found 7 targets...
...updating 1 target...
emscripten.link bin/emscripten-2.0.9/release/test.js
emcc:WARNING: --llvm-lto ignored when using llvm backend
wasm-ld: error: unknown argument: -Bstatic
wasm-ld: error: unknown argument: -Bdynamic
emcc: error: '/home/jonathan/game/emsdk/upstream/bin/wasm-ld -o bin/emscripten-2.0.9/release/test.wasm bin/emscripten-2.0.9/release/test.bc -Bstatic -Bdynamic -L/home/jonathan/game/emsdk/upstream/emscripten/system/local/lib -L/home/jonathan/game/emsdk/upstream/emscripten/system/lib -L/home/jonathan/game/emsdk/upstream/emscripten/cache/wasm /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libc.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libcompiler_rt.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libc++-noexcept.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libc++abi-noexcept.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libdlmalloc.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libpthread_stub.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libc_rt_wasm.a /home/jonathan/game/emsdk/upstream/emscripten/cache/wasm/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined --import-memory --strip-debug --export-table --export main --export stackSave --export stackRestore --export stackAlloc --export __wasm_call_ctors --export __errno_location -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed (1)

    "emcc"   -o "bin/emscripten-2.0.9/release/test.js" "bin/emscripten-2.0.9/release/test.bc"  -Wl,--start-group -Wl,-Bstatic  -Wl,-Bdynamic  -Wl,--end-group -fPIC -O3 --llvm-lto 0 -g0

...failed emscripten.link bin/emscripten-2.0.9/release/test.js...
...failed updating 1 target...

Expected behavior summary

  • -Wl,-Bstatic and -Wl,-Bdynamic block compilation and should not be used
  • --llvm-lto does not exist anymore and should be replaced by -fno-lto / nothing, -flto and -flto=thin in emscripten.jam (link-optimization option)
@jonathanpoelen jonathanpoelen added the bug Something isn't working label Jun 26, 2022
@jonathanpoelen
Copy link
Author

I just saw #111 who hasn't moved in 8 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant