Patchwork Host libxml-parser-perl build issue

login
register
mail settings
Submitter Will Newton
Date March 26, 2012, 4:35 p.m.
Message ID <CAFbHwiSJuD+cJRiiLRWM9siAmuCvSBH+25DTS_0CPgN3WxSbLA@mail.gmail.com>
Download mbox | patch
Permalink /patch/148777/
State Rejected
Headers show

Comments

Will Newton - March 26, 2012, 4:35 p.m.
Hi all,

I have a build failure building avahi on a CentOS 5 system (old, but
not ancient) which is caused by the configure script failing to load
the XML::Parser perl module. buildroot has built a host version of
libxml-parser-perl and also a host version of expat, but the configure
for avahi is still failing. The reason for this appears to be that
perl cannot find libexpat.so, presumably because it is not in the
shared library search path. The attached patch fixes it but seems like
quite a far-reaching change, does anybody have any opinions on it?

Thanks,
diff --git a/package/Makefile.in b/package/Makefile.in
index dc8d038..3ac7505 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -193,10 +193,12 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
 		LDFLAGS="$(TARGET_LDFLAGS)" \
 		FCFLAGS="$(TARGET_FCFLAGS)" \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl" \
 		STAGING_DIR="$(STAGING_DIR)"
 
 TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl"
 
 HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
Thomas Petazzoni - March 26, 2012, 5:22 p.m.
Hello,

Le Mon, 26 Mar 2012 17:35:29 +0100,
Will Newton <will.newton@gmail.com> a écrit :

> I have a build failure building avahi on a CentOS 5 system (old, but
> not ancient) which is caused by the configure script failing to load
> the XML::Parser perl module.

I guess it looks like:
http://autobuild.buildroot.org/results/4a9ad56f4690d6958164fac72bce8b97db6d2356/build-end.log

Correct?

If so, do you have Perl to the target enabled in your configuration?

Regards,

Thomas
Will Newton - March 26, 2012, 5:54 p.m.
On Mon, Mar 26, 2012 at 6:22 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:

Hi Thomas,

> Hello,
>
> Le Mon, 26 Mar 2012 17:35:29 +0100,
> Will Newton <will.newton@gmail.com> a écrit :
>
>> I have a build failure building avahi on a CentOS 5 system (old, but
>> not ancient) which is caused by the configure script failing to load
>> the XML::Parser perl module.
>
> I guess it looks like:
> http://autobuild.buildroot.org/results/4a9ad56f4690d6958164fac72bce8b97db6d2356/build-end.log
>
> Correct?

Yes, that's what it looks like. I can get a full log of build output
when I am back in the office.

> If so, do you have Perl to the target enabled in your configuration?

No, the only perl stuff being built is for host tool dependencies.
Thomas Petazzoni - March 26, 2012, 7:06 p.m.
Le Mon, 26 Mar 2012 18:54:11 +0100,
Will Newton <will.newton@gmail.com> a écrit :

> Yes, that's what it looks like. I can get a full log of build output
> when I am back in the office.

Ok.

> > If so, do you have Perl to the target enabled in your configuration?
> 
> No, the only perl stuff being built is for host tool dependencies.

Ah, ah, strange. So far, our conclusion was that this issue was related
to the selection of Perl for the target. At least that's what we can
conclude from the build tests visible at http://autobuild.buildroot.net.

So definitely, having your .config + build log would be interesting.

Regards,

Thomas
Will Newton - March 27, 2012, 10:21 a.m.
On Mon, Mar 26, 2012 at 8:06 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Mon, 26 Mar 2012 18:54:11 +0100,
> Will Newton <will.newton@gmail.com> a écrit :
>
>> Yes, that's what it looks like. I can get a full log of build output
>> when I am back in the office.
>
> Ok.
>
>> > If so, do you have Perl to the target enabled in your configuration?
>>
>> No, the only perl stuff being built is for host tool dependencies.
>
> Ah, ah, strange. So far, our conclusion was that this issue was related
> to the selection of Perl for the target. At least that's what we can
> conclude from the build tests visible at http://autobuild.buildroot.net.
>
> So definitely, having your .config + build log would be interesting.

Attached is the config and build log (only the last part as I forgot
to tee to a file!). The host system has the following installed:

[win@lemeta01 buildroot]$ rpm -q expat
expat-1.95.8-8.3.el5_5.3
expat-1.95.8-8.3.el5_5.3
[win@lemeta01 buildroot]$ rpm -q perl
perl-5.8.8-32.el5_5.2

I get a failure when I try and load XML::Parser without LD_LIBRARY_PATH set:

[win@lemeta01 buildroot]$ PERLLIB=./output/host/usr/lib /usr/bin/perl
-e "require XML::Parser"
Can't locate XML/Parser.pm in @INC (@INC contains:
./output/host/usr/lib
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8
.) at -e line 1.
[win@lemeta01 buildroot]$ PERLLIB=./output/host/usr/lib/perl
/usr/bin/perl -e "require XML::Parser"
Can't load './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/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line
230.
 at output/host/usr/lib/perl/XML/Parser.pm line 14
Compilation failed in require at output/host/usr/lib/perl/XML/Parser.pm line 14.
BEGIN failed--compilation aborted at
output/host/usr/lib/perl/XML/Parser.pm line 18.
Compilation failed in require at -e line 1.
[win@lemeta01 buildroot]$ PERLLIB=./output/host/usr/lib/perl
LD_LIBRARY_PATH=./output/host/usr/lib /usr/bin/perl -e "require
XML::Parser"

Patch

diff --git a/package/Makefile.in b/package/Makefile.in
index dc8d038..3ac7505 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -193,10 +193,12 @@  TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
 		LDFLAGS="$(TARGET_LDFLAGS)" \
 		FCFLAGS="$(TARGET_FCFLAGS)" \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl" \
 		STAGING_DIR="$(STAGING_DIR)"

 TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl"

 HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \