-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Improper handling of install name for shared library on OS X #437
Comments
I do not have access to a |
There's a good explanation here, but the short version is that dynamic libraries on OS X can "remember" where they're supposed to be located in the file system, and linking against them also records that location into the new executable/dependent library. This isn't important when the install directory is somewhere that the program loader searches by default, but super important when installing to a non-standard location (e.g. anywhere you can write to without I suspect it should be sufficient to patch this line in the |
You could also use some tools to fixup the "remember" to relative paths based on |
You can't use |
I'll get the Makefile updated this evening so we don't use GCC environment variables. |
I am working on a project that has hiredis as a submodule in our git repo. Since we want to keep the build process contained in a single (user-owned) directory tree, we
make install
with themake INSTALL="cp -R" PREFIX=$(pwd) install
. I then find the following incorrect behavior when I run otool.Note that since the install name is incorrectly set, linking against this copy of the library, even by absolute path, will produce a binary that can't find libhiredis.dylib without manually altering LD_LIBRARY_PATH.
The text was updated successfully, but these errors were encountered: