Rewrite the install_name of the ZLIB-NG library on macOS #8673
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.
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.dylib
to@rpath/libz.1.dylib
. This means that any subsequent load requires a validDYLD_LIBRARY_PATH
to resolve the link.Recent versions of macOS have a feature called System Integrity Protection (SIP) which (amongst other things) prevents
DYLD_LIBRARY_PATH
from being passed into subshells. As the build's dependencies aren't on the default library path on macOS,delocate-wheel
is unable to resolve thelibz
library.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_name
oflibz
an absolute path, it removes the need to dynamically resolve the path.