fix: Another attempt to fix libcrypto.dylib loading issue #112
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.
Which issue does this PR close?
Closes #76
Rationale for this change
The previous fix(#55) is not correct as it doesn't propagate
DYLD_LIBRARY_PATH
to the test phase: theexport
statement is executed in a bash shell, which is lost in the new shell command in the test phase.Q: If the library path is not correctly set, how does most of the test instances are passed?
A: It turns out that Github's mac runners have inconsistent state of SIP enable status. See actions/runner-images#9091 for related reports, and I also observed related output in my personal debug branch. When SIP is disabled, the X86 mac runners will try to find
libcrypto.dylib
in/usr/lib/local
on macos-latest(a.k.a: macos-12), which are already linked by homebrew's openssl lib. Below is a screenshot that listing/usr/local/lib
:So all the tests passed are ran on Mac with SIP disabled.
In theory, even if SIP is turned on, the java binary from zulu distribution should also try to find libraries in
/usr/local/lib
if it's unrestricted[1]. I am not sure and didn't find a clue why it doesn't and fails the test.Q: How does upgrade to macos-13 fix this problem?
A: macos-13's SIP is turned off, See: actions/runner-images#8162. So it's possible to manipulate the
DYLD_LIBARARY_PATH
for our Java tests for now.What changes are included in this PR?
DYLD_LIBRARY_PATH
How are these changes tested?
Manual verification
Notes:
1: you can look up related documentation with
man dlopen
on your Mac.