On 06/21/2010 04:38 PM, Jirka Hladky wrote:
Hello everybody!
I have run into rpath issue when creating rpm for hwloc (you might want to
check package review ticket at
https://bugzilla.redhat.com/show_bug.cgi?id=606498)
rpath is added by libtool. Libraries are getting installed into /usr/lib64 but
libtool does not recognize this as default library location on 64-bit system.
One solution was to add "/usr/lib64" directory into /etc/ld.so.conf.
Practical solution to get rpm was to add
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
into the %configure stage in rpm specs.
I would like to get rid of these sed lines.
For me it seems either that libtool is buggy or "/usr/lib64" directory is
missing in /etc/ld.so.conf.
I (together with upstream) would highly appreciate any feedback on it.
I think (although I admit that I am not an expert here) that if the
source uses a current version of libtool, it will just DTRT. I'm
guessing it was libtoolized with one of the older versions.
You might try overriding the bundled copy by passing
"LIBTOOL=/usr/bin/libtool" with every make invocation, which sometimes
just works.
I wouldn't recommend this in practice (as you'd then have BuildRequires:
libtool >= some.version), but it will give you an idea of whether I'm
right or not.
More often than not, there are other necessary changes to be made to the
autotooling in the sources to use the newer libtool, and I'm not the one
to help you with how to make those. :/
hth,
~spot