-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
link error: undefined symbol of the EM_JS in EMSDK 3.1.28 #18436
Comments
I think this is likely related to the fix for #18370. Basically, after this change EM_JS functions appear like natively defined functions with a leading underscore. I assume what is happening here is that you are using EM_JS functions from JS code or from object files other than the one in which they are defined... how are you declaring Ultimately we might need to reverse that change to add the leading underscore to EM_JS functions if this effects many folks. |
@kleisauke was also effect my this issue (which I'm guessing is the extra leading underscore. |
PR #18391 was landed as commit a742129 after Emscripten 3.1.28 was released. It's only available in the tip-of-tree build within emsdk at the time of writing. Perhaps the issue is related to the |
Ah yes, in that case this must be related instead to #16003. With this change all direct callers of EM_JS functions either need to exist in the same object file where it is defined, or they need to define their own |
Yes. I use the EM_JS function in several other source files with extern "C" specifier and the exact name(no leading underscore) and parameters in the EM_JS. |
That's nice! So I suppose it should be available in 3.1.29. # |
Yes, 3.1.29 should have the same behaviour as 3.1.28.. the change in questions was never part of a release. |
I have an EM_JS function defined in individual file and it works just fine before. But recently I upgraded EMSDK to 3.1.28, I received linking error: undefined symbol of the EM_JS function.
I have opened EMCC_DEBUG=1, and got following errors.
I checked the
__em_js_xxx
symbols existing in anotherunity_12_cxx.cxx.o
file. Why the Binaryen failed to handle it?How can I debug the Binaryen processing or maybe logs?
cc @sbc100 , any ideas?
The text was updated successfully, but these errors were encountered: