-
Notifications
You must be signed in to change notification settings - Fork 7
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
Burn runpath/rpath into the compiled object #45
Comments
I wonder why this is necessary with cmake and not with autotools? |
Great question! I don't have a mac, so it's difficult and time-consuming to investigate, as I need to re-run GitHub Actions experiments. But generally it seems that an autotools build of the library somehow passes an absolute reference (e.g.) |
As with OSGeo/PROJ#3009, edit
the big question is what to put for |
Thanks 👍 |
Glad it finally worked! I might need to repeat some of this info on the mail list, as I'd expect other macOS users/packagers to encounter this too. |
Looking back at this experience, the runpath/rpath should be "burned" into the compiled object, so it does not rely on [DY]LD_LIBRARY_PATH variables. This is normally done using the linker flag:
the resulting compiled object can be inspected in Linux with
readelf -d file.so
, and look for something like:or macOS with
otool -l file.so
, and look for something like:Using
-Wl,-rpath,/path/to/lib
should fix the "@rpath/libproj.22.dylib not found" issue for macOS. This is what is done here for shapely to link to libgeos.Originally posted by @mwtoews in #44 (comment)
Thanks @mwtoews 👍
The text was updated successfully, but these errors were encountered: