-
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
Linking missing system libraries for side module #8308
Comments
Your experience describes the status quo. I think most people use We could write some kind of helper script that uses information from the SIDE_MODULE(s) to generate an EXPORTED_FUNCTIONS list, but that doesn't exist today. |
In other words I don't think this is a bug, but I suppose it could be re-phrases as a feature request? |
This very long list of Also I don't fully understand the documentation then. What's the point of |
One way to create your EXPORTED_FUNCTION list would be to inspect your wasm side module with
It looks like there is bug in the documentation regarding the use of |
I proposed a change to fix the It happened to speed up the tests too! :) |
I see. Regarding One last question when using And thanks for the PR! Will maybe make someones live easier in the future. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
documentation still says |
These days we have the ability to simply pass the names of the side module when linking the main module and everything should be taken care of automatically. So only users who don't have the side modules available at when they link the main module need to worry about this issue. I will update the docs and remove the mention |
hi, I meet kind of this issue too. below is my scenario:
Aborted(Assertion failed: undefined symbol Any idea? thanks. |
Reading section System Libraries it is written that in order to link system library calls needed by the side module one can either build the main module with
EMCC_FORCE_STDLIBS=1
set as environment variable and link all, or build the side module with-v
to see which libraries are actually needed.The function in the side module:
Now:
-v
doesn't tell me anything and so I cannot specifically link system librariesOutput of
-v
:EMCC_FORCE_STDLIBS=1
also doesn't workThe error I get is:
If I export
__Znwm
manually with-s EXPORTED_FUNCTIONS="['__Znwm']"
in the main module, then it works. The other option is to use-s EXPORT_ALL=1
in the main module, but this results in a massive main module (1.8mb js file and 1mb wasm).Am I missing something?
The text was updated successfully, but these errors were encountered: