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 - enable multithreading #1127

Open
SimplyLiz opened this issue Feb 12, 2020 · 1 comment
Open

emscripten - enable multithreading #1127

SimplyLiz opened this issue Feb 12, 2020 · 1 comment
Labels

Comments

@SimplyLiz
Copy link

SimplyLiz commented Feb 12, 2020

Could you please provide a way to build SDL2 for emscripten with --enable-thread / pthread and atomic?

right now, the configure script for SDL2 is always called with --disable-threads (and also atomic is disabled).

If there's a specific reason, you could add an option to enable / disable it to the package.

When crosscompiling my project for emscripten, linking fails with:

wasm atomics' feature is disallowed by SDL_spinlock.c.o, so --shared-memory must not be used

Looking at ~/.conan/data/sdl2/2.0.10/bincrafters/stable/source/source_subfolder/build-scripts/emscripten-buildbot.sh

i found --disable-threads in the emconfigure call.

Why is that disabled? I can't port my project to emscripten without multithreading.
emscripten supports both -s USE_PTHREADS=1 and -pthread

Logs (Include/Attach if Applicable)

Click to expand log
Put your log output here

Edit:
Maybe this helps: emscripten-core/emscripten#8960

@SimplyLiz SimplyLiz added the bug label Feb 12, 2020
@SimplyLiz SimplyLiz changed the title SDL2/2.10: emscripten - enable multithreading emscripten - enable multithreading Feb 15, 2020
@SimplyLiz
Copy link
Author

Update. I found out that ALL libraries built with emscripten do have multithreading disabled. Luckily emscripten provides enough of the libraries (-S) i need to be able to compile / test a barebone application, but i still need some libraries from conan.

The libraries provided by emscripten are all multithreaded when using the flag, but i can't get conan to enable multithreading.

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

No branches or pull requests

1 participant