Fix linking SIDE_MODULE with ports#26514
Open
ryanking13 wants to merge 4 commits intoemscripten-core:mainfrom
Open
Fix linking SIDE_MODULE with ports#26514ryanking13 wants to merge 4 commits intoemscripten-core:mainfrom
ryanking13 wants to merge 4 commits intoemscripten-core:mainfrom
Conversation
sbc100
reviewed
Mar 21, 2026
Collaborator
sbc100
left a comment
There was a problem hiding this comment.
Ha! I actually didn't know that this was some that ever worked.
test/test_other.py
Outdated
| @requires_network | ||
| def test_side_module_with_ports(self): | ||
| # Verify that ports can be used in side modules | ||
| self.emcc(test_file('jpeg_test.c'), args=['-sUSE_LIBJPEG', '-sSIDE_MODULE', '-ljpeg']) |
Collaborator
There was a problem hiding this comment.
Can you make this into a full test that then uses the resulting side module from a main module?
Contributor
Author
There was a problem hiding this comment.
Updated. How does it look now?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the removal of the RELOCATABLE flag (cfb4642), building side module with ports are not working correctly because of 1)
-fPICflag missing when building ports, and 2)picdirectory not correctly passed when calculating the libdir.Without this, building a side module that links to the port library fails with the following error: