The object file specified in the error message was not compiled with -pthread, so atomic operations and thread-local data (if any) in its source were transformed to non-atomic operations and non-thread-local data. That transformation makes it unsafe to link that object into multi-threaded programs, so wasm-ld fails with that error message. The fix is to use -pthread when compiling that object.
On Thu, Apr 8, 2021 at 1:11 PM Jasmeet Kaur <[email protected]> wrote: > Hi, > I am trying to use emscripton for a project. When I compile, I get this > error : > wasm-ld: error: --shared-memory is disallowed by .... because it was not > compiled with 'atomics' or 'bulk-memory' features. > Can someone point me as to how to resolve this? And also explain as to why > is this happening? > Environment info; > > > > > *emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) > 2.0.16clang version 13.0.0 > (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project > ad8010e598d9aa3747c34ce28aa2ba6de1650bd4)Target: > wasm32-unknown-emscriptenThread model: posix* > > Thank you! > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/a9d08d47-9808-4205-bb71-e9990aa19cf7n%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/a9d08d47-9808-4205-bb71-e9990aa19cf7n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EV_CT-Ld9%2BG96WBRvDHLK2deO%2BJ%2BXJVYxgsS46RFuLe5Q%40mail.gmail.com.
