[Buildroot] RFC: Libtool and wrong rpath
paulius.zaleckas at gmail.com
Mon May 17 20:43:23 UTC 2010
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:
I have put some simple script to discover ELF files with this WRONG path:
for file in `find $@ -type f -executable`; do
if [ -n "`file $file | grep ELF`" ]; then
if [ -n "`readelf -d $file | grep staging`" ]; then
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?
More information about the buildroot