Hi Kevin,

On Tue, Jun 02, 2009 at 09:16:54AM +0100, Kevin Cowtan wrote:
>> On the whole, I prefer to use rpath, because it makes it easier to  
>> harden an installation against the vagaries of what users have set in  
>> their environment - using an rpath like '$ORIGIN/../lib' to set a path  
>> relative to the location of the ELF can help with installation issues.  
>> OS X and Solaris both allow editing of the runpath inside an 
>> executable, so are streets ahead of Linux here.
>
> Which breaks the (currently rather desirable) behaviour that you can  
> unpack our Coot packages anywhere you want and they will just work.

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'.

So this usage of rpath and $ORIGIN does not break the current
behaviour at all. On the contrary: it avoids problems with other
programs that might get called from within Coot and that would
currently inherit the LD_LIBRARY_PATH that is set in the coot wrapper
... since you don't need to set LD_LIBRAYR_PATH at all.

> I can see that might work well for people packaging Coot for a Linux  
> distro, where it will always be installed in the same place, but it  
> doesn't work for us.

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.

Cheers

Clemens

-- 

***************************************************************
* Clemens Vonrhein, Ph.D.     vonrhein AT GlobalPhasing DOT com
*
*  Global Phasing Ltd.
*  Sheraton House, Castle Park 
*  Cambridge CB3 0AX, UK
*--------------------------------------------------------------
* BUSTER Development Group      (http://www.globalphasing.com)
***************************************************************

Reply via email to