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

Build with emscripten toolchain fails #670

Open
tibortakacs opened this issue Jul 14, 2022 · 0 comments · Fixed by bfgroup/b2#310
Open

Build with emscripten toolchain fails #670

tibortakacs opened this issue Jul 14, 2022 · 0 comments · Fixed by bfgroup/b2#310

Comments

@tibortakacs
Copy link

tibortakacs commented Jul 14, 2022

Environment:
Ubuntu 20.04 WSL2
Boost version: 1.79.0
Emscripten toolchain is downloaded as a nuget package and manually added to the PATH.

Issue:

I want to build boost test with emscripten toolchain. This is a b2 command that almost works:

./b2 --address-model=32 --layout=tagged --build-type=minimal --build-dir=./build --with-test threading=multi toolset=emscripten variant=release

However, I get this error:
... emcc: error: '/home/user/.nuget/packages/emscripten-2.0.26-ubuntu-2004-x64/1.0.3/build/native/emsdk/upstream/bin/wasm-ld -o build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/libboost_unit_test_framework-mt.so.1.79.0 -h build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/compiler_log_formatter.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/debug.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/decorator.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/execution_monitor.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/framework.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/plain_report_formatter.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/progress_monitor.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/results_collector.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/results_reporter.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/test_framework_init_observer.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/test_tools.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/test_tree.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/unit_test_log.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/unit_test_main.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/unit_test_monitor.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/unit_test_parameters.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/junit_log_formatter.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/xml_log_formatter.bc build/boost/bin.v2/libs/test/build/emscripten-2.0.26/release/threading-multi/visibility-hidden/xml_report_formatter.bc -Bstatic -Bdynamic -L/home/user/.nuget/packages/emscripten-2.0.26-ubuntu-2004-x64/1.0.3/build/native/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten --relocatable -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (returned 1) ...

As you can see, the building framework calls wasm-ld with -h ..., -Bstatic and -Bdynamic parameters which are not supported by wasm-ld. If I directly call the long command above after removing these parameters first, the command succeeds.

Is this expected? Should I modify the building framework to call wasm-ld with the correct parameters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant