Skip to content

[boost-filesystem] Error linking with boost-filesystem whilst using Emscripten #39346

@uniformization

Description

@uniformization

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

  • OS: Windows
  • Compiler: emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.61 (67fa4c16496b157a7fc3377afd69ee0445e8a6e3)

To Reproduce
Steps to reproduce the behavior:

  1. Clone the demo I made for this issue: git clone https://github.com/uniformization/boost-error-vcpkg-test.git.
  2. Run the preset then build it: cmake --preset vcpkg-emscripten && cmake --build --preset emscripten.
  3. See error.

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/.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions