On Thu, 28 May 2009 23:45:24 -0500 Johan Hattne <[email protected]> wrote:
> On 05/27/09 17:28, Matt Harrington wrote: > > > I'm building an RPM from this: > > > > http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/coot-0.5.2-binary-Linux-x86_64-centos-5-gtk2.tar.gz > > > > and rpmbuild fails because of invalid RPATHs: > > <snip/> > > > I can circumvent this error by building like this: > > > > QA_RPATHS=$[ 0x0001|0x0002 ] rpmbuild -ba coot.spec > > > > However, I was wondering if there's a better way than to just ignore > > this. Perhaps RPATHs could be removed entirely from the upstream > > build? > > Couldn't this, perhaps, be fixed using for instance chrpath > (disclaimer: I've never used it myself)? I suppose even if the > rpaths were removed by upstream, your problem wouldn't go away. > > I am by no means an expert in these issues, but I firmly believe in > correct rpaths, or runpaths, or install_names, or whatever they're > called. IMHO, subsequent attempts at mending dynamic linking using > LD_LIBRARY_PATH and friends often yield situations which could make > grown men cry. > rpath and LD_LIBRARY_PATH are both Evil Things that need to die a horrible, painful death. Libraries should go in a standard, non-hard-coded location or use a custom config file in /etc/ld.so.conf.d/ or whatever your *nix flavor uses. Full stop. Both debian and fedora/RH either strictly forbid it or give you evil stares. I'm not sure if this will help: http://www.stanford.edu/~fenn/packs/coot-0.5.2-3.fc11.src.rpm but you'll need the dependencies as well (which distribution are you using?) or tweak the spec file like so: %configure sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool HTH, -Tim -- --------------------------------------------------------- Tim Fenn [email protected] Stanford University, School of Medicine James H. Clark Center 318 Campus Drive, Room E300 Stanford, CA 94305-5432 Phone: (650) 736-1714 FAX: (650) 736-1961 ---------------------------------------------------------
