-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[boost-filesystem] Error linking with boost-filesystem whilst using Emscripten #39346
Comments
Not really an issue with vcpkg but your assumption about the emscripten triplet.
So write your own emscripten triplet/toolchain and add the required flags? (Or adjust CFLAGS and CXXFLAGS in your environment accordingly.) |
AFAIU Why should this be handled in the triplet/toolchain for emscripten? This is normally detected/added by the packages, for other platforms.
Doesn't this have an effect on building host dependencies? |
If you read https://emscripten.org/docs/porting/pthreads.html#pthreads-support carefully:
which basically means it is an all or nothing flag which also is inline with my experience with it while testing microsoft/vcpkg-tool#1315 with wasm. You will just get errors that abc wasn't build with thread support.
Hmm yes. So setting CFLAGS and CXXFLAGS in the triplet is required, e.g.:
|
This worked perfectly, thanks! |
Describe the bug
When compiling my application, the linking process fails because
boost-filesystem
was not compiled with-pthread
on Emscripten. The error is as follows:wasm-ld: error: --shared-memory is disallowed by exception.cpp.o because it was not compiled with 'atomics' or 'bulk-memory' features.
Environment
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/uniformization/boost-error-vcpkg-test.git
.cmake --preset vcpkg-emscripten && cmake --build --preset emscripten
.Expected behavior
The program should link successfully.
Failure logs
build.log
Additional context
I created a quick demo so any reviewer can see the setup I'm using: https://github.com/uniformization/boost-error-vcpkg-test/.
The text was updated successfully, but these errors were encountered: