All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] RFC: Libtool and wrong rpath
@ 2010-05-17 20:43 Paulius Zaleckas
  2010-05-18 10:08 ` Lionel Landwerlin
  0 siblings, 1 reply; 2+ messages in thread
From: Paulius Zaleckas @ 2010-05-17 20:43 UTC (permalink / raw)
  To: buildroot

Hi,

I have noticed with strace that strange path is being probed by dynamic linker
on the target. This makes applications to start slower, since each library is 
probed with wrong path first!

Problem is that ELF dynamic section (readelf -d) has RPATH set to absolute path
of the satging dir on the host:

0x0000000f (RPATH)                      Library rpath: 
[/home/paulius/buildroot/output/build/staging_dir/usr/i386-unknown-linux-uclibc/lib]

I have put some simple script to discover ELF files with this WRONG path:

#!/bin/sh
for file in `find $@ -type f -executable`; do
	if [ -n "`file $file | grep ELF`" ]; then
		if [ -n "`readelf -d $file | grep staging`" ]; then
			echo $file
		fi
	fi
done

On my target directory it found 119 occurrences. Mostly X11 and GTK related.
The source of this problem seems to be buggy libtool script...
I failed to fix/identify libtool lines responsible for this, but I think we can
use chrpath utility to remove wrong RPATH from these executables.

If we use chrpath, then should we add package or require it from host?
I guess we will have to run it after all packages are installed?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-18 10:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 20:43 [Buildroot] RFC: Libtool and wrong rpath Paulius Zaleckas
2010-05-18 10:08 ` Lionel Landwerlin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.