On Jun 26, 2018, at 10:07, Langer, Stephen A. (Fed) wrote:
> That's what I don't understand. When not using MacPorts, we use > install_name_tool to fix the libraries. They're built in > $HOME/project/build/{lib, include, etc} and moved to $PREFIX /{lib, include, > etc}, at which point install_name_tool fixes their ids. Can you not pass the correct -install_name=$PREFIX/lib/libsomething.dylib flag when you link it, and thus avoid needing to use install_name_tool later? > With MacPorts, $PREFIX is ${destroot}${prefix}. Are the files moved again > when the port is installed? Does the destroot phase need to use an > install_name that's different from the actual name, anticipating the later > move? The build phase is supposed to build the software, including building the libraries with the install_name set to where the files will ultimately be installed in $PREFIX. The destroot phase is supposed to copy the files from the build directories to the correct layout in the destroot directory. Ideally the destroot phase should not need to use install_name_tool or modify the files in any other way, just copy them to where they need to go.