Skip to contentSkip to conversation

cpan.bbclass: adopt to recent EU::MM

PATCH In review Jens Rehsack 3 participants 5 messages Aug 22, 2018 – Aug 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cpan.bbclass: adopt to recent EU::MM

The modern the time, the improvements in ExtUtils::MakeMaker.

Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching.

Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ...

---
 meta/classes/cpan.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/classes/cpan.bbclass +1 -2
index 8e079e0d55..926c6358a6 100644
@@ -16,8 +16,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
 export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}/"
 
 cpan_do_configure () {
-	export PERL5LIB="${PERL_ARCHLIB}"
-	yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor ${EXTRA_CPANFLAGS}
+	yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 ${EXTRA_CPANFLAGS}
 
 	# Makefile.PLs can exit with success without generating a
 	# Makefile, e.g. in cases of missing configure time
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 libxml-parser-perl: fix "...contains bad RPATH"

The perl distribution "XML-Parser" relies for configuration on the tooling of Devel::CheckLib - which is not aware of sysroot locations nor of reasonable compiler/link definitions from outside.

This causes

ERROR: libxml-parser-perl-2.44-r0 do_package_qa: QA Issue: package libxml-parser-perl contains bad RPATH ${BUILDDIR}/tmp/work/core2-64-poky-linux/libxml-parser-perl/2.44-r0/recipe-sysroot/usr/lib in file ${BUILDDIR}/tmp/work/core2-64-poky-linux/libxml-parser-perl/2.44-r0/packages-split/libxml-parser-perl/usr/lib/perl/vendor_perl/5.24.4/auto/XML/Parser/Expat/Expat.so package libxml-parser-perl contains bad RPATH ${BUILDDIR}/tmp/work/core2-64-poky-linux/libxml-parser-perl/2.44-r0/recipe-sysroot/usr/lib in file ${BUILDDIR}/tmp/work/core2-64-poky-linux/libxml-parser-perl/2.44-r0/packages-split/libxml-parser-perl/usr/lib/perl/vendor_perl/5.24.4/auto/XML/Parser/Expat/Expat.so [rpaths]
ERROR: libxml-parser-perl-2.44-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: libxml-parser-perl-2.44-r0 do_package_qa: Function failed: do_package_qa

It's strongly encouraged to the maintainer @toddr to rework the toolchain for up to date environments.

---
 meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb +9 -1
index c5e0ae6769..4494e2286c 100644
@@ -18,8 +18,16 @@ inherit cpan ptest-perl
 
 # fix up sub MakeMaker project as arguments don't get propagated though
 # see https://rt.cpan.org/Public/Bug/Display.html?id=28632
+do_configure_append_class-target() {
+	sed -E \
+	    -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \
+	    -e 's:LD_RUN_PATH ?= ?"?[^"]*"?::g' \
+	    -i Makefile Expat/Makefile
+}
+
 do_configure_append() {
-	sed 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' -i Makefile Expat/Makefile
+	sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \
+	    -i Makefile Expat/Makefile
 	sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile
 	# make sure these two do not build in parallel
 	sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] libxml-parser-perl: fix "...contains bad RPATH"

Quoted 60 lines · Jens Rehsack

The perl distribution "XML-Parser" relies for configuration on the tooling of Devel::CheckLib - which is not aware of sysroot locations nor of reasonable compiler/link definitions from outside.

This causes

ERROR: libxml-parser-perl-2.44-r0 do_package_qa: QA Issue:
package libxml-parser-perl contains bad RPATH ${BUILDDIR}/tmp/work/core2-64-poky-linux/libxml-parser-perl/2.44- r0/recipe-sysroot/usr/lib in file ${BUILDDIR}/tmp/work/core2-64-poky- linux/libxml-parser-perl/2.44-r0/packages-split/libxml-parser- perl/usr/lib/perl/vendor_perl/5.24.4/auto/XML/Parser/Expat/Expat.so
package libxml-parser-perl contains bad RPATH
${BUILDDIR}/tmp/work/core2-64-poky-linux/libxml-parser-perl/2.44- r0/recipe-sysroot/usr/lib in file ${BUILDDIR}/tmp/work/core2-64-poky- linux/libxml-parser-perl/2.44-r0/packages-split/libxml-parser- perl/usr/lib/perl/vendor_perl/5.24.4/auto/XML/Parser/Expat/Expat.so [rpaths]
ERROR: libxml-parser-perl-2.44-r0 do_package_qa: QA run found
fatal errors. Please consider fixing them.
ERROR: libxml-parser-perl-2.44-r0 do_package_qa: Function failed:
do_package_qa

It's strongly encouraged to the maintainer @toddr to rework the toolchain for up to date environments.

---
 meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb | 10
+++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb +0 -0
index c5e0ae6769..4494e2286c 100644
@@ -18,8 +18,16 @@ inherit cpan ptest-perl
 
 # fix up sub MakeMaker project as arguments don't get propagated

though

 # see https://rt.cpan.org/Public/Bug/Display.html?id=28632
meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb +3 -0
+do_configure_append_class-target() {
+	sed -E \
+	    -e 's:-L${STAGING_LIBDIR}::g' -e 's:-

I${STAGING_INCDIR}::g' \

meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb +4 -1
+	    -e 's:LD_RUN_PATH ?= ?"?[^"]*"?::g' \
+	    -i Makefile Expat/Makefile
+}
+
 do_configure_append() {
-	sed 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET}

:g' -i Makefile Expat/Makefile

meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb +2 -1
+	sed -e 's:--sysroot=.*\(\s\|$\):
--sysroot=${STAGING_DIR_TARGET} :g' \
+	    -i Makefile Expat/Makefile
 	sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile
 	# make sure these two do not build in parallel
 	sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i
Quoted 1 line

Expat/Makefile

Sorry, this fails to build the nativesdk version:

https://autobuilder.yocto.io/builders/nightly-x86/builds/1261/steps/Building%20Toolchain%20Images/logs/stdio

I suspect you need to strip the RPATH in the nativesdk case...

Cheers,

Richard

#3 lore raw

Re: [PATCH 2/2] libxml-parser-perl: fix "...contains bad RPATH"

Quoted 6 lines · Richard Purdie

Sorry, this fails to build the nativesdk version:

https://autobuilder.yocto.io/builders/nightly-x86/builds/1261/steps/B
uilding%20Toolchain%20Images/logs/stdio

I suspect you need to strip the RPATH in the nativesdk case...

http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=master-next&id=3fc37317a78b19ce4eea10dad73a17186c68ff58

added to your patch 'fixes' it...

Cheers,

Richard

#4 lore raw
In reply to Jens Rehsack

Hi Jens

This patch has been pushed but its causing several recipes to break, I can confirm that with reverting this fix

Here is list

http://errors.yoctoproject.org/Errors/Build/66538/

IMO, this fix should be reverted and delayed until these regressions are fixed.

Quoted 38 lines · Jens Rehsack

The modern the time, the improvements in ExtUtils::MakeMaker.

Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching.

Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ...

---
 meta/classes/cpan.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/classes/cpan.bbclass +1 -3
index 8e079e0d55..926c6358a6 100644
@@ -16,8 +16,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
 export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}/"
 
 cpan_do_configure () {
-       export PERL5LIB="${PERL_ARCHLIB}"
-       yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor ${EXTRA_CPANFLAGS}
+       yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 ${EXTRA_CPANFLAGS}
 
        # Makefile.PLs can exit with success without generating a
        # Makefile, e.g. in cases of missing configure time
--

2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core