sysadmin: is there a manifesto on environment settings for macports?
cssdev at mac.com
cssdev at mac.com
Mon Apr 13 13:06:03 PDT 2009
On Saturday, April 11, 2009, at 08:17PM, "Rainer Müller" <raimue at macports.org> wrote:
>Darren Weber wrote:
>> I've had some difficulty with the VTK library when I try to get dynamic
>> libraries working under macports. See
>> I could use some help with understanding how to get rpath working under
>> macports (if that is THE way to go), given that VTK uses CMAKE settings
>> to configure the RPATH or the INSTALL_RPATH and the settings that I've
>> tried so far get "corrupted" during the macports build process because
>> it uses a destroot setting. I've thought about a postdestroot hack
>> using 'install_name_tool' but there may be a better way to get it right.
>I don't know enough details about this RPATH to be of real help here.
>But if Debian discourages RPATH as you linked in your previous mail and
>VTK requires that, how did they get it solved?
The variables governing RPATH and install names are similar, but install names are much more important on Mac OS X than RPATH settings are on Linux. Without an install name in a shared library, a Mac OS X executable cannot locate the shared library without relying on environment variables.
The VTK 4 port sets the INSTALL_RPATH by setting the CMake variable CMAKE_INSTALL_NAME_DIR. I suspect this is the one you're missing. Things might have changed a bit with VTK 5, I did see some posts mentioning a VTK_INSTALL_NAME_DIR. I think that unless one specifies the install name (RPATH), CMake automatically uses the install destination. That is incorrect when using a destroot, and that's why CMake needs the extra variable.
More information about the macports-users