fix(cmake): export LVGL symbols on Linux so dlopen'd apps resolve them#5
Open
andreahaku wants to merge 1 commit into
Open
fix(cmake): export LVGL symbols on Linux so dlopen'd apps resolve them#5andreahaku wants to merge 1 commit into
andreahaku wants to merge 1 commit into
Conversation
On Linux, cardputer-emu whole-archives LVGL but sets ENABLE_EXPORTS only on Apple, so the LVGL symbols stay in .symtab and never reach .dynsym. dlopen of libAPPLaunch.so (and any app plugin) then fails at load with an undefined symbol error (e.g. lv_anim_path_ease_out). Extend ENABLE_EXPORTS to Linux as well (adds -rdynamic) so the whole-archived LVGL symbols land in .dynsym. After the change ~1968 LVGL symbols are exported and the emulator loads libAPPLaunch.so and the app plugins cleanly. Tested on Arch Linux (gcc, ninja): before = dlopen fails; after = emulator starts and loads apps/libAPPLaunch.so and apps/libUserDemo.so without errors.
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.
On Linux,
cardputer-emuwhole-archives LVGL but setsENABLE_EXPORTSonly on Apple (if(APPLE)), so the LVGL symbols stay in.symtaband never reach.dynsym. As a resultdlopenoflibAPPLaunch.so(and any app plugin) fails at load with an undefined symbol error, e.g.undefined symbol: lv_anim_path_ease_out.This extends
ENABLE_EXPORTSto Linux as well (which adds-rdynamic), so the whole-archived LVGL symbols land in.dynsym. After the change about 1968 LVGL symbols are exported and the emulator loadslibAPPLaunch.soand the app plugins without errors.Testing
Arch Linux (gcc, ninja):
dlopenofapps/libAPPLaunch.sofails withundefined symbol: lv_*.apps/libAPPLaunch.soandapps/libUserDemo.socleanly.The change is a no-op on macOS (already covered by the existing
if(APPLE)) and on Windows.