Skip to contentSkip to conversation

intltool: use built host libexpat during configure

PATCH New Wade Berrier 2 participants 6 messages Sep 6, 2011 – Sep 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intltool: use built host libexpat during configure

Hello,

Adding this fix the build in one of my environments (rhel5). Otherwise, the configure check for the perl module failed.

Wade

set LD_LIBRARY_PATH during configure so libexpat is found when checking for XML::Parser

---
 package/intltool/intltool.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
package/intltool/intltool.mk +2 -1
index 746ebb1..45b52ed 100644
@@ -9,7 +9,8 @@ INTLTOOL_SITE:=http://ftp.acc.umu.se/pub/GNOME/sources/intltool/0.40/
 
 HOST_INTLTOOL_DEPENDENCIES = host-libxml-parser-perl
 HOST_INTLTOOL_CONF_OPT = \
-  PERLLIB=$(HOST_DIR)/usr/lib/perl
+  PERLLIB=$(HOST_DIR)/usr/lib/perl \
+  LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib
 
 $(eval $(call AUTOTARGETS,package,intltool))
 $(eval $(call AUTOTARGETS,package,intltool,host))
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 intltool: use built host libexpat during configure

Hello,

Le Tue, 6 Sep 2011 13:10:23 -0600,
Wade Berrier <[email protected]> a ?crit :

package/intltool/intltool.mk INTLTOOL_SITE:=http://ftp.acc.umu.se/pub/GNOME/sources/intltool/0.40/ · line 13

Quoted 5 lines

HOST_INTLTOOL_DEPENDENCIES = host-libxml-parser-perl HOST_INTLTOOL_CONF_OPT = \

package/intltool/intltool.mk +2 -1
-  PERLLIB=$(HOST_DIR)/usr/lib/perl
+  PERLLIB=$(HOST_DIR)/usr/lib/perl \
+  LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib

Could you give some more details about the problem you're having?

There may well be a problem, but I don't really like the LD_LIBRARY_PATH solution, because the solution we have chosen to allow binaries installed in $(HOST_DIR) to find their libraries is to use the rpath mechanism, not to use LD_LIBRARY_PATH. I'd prefer to stick to this mechanism.

So we just need to figure out which host binary has been compiled without the correct rpath.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 intltool: use built host libexpat during configure

Hi,

Thanks for the feedback; comments below.

Quoted 5 lines · Thomas Petazzoni

Hello,

Le Tue, 6 Sep 2011 13:10:23 -0600,
Wade Berrier <[email protected]> a ?crit :

Quoted 7 lines

package/intltool/intltool.mk INTLTOOL_SITE:=http://ftp.acc.umu.se/pub/GNOME/sources/intltool/0.40/ · line 13

Quoted 5 lines

HOST_INTLTOOL_DEPENDENCIES = host-libxml-parser-perl HOST_INTLTOOL_CONF_OPT = \

package/intltool/intltool.mk +2 -1
-  PERLLIB=$(HOST_DIR)/usr/lib/perl
+  PERLLIB=$(HOST_DIR)/usr/lib/perl \
+  LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib

Could you give some more details about the problem you're having?

Configure gives this:

checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.8.8
checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool
make: *** [/home/wberrier/wa/git/buildroot/output/build/host-intltool-0.40.6/.stamp_configured] Error 1

Running the command that configure is running gives:

[wberrier at localhost]$ PERLLIB=/home/wberrier/wa/git/buildroot/output/host/usr/lib/perl perl -e "require XML::Parser"
Can't load '/home/wberrier/wa/git/buildroot/output/host/usr/lib/perl/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: libexpat.so.1: cannot open shared object
file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.
at
/home/wberrier/wa/git/buildroot/output/host/usr/lib/perl/XML/Parser.pm
line 14
Compilation failed in require at /home/wberrier/wa/git/buildroot/output/host/usr/lib/perl/XML/Parser.pm
line 14.
BEGIN failed--compilation aborted at /home/wberrier/wa/git/buildroot/output/host/usr/lib/perl/XML/Parser.pm
line 18.
Compilation failed in require at -e line 1.

This is with an older snapshot of buildroot (2010.02). I didn't have this problem when building on ubuntu 11.04, only rhel5.

So, am I correct when guessing the culprit is Expat.so? (missing rpath to libexpat.so.1)

Quoted 7 lines

There may well be a problem, but I don't really like the LD_LIBRARY_PATH solution, because the solution we have chosen to allow binaries installed in $(HOST_DIR) to find their libraries is to use the rpath mechanism, not to use LD_LIBRARY_PATH. I'd prefer to stick to this mechanism.

Quoted 6 lines

So we just need to figure out which host binary has been compiled without the correct rpath.

Thanks!

Thomas

Thanks again for the feedback,

Wade

#3 lore raw

PATCH 1/1 intltool: use built host libexpat during configure

Le Wed, 07 Sep 2011 07:41:03 -0600,
Wade Berrier <[email protected]> a ?crit :

Quoted 2 lines

So, am I correct when guessing the culprit is Expat.so? (missing rpath to libexpat.so.1)

Well, here Expat.so has a correct rpath:

$ readelf -d output/host/usr/lib/perl/auto/XML/Parser/Expat/Expat.so | grep RPATH
 0x000000000000000f (RPATH)              Library rpath: [/home/thomas/projets/buildroot/output/host/usr/lib]

Can you check the output of the same command for Expat.so ?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 1/1 intltool: use built host libexpat during configure

Quoted 6 lines · Thomas Petazzoni

Le Wed, 07 Sep 2011 07:41:03 -0600,
Wade Berrier <[email protected]> a ?crit :

Quoted 2 lines

So, am I correct when guessing the culprit is Expat.so? (missing rpath to libexpat.so.1)

Quoted 6 lines

Well, here Expat.so has a correct rpath:

$ readelf -d output/host/usr/lib/perl/auto/XML/Parser/Expat/Expat.so | grep RPATH
 0x000000000000000f (RPATH)              Library rpath: [/home/thomas/projets/buildroot/output/host/usr/lib]

Can you check the output of the same command for Expat.so ?

Running this command on my older (2010.02) version of buildroot doesn't have an rpath. So it looks like it was already fixed. Sorry for the noise :(

At some point I'll get the ngrep package cleaned up and resubmit.

Thanks for the feedback and the help.

Wade

Quoted 2 lines

Thomas

#5 lore raw

PATCH 1/1 intltool: use built host libexpat during configure

Hello Wade,

Le Fri, 09 Sep 2011 09:40:51 -0600,
Wade Berrier <[email protected]> a ?crit :

Quoted 3 lines

Running this command on my older (2010.02) version of buildroot doesn't have an rpath. So it looks like it was already fixed. Sorry for the noise :(

The logic that makes sure that an rpath is added to host binaries has been added in 4fdecac9d692b8d6f071ba6ad938b6ad68b675fd in July 2010.

It would be great if you could try with a newer version on RHEL5, because I'm not sure many of us test this distribution, even though it is a quite common one in corporate environments. So we're definitely interested in bug reports, but of course on modern Buildroot versions.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com