-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix libjulia install name and libjulia-internal rpath on OS X #47053
Fix libjulia install name and libjulia-internal rpath on OS X #47053
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look good to me! Can you also make a PR to master
with the relevant changes there as well?
8e06e4e
to
bd35d71
Compare
Sure but it doesn't seem like this bug is present in |
BTW this change might break ABI compatibility, not sure if you want to preserve that between minor/patch versions or something |
I see this as kind of a bug fix; the RPATH was just strictly wrong before. In terms of changing the SONAME, I think this is also something of a bugfix. :P @vtjnash do you agree? |
Let's merge this once #47220 appears to be ok for a few days on master. |
I suppose the old testers are unlikely to work on 1.6. It would be nice to have this run on macos64 CI. @DilumAluthge What should we do here? |
No v1.6 releases are planned |
Fixes #40246.
This PR makes 3 main changes:
libjulia-internal.dylib
, by analogy withlibjulia-internal.so
libjulia.dylib
tolibjulia.1.dylib
JL_LIBJULIA_SONAME
to@rpath/libjulia.1.dylib
on MacI'm not sure if all 3 are necessary but I think they're all good changes in any case. In particular #2 means you can package
libjulia.1.dylib
without alibjulia.dylib
symlink.I also removed
JL_LIBJULIA_INTERNAL_SONAME
because it seems to be unused.I made a small test case to check that this fixes the issue (for me, at least).
It builds and runs a
test
program which embeds julia indirectly, vialibtest.dylib
. These both live in the parent directory oflibjulia.dylib
, with RPATHs set accordingly.The test results can be viewed here. Note that
src/mac_embedding_test/test.sh julia
is the patched build, and printssqrt(2.0)
successfully. On the other handsrc/mac_embedding_test/test.sh julia-1.6.7
uses the official Julia 1.6.7 build, and segfaults whenlibjulia-internal.dylib
tries to get a handle tolibjulia.dylib
.