Clemens Vonrhein wrote:
I think the point Peter is making that one can use rpath _and_ $ORIGIN
to exactly get this behaviour _without_ the need to add
LD_LIBRARY_PATH settings! So you can unpack Coot packages anywhere you want
with all its additional libraries refered with a relative rpath
'$ORIGIN/../lib'.

I guess this $ORIGIN feature isn't very widely known ... see e.g.

 http://www.scons.org/wiki/UsingOrigin
 http://linuxreviews.org/man/ld.so/
 http://blogs.sun.com/dipol/entry/dynamic_libraries_rpath_and_mac
 http://www.codeshorts.ca/tag/osx/

It works great for us.

OK, that is pretty cool, looks like the correct technical solution for our relocatable binaries.

I can see implementation problems. It looks to me as though this will only work if you build in place. All the coot dependencies get built in their own trees and the installed later. I suspect therefore that the link step might not work, because the rpath will be wrong until the binaries are shifted into place. Maybe that can be dealt with using LD_LIBRARY_PATH while building (but I'm out of my depth here).

I also suspect the packagers will then be unhappy:
 http://wiki.debian.org/RpathIssue

Reply via email to