Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] intltool: use built host libexpat during configure
@ 2011-09-06 19:10 Wade Berrier
  2011-09-06 21:24 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Wade Berrier @ 2011-09-06 19:10 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Wade Berrier <wberrier@gmail.com>
---
 package/intltool/intltool.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk
index 746ebb1..45b52ed 100644
--- a/package/intltool/intltool.mk
+++ b/package/intltool/intltool.mk
@@ -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))
-- 
1.7.0.4

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

* [Buildroot] [PATCH] intltool: use built host libexpat during configure
  2011-09-06 19:10 [Buildroot] [PATCH] intltool: use built host libexpat during configure Wade Berrier
@ 2011-09-06 21:24 ` Thomas Petazzoni
  2011-09-07 13:41   ` Wade Berrier
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2011-09-06 21:24 UTC (permalink / raw)
  To: buildroot

Hello,

Le Tue, 6 Sep 2011 13:10:23 -0600,
Wade Berrier <wberrier@gmail.com> a ?crit :

>  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

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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] intltool: use built host libexpat during configure
  2011-09-06 21:24 ` Thomas Petazzoni
@ 2011-09-07 13:41   ` Wade Berrier
  2011-09-07 14:11     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Wade Berrier @ 2011-09-07 13:41 UTC (permalink / raw)
  To: buildroot

Hi,

Thanks for the feedback; comments below.

On 09/06/2011 03:24 PM, Thomas Petazzoni wrote:
> Hello,
> 
> Le Tue, 6 Sep 2011 13:10:23 -0600,
> Wade Berrier <wberrier@gmail.com> a ?crit :
> 
>>  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
> 
> 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)

> 
> 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

Thanks again for the feedback,

Wade

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

* [Buildroot] [PATCH] intltool: use built host libexpat during configure
  2011-09-07 13:41   ` Wade Berrier
@ 2011-09-07 14:11     ` Thomas Petazzoni
  2011-09-09 15:40       ` Wade Berrier
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2011-09-07 14:11 UTC (permalink / raw)
  To: buildroot

Le Wed, 07 Sep 2011 07:41:03 -0600,
Wade Berrier <wberrier@gmail.com> a ?crit :

> 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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] intltool: use built host libexpat during configure
  2011-09-07 14:11     ` Thomas Petazzoni
@ 2011-09-09 15:40       ` Wade Berrier
  2011-09-12  6:52         ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Wade Berrier @ 2011-09-09 15:40 UTC (permalink / raw)
  To: buildroot

On 09/07/2011 08:11 AM, Thomas Petazzoni wrote:
> Le Wed, 07 Sep 2011 07:41:03 -0600,
> Wade Berrier <wberrier@gmail.com> a ?crit :
> 
>> 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 ?

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

> 
> Thomas

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

* [Buildroot] [PATCH] intltool: use built host libexpat during configure
  2011-09-09 15:40       ` Wade Berrier
@ 2011-09-12  6:52         ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2011-09-12  6:52 UTC (permalink / raw)
  To: buildroot

Hello Wade,

Le Fri, 09 Sep 2011 09:40:51 -0600,
Wade Berrier <wberrier@gmail.com> a ?crit :

> 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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2011-09-12  6:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06 19:10 [Buildroot] [PATCH] intltool: use built host libexpat during configure Wade Berrier
2011-09-06 21:24 ` Thomas Petazzoni
2011-09-07 13:41   ` Wade Berrier
2011-09-07 14:11     ` Thomas Petazzoni
2011-09-09 15:40       ` Wade Berrier
2011-09-12  6:52         ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox