Rewrite the install_name of the ZLIB-NG library on macOS#8673
Merged
radarhere merged 2 commits intopython-pillow:mainfrom Feb 15, 2025
Merged
Rewrite the install_name of the ZLIB-NG library on macOS#8673radarhere merged 2 commits intopython-pillow:mainfrom
radarhere merged 2 commits intopython-pillow:mainfrom
Conversation
This was referenced Jan 8, 2025
Contributor
Author
Contributor
Author
|
I believe #8743 is an even better solution, as it fixes the problem at the source; and, with any luck, eventually the patch won't be needed. |
hugovk
approved these changes
Feb 15, 2025
Member
|
I've created #9312 to upgrade to zlib-ng 2.3.1, which now includes zlib-ng/zlib-ng#1867. |
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.
EDIT: I believe #8743 is an even better solution, as it fixes the problem at the source.
Fixes #8671. Alternative to #8672
Changes proposed in this pull request:
DYLD_LIBRARY_PATH, since it won't be passed down to subshells.When zlib-ng is compiled, it sets the install name of the
libz.1.dylibto@rpath/libz.1.dylib. This means that any subsequent load requires a validDYLD_LIBRARY_PATHto resolve the link.Recent versions of macOS have a feature called System Integrity Protection (SIP) which (amongst other things) prevents
DYLD_LIBRARY_PATHfrom being passed into subshells. As the build's dependencies aren't on the default library path on macOS,delocate-wheelis unable to resolve thelibzlibrary.SIP is disabled on GitHub Actions configurations, so this problem isn't seen in CI; but is enabled by default on macOS machines, so individual developers building Pillow dependencies will get an error from cibuildwheel when the wheel is repaired.
By making the
install_nameoflibzan absolute path, it removes the need to dynamically resolve the path.