UI/AppKit: Refresh the bundled dependency dylibs on each link - #11328
Open
sideshowbarker wants to merge 1 commit into
Open
UI/AppKit: Refresh the bundled dependency dylibs on each link#11328sideshowbarker wants to merge 1 commit into
sideshowbarker wants to merge 1 commit into
Conversation
Problem: Abort at launch, with dyld reporting “Symbol not found: _CRYPTO_calloc”, referenced from libssl.3.dylib and expected in the bundle’s own Contents/Frameworks/libcrypto.3.dylib. Cause: The MACOSX_BUNDLE on our add_executable() is what makes vcpkg deploy our dependency dylibs into Contents/Frameworks — and rewrite the binary to load them from there. scripts/buildsystems/osx/applocal.py is what does that — by copying each dylib only when it’s not already present. But nothing compares what sits in the bundle against the copy it came from — so a dylib that lands there once stays put there forever, no matter how far the vcpkg copy moves ahead. The bundle is then free to pair libraries from different builds of the same dependency — and dyld rejects that at launch over the symbols the newer one expects. Fix: Clear Contents/Frameworks before each link. That puts every dylib back to “absent” — which is the one state applocal.py will copy into. So it repopulates the bundle from the dependencies being linked against. Fixes LadybirdBrowser#11299
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe macOS 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem: Abort at launch, with dyld reporting “
Symbol not found: _CRYPTO_calloc”, referenced fromlibssl.3.dyliband expected in the bundle’s ownContents/Frameworks/libcrypto.3.dylib.Cause: The
MACOSX_BUNDLEon ouradd_executable()is what makes vcpkg deploy our dependency dylibs intoContents/Frameworks— and rewrite the binary to load them from there.scripts/buildsystems/osx/applocal.pyis what does that — by copying each dylib only when it’s not already present. But nothing compares what sits in the bundle against the copy it came from — so a dylib that lands there once stays put there forever, no matter how far the vcpkg copy moves ahead. The bundle is then free to pair libraries from different builds of the same dependency — and dyld rejects that at launch over the symbols the newer one expects.Fix: Clear
Contents/Frameworksbefore each link. That puts every dylib back to “absent” — which is the one stateapplocal.pywill copy into. So it repopulates the bundle from the dependencies being linked against. Fixes #11299.