-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Unable to add _emscripten_thread_exit_joinable to EXPORTED_FUNCTIONS #22108
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
Comments
Can I ask why are you trying to build with |
The reason that emscripten/src/library_pthread.js Lines 1155 to 1156 in 7594002
Unfortunetly at the callsite we protect that call with emscripten/system/lib/pthread/pthread_create.c Lines 343 to 346 in 7594002
|
I am probably a bit confused here, but I am trying to compile a set of static libraries that will be linked into either the main module or the side module. Now these libraries are built via Autoconf and Automake so the build process also includes compiling small test programs to see what features emcc has. Initially I was just using Since I am compiling static libraries, I guess the version of the cache in use doesn't really matter since the static library will never actually be linked against anything in there, but I thought for the configure script compiler tests it would be more correct for those tests to use the system libraries coming from the correct cache path. |
If you are building static libraries that you don't need |
Huh, I thought the code would still need to be compiled with |
Sure, yes, if you the final output is a MAIN_MODULE or a SIDE_MODULE than yes you would want to build with |
In any case #22110 should fix this particular bug. In the long run I'm still hoping we can remove |
Yes, the final output will be either a MAIN_MODULE or SIDE_MODULE, the reason for adding |
In that case I would recommend using |
Can't you setup the cache to contains both types of libraries? What if you have a statically linked binary and a dynamically linked binary in the same project? |
Yeah, I was thinking that. Once I get some initial feedback on the direction of that PR, I will investigate calling embuilder multiple times with the different configurations. |
This is a decent workaround, but it seems incorrect that by default, if I compile code with |
I'm proposing that we drop |
Uh oh!
There was an error while loading. Please reload this page.
When building with both
-pthread
and-sRELOCATABLE
, I get an error saying that_emscripten_thread_exit_joinable
needs to be added toEXPORTED_FUNCTIONS
. However, while addingEXPORTED_FUNCTIONS=__emscripten_thread_exit_joinable
shows that--export=_emscripten_thread_exit_joinable
is now passed towasm-ld
, I get the exact same error.This issue is related to #21844, but I would like to focus here on why
EXPORTED_FUNCTIONS
is not working.Version of emscripten/emsdk:
Failing command line in full:
Test.c source
Full link command and output with
-v
appended:The text was updated successfully, but these errors were encountered: