-
Notifications
You must be signed in to change notification settings - Fork 791
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
Set INSTALL_NAME_DIR for MacOS all the time #3948
Conversation
and no longer automatically falls back to checking the contents of /usr/local/lib when trying to evaluate an @rpath dependency. As a result, runtime linking is failing on up-to-date MacOS systems. The INSTALL_NAME_DIR directive is used for APPLE builds, to ensure that the installed library advertises its install path, so libraries that link to it can find it again when dynamic linking time arrives. https://stackoverflow.com/questions/77137284/dynamic-linker-fails-to-find-symbol-at-runtime-after-updating-to-xcode-15
In e1253e4 , we removed all historical rpath CMake tweaking (a topic that has a Linuxer is totally mysterious to me), as they appeared to be no longer necessary for the up-to-date Mac of the date. Seems we're back to to the olden dark days... Hum, I see that in Line 13 in e9c0e8c
Line 6 in e9c0e8c
|
ok, so this breaks the test on MacOS 12: "Check that we can retrieve the resource directory in a relative way after renaming the installation prefix" : Line 176 in e9c0e8c
|
With respect to |
Hm, so the test failure is around relocating the install manually, which fails as the binaries are built with explicit paths instead of relative paths... though I'm a little surprised it worked before, frankly, without setting a relative @rpath... I'll have to take a look at what the current main does. It seems like to achieve what I want I will need to muck with the rpath stuff again. |
I instead did an experiment in adding the RPATH information to the PostGIS build, instead of setting the INSTALL_NAME on the library install. I'm really not sure what the "correct" approach is. Certainly 99% of the libraries on the MacOS system (including things like libraries installed by MacPorts) have their INSTALL_NAME set, and do not rely on RPATH searches. |
The PROJ project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last two months and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 2 months. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the PROJ project can do to help push this PR forward please let us know how we can assist. |
For XCode 15, the dyld linker behaviour changed and no longer automatically falls back to checking the contents of /usr/local/lib when trying to evaluate an @rpath dependency. As a result, runtime linking is failing on up-to-date MacOS systems. The INSTALL_NAME_DIR directive is used for APPLE builds, to ensure that the installed library advertises its install path, so libraries that link to it can find it again when dynamic linking time arrives.
https://stackoverflow.com/questions/77137284/dynamic-linker-fails-to-find-symbol-at-runtime-after-updating-to-xcode-15
If this patch is OK, it should be cherry-picked into main as well, and maybe into some earlier versions, as folks move into XCode15 this change will potentially bite them.