linking to a library within destroot directory
What can we do when an app wants to link to a library that is part of the app distro and within the destroot directory? So that after installation the app won't give a "Library not loaded" message because it is trying to find it in the now non-existent destroot directory. Mark
You need to hack the makefile to pass the -install_name parameter to the linker. See the mico port for an example of how to do that. markd@macports.org wrote:
What can we do when an app wants to link to a library that is part of the app distro and within the destroot directory? So that after installation the app won't give a "Library not loaded" message because it is trying to find it in the now non-existent destroot directory.
Mark
Ah I see. Thanks! So would a patch like that be a good thing to pass upstream, or would developers think this unnecessary and/or problematic for general use for some reason? Mark Jann Röder <roederja@student.ethz.ch> on Monday, April 2, 2007 at 3:24 PM -0800 wrote:
You need to hack the makefile to pass the -install_name parameter to the linker. See the mico port for an example of how to do that.
markd@macports.org wrote:
What can we do when an app wants to link to a library that is part of the app distro and within the destroot directory? So that after installation the app won't give a "Library not loaded" message because it is trying to find it in the now non-existent destroot directory.
I think -install_name is mac OS X / darwin specific. I think on Linux and the like, the install location of the libraries isn't coded into the apllications that link against them. And for macports you need to use reinplace anyway to insert the correct library path... markd@macports.org wrote:
Ah I see. Thanks! So would a patch like that be a good thing to pass upstream, or would developers think this unnecessary and/or problematic for general use for some reason?
Mark
Jann Röder <roederja@student.ethz.ch> on Monday, April 2, 2007 at 3:24 PM -0800 wrote:
You need to hack the makefile to pass the -install_name parameter to the linker. See the mico port for an example of how to do that.
markd@macports.org wrote:
What can we do when an app wants to link to a library that is part of the app distro and within the destroot directory? So that after installation the app won't give a "Library not loaded" message because it is trying to find it in the now non-existent destroot directory.
participants (2)
-
Jann Röder
-
markd@macports.org