On Tuesday, June 22, 2010 12:20:40 am Tom "spot" Callaway wrote:
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
Hi Tom,
I gave it a try
=====================================================
export LIBTOOL=/usr/bin/libtool
./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --
target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --
localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --
infodir=/usr/share/info
$make
$chrpath utils/.libs/lstopo
utils/.libs/lstopo: RPATH=/usr/lib64
=====================================================
but it didn't help.
Mamoru is right. His solution is working!
Thanks a lot!
Jirka