check-rpaths, libtool, dlopen, loadable modules

Hans de Goede j.w.r.degoede at hhs.nl
Fri Nov 16 07:01:40 UTC 2007


Ray Strode wrote:
> Hi,
> 
> On Nov 15, 2007 7:40 PM, John Dennis <jdennis at redhat.com> wrote:
>> I have a package which builds loadable modules intended to be loaded by
>> dlopen and it's being rejected on x86_64 because check-rpaths is
>> complaining it's finding a RPATH in the loadable modules .so file. This
>> is for F8.
> Old versions of libtool have a bug where they don't consider
> /usr/lib64 to be a system library directory.  If the upstream tarball
> was dist'd on an older platform that could be why.
> 
> You could try blowing away the libtool shipped with the package,
> running autoreconf and libtoolize --force to get the F8 libtool.
> 

The package containing / using an older libtool is indeed probably the 
problem, using autoreconf and libtoolize --force, is not the solution I 
would advice though, esp. when the package is using older stuff as then 
this often will fail. In my experience the autoxxx stuff is best "left 
alone" (see the recent breaking of packages with the new intltool for 
packages which re autoconf-ed, but did not re-auto inittioolized for 
example).

The better way to fix this is to add the following two lines to your 
specfile after %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

As documented here:
http://fedoraproject.org/wiki/Packaging/Guidelines#head-7cea8c7aa96400a4687e843156354476434ff883

Regards,

Hans




More information about the fedora-devel-list mailing list