Skip to contentSkip to conversation

perl-native: Update for userelocatableinc and non-shared libperl

PATCH Applied Tom Rini 5 participants 11 messages Jan 28, 2011 – Feb 2, 2011

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 perl-native: Update for userelocatableinc and non-shared libperl

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

---
 meta/recipes-devtools/perl/perl-native_5.12.2.bb |   25 +++++++++++++--------
 1 files changed, 15 insertions(+), 10 deletions(-)
meta/recipes-devtools/perl/perl-native_5.12.2.bb +15 -10
index 14da569..a634da5 100644
@@ -4,8 +4,7 @@ SECTION = "libs"
 LICENSE = "Artistic|GPL"
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 		    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
-DEPENDS = "virtual/db-native gdbm-native"
-PR = "r2"
+PR = "r3"
 
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
                     file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
@@ -29,19 +28,21 @@ do_configure () {
 		-Dcflags="${CFLAGS}" \
 		-Dldflags="${LDFLAGS}" \
 		-Dcf_by="Open Embedded" \
+		\
 		-Dprefix=${prefix} \
 		-Dvendorprefix=${prefix} \
 		-Dvendorprefix=${prefix} \
 		-Dsiteprefix=${prefix} \
 		\
-		-Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
-		-Darchlib=${STAGING_LIBDIR}/perl/${PV} \
-		-Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
-		-Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
-		-Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
-		-Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
+		-Dprivlib=.../../lib/perl/${PV} \
+		-Darchlib=.../../lib/perl/${PV} \
+		-Dvendorlib=.../../lib/perl/${PV} \
+		-Dvendorarch=.../../lib/perl/${PV} \
+		-Dsitelib=.../../lib/perl/${PV} \
+		-Dsitearch=.../../lib/perl/${PV} \
+		-Duserelocatableinc="y" \
 		\
-		-Duseshrplib \
+		-Uuseshrplib \
 		-Dusethreads \
 		-Duseithreads \
 		-Duselargefiles \
@@ -89,8 +90,12 @@ do_install () {
 		install $i ${D}${libdir}/perl/${PV}/CORE
 	done
 
-	create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/5.12.2:${STAGING_LIBDIR}/perl/'
+	# Make sure we use /usr/bin/env perl
+	for PERLSCRIPT in `grep -rIEl '#!.*/perl' ${D}${bindir}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env perl|' $PERLSCRIPT
+	done
 }
+
 do_install_append_nylon() {
 	# get rid of definitions not supported by the gcc version we use for nylon...
 	for i in ${D}${libdir}/perl/${PV}/Config_heavy.pl ${D}${libdir}/perl/config.sh; do
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 15 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

---
 meta/recipes-devtools/perl/perl-native_5.12.2.bb |   25 +++++++++++++--------
 1 files changed, 15 insertions(+), 10 deletions(-)
meta/recipes-devtools/perl/perl-native_5.12.2.bb +0 -0
index 14da569..a634da5 100644

meta/recipes-devtools/perl/perl-native_5.12.2.bb SECTION = "libs" · line 7

Quoted 6 lines
meta/recipes-devtools/perl/perl-native_5.12.2.bb +1 -2
@@ -4,8 +4,7 @@ SECTION = "libs"
 LICENSE = "Artistic|GPL"
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 		    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
-DEPENDS = "virtual/db-native gdbm-native"
-PR = "r2"
+PR = "r3"

Dropping DEPENDS like this needs an explanation. I've happened to read the OE patch but could we add something here for the record please?

Cheers,

Richard

author
#2 lore raw
Quoted 11 lines · Richard Purdie
Quoted 10 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

---
  meta/recipes-devtools/perl/perl-native_5.12.2.bb |   25 +++++++++++++--------
  1 files changed, 15 insertions(+), 10 deletions(-)
Quoted 14 lines

meta/recipes-devtools/perl/perl-native_5.12.2.bb SECTION = "libs" · line 7

Quoted 11 lines
meta/recipes-devtools/perl/perl-native_5.12.2.bb +1 -2
index 14da569..a634da5 100644
@@ -4,8 +4,7 @@ SECTION = "libs"
  LICENSE = "Artistic|GPL"
  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
  		    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
-DEPENDS = "virtual/db-native gdbm-native"
-PR = "r2"
+PR = "r3"

Dropping DEPENDS like this needs an explanation. I've happened to read the OE patch but could we add something here for the record please?

Certainly. In the configure line there was already -Ui_db/ndbm/gdbm so these libraries weren't actually being used by perl (which is handy since in the OE case I then make autoconf/automake-native depend on this perl to fix some races).

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#3 lore raw
Quoted 27 lines · Tom Rini
Quoted 11 lines · Richard Purdie
Quoted 10 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

---
  meta/recipes-devtools/perl/perl-native_5.12.2.bb |   25 +++++++++++++--------
  1 files changed, 15 insertions(+), 10 deletions(-)
Quoted 14 lines

meta/recipes-devtools/perl/perl-native_5.12.2.bb SECTION = "libs" · line 7

Quoted 11 lines
meta/recipes-devtools/perl/perl-native_5.12.2.bb +1 -2
index 14da569..a634da5 100644
@@ -4,8 +4,7 @@ SECTION = "libs"
  LICENSE = "Artistic|GPL"
  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
  		    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
-DEPENDS = "virtual/db-native gdbm-native"
-PR = "r2"
+PR = "r3"

Dropping DEPENDS like this needs an explanation. I've happened to read the OE patch but could we add something here for the record please?

Quoted 4 lines

Certainly. In the configure line there was already -Ui_db/ndbm/gdbm so these libraries weren't actually being used by perl (which is handy since in the OE case I then make autoconf/automake-native depend on this perl to fix some races).

Merged to master, thanks.

Richard

#4 lore raw
In reply to Tom Rini

Op 28 jan 2011, om 22:07 heeft Tom Rini het volgende geschreven:

Quoted 4 lines

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

After this patch (but I haven't bisected it yet), libxml-parser-perl-native fails to build:

ERROR: Logfile of failure stored in: /OE/tentacle/build/tmp-angstrom_2010_x/work/x86_64-linux/libxml-parser-perl-native-2.36-r0/temp/log.do_populate_sysroot.10124
Log data follows:
| cp: cannot stat `/OE/tentacle/build/tmp-angstrom_2010_x/work/x86_64-linux/libxml-parser-perl-native-2.36-r0/image/OE/tentacle/build/tmp-angstrom_2010_x/sysroots/x86_64-linux/usr/bin/*': No such file or directory

This is due to staging.bbclass' way of checking to see wether the dir is empty or not. I my case it's not empty:

koen@dominion:/OE/tentacle$ ls /OE/tentacle/build/tmp-angstrom_2010_x/work/x86_64-linux/libxml-parser-perl-native-2.36-r0/image/OE/tentacle/build/tmp-angstrom_2010_x/sysroots/x86_64-linux/usr/bin/ -la
total 12
drwxr-xr-x 3 koen koen 4096 2011-01-31 21:55 ./
drwxr-xr-x 4 koen koen 4096 2011-01-31 21:55 ../
drwxr-xr-x 3 koen koen 4096 2011-01-31 21:55 ..ntacle/

So there are 2 bugs here:

1) staging.bbclass won't copy dotfiles
2) libxml-parser-perl-native puts part of the build path in ${D}${bindir}

regards,

Koen

#5 lore raw
In reply to Tom Rini
Quoted 6 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

perl fails do_compile with this patch, reverting it resolves the problem. The log.do_compile is available here (600k):

http://bugzilla.pokylinux.org/show_bug.cgi?id=691

Reads in part:

NOTE: make -e MAKEFLAGS= perl LD=ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/vol/1/dvhart/poky-1.git/build/tmp/sysroots/atom-pc
Perl cross-build directory is /vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/perl-5.12.2/Cross
Target arch is i586-linux
toolchain: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/vol/1/dvhart/poky-1.git/build/tmp/sysroots/atom-pc, ccache i586-poky-linux-g++ -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/vol/1/dvhart/poky-1.git/build/tmp/sysroots/atom-pc, ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/vol/1/dvhart/poky-1.git/build/tmp/sysroots/atom-pc, i586-poky-linux-strip, i586-poky-linux-ar, i586-poky-linux-ranlib
Optimizations: -fexpensive-optimizations -fomit-frame-pointer -O2
/vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/perl-5.12.2/Cross/generate_config_sh config.sh-i586-linux > /vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/perl-5.12.2/Cross/../config.sh
cd /vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/perl-5.12.2/Cross/.. ; ./Configure -S ; make depend ; make ; make more

Fetching answers from config.sh...

Doing variable substitutions on .SH files...
Extracting config.h (with variable substitutions)

...

make[1]: Entering directory `/vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/perl-5.12.2'

...

*** Module name IN: lib/Cwd.pm
*** Module name OUT: /vol/1/dvhart/poky-1.git/build/tmp/sysroots/x86_64-linux/usr/lib/perl/5.12.2/Cwd.pm
Can't undef active subroutine at /vol/1/dvhart/poky-1.git/build/tmp/sysroots/x86_64-linux/usr/lib/perl/5.12.2/Config_heavy.pl line 1343. Compilation failed in require at lib/Config.pm line 70.
Extracting pod2html (with variable substitutions)
make[1]: *** [pod/pod2html] Error 255
make[1]: Leaving directory `/vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/perl-5.12.2'
make: *** [perl] Error 2
FATAL: oe_runmake failed
Function 'do_compile' failed (see /vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/temp/log.do_compile.30564 for further information)
ERROR: Function 'do_compile' failed (see /vol/1/dvhart/poky-1.git/build/tmp/work/core2-poky-linux/perl-5.12.2-r0/temp/log.do_compile.30564 for further information)

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
author
#6 lore raw
Quoted 11 lines · Darren Hart
Quoted 6 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

perl fails do_compile with this patch, reverting it resolves the problem. The log.do_compile is available here (600k):

http://bugzilla.pokylinux.org/show_bug.cgi?id=691

Taken the bug. That'll teach me to short-circuit my testing when double posting patches...

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#7 lore raw
Quoted 9 lines · Tom Rini
Quoted 8 lines · Darren Hart
Quoted 6 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

Quoted 8 lines
Quoted 4 lines

perl fails do_compile with this patch, reverting it resolves the problem. The log.do_compile is available here (600k):

http://bugzilla.pokylinux.org/show_bug.cgi?id=691

Taken the bug. That'll teach me to short-circuit my testing when double posting patches...

I'll be happy to test patches to this as well as I am able to easily reproduce it (I expect others can too - but haven't yet heard of someone else hitting the exact same problem).

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#8 lore raw
Quoted 27 lines

-----Original Message-----
From: [email protected] [mailto:poky- [email protected]] On Behalf Of Darren Hart
Sent: Tuesday, February 01, 2011 7:38 AM
To: Tom Rini
Cc: [email protected]
Subject: Re: [poky] [PATCH] perl-native: Update for userelocatableinc and non-shared libperl

Quoted 7 lines · Tom Rini
Quoted 6 lines · Darren Hart
Quoted 5 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

perl fails do_compile with this patch, reverting it resolves the problem. The log.do_compile is available here (600k):

http://bugzilla.pokylinux.org/show_bug.cgi?id=691

Taken the bug. That'll teach me to short-circuit my testing when

Quoted 9 lines

double

Quoted 2 lines

posting patches...

I'll be happy to test patches to this as well as I am able to easily reproduce it (I expect others can too - but haven't yet heard of someone
else hitting the exact same problem).

I am able to reproduce this issue too. If needed I will be happy to help fix or test.

Thanks,
Nitin

Quoted 9 lines

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

author
#9 lore raw
Quoted 31 lines · Nitin A
Quoted 31 lines

-----Original Message-----
From: [email protected] [mailto:poky- [email protected]] On Behalf Of Darren Hart
Sent: Tuesday, February 01, 2011 7:38 AM
To: Tom Rini
Cc: [email protected]
Subject: Re: [poky] [PATCH] perl-native: Update for userelocatableinc and non-shared libperl

Quoted 7 lines · Tom Rini
Quoted 6 lines · Darren Hart
Quoted 5 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

perl fails do_compile with this patch, reverting it resolves the problem. The log.do_compile is available here (600k):

http://bugzilla.pokylinux.org/show_bug.cgi?id=691

Taken the bug. That'll teach me to short-circuit my testing when

double

Quoted 2 lines

posting patches...

Quoted 6 lines
Quoted 5 lines

I'll be happy to test patches to this as well as I am able to easily reproduce it (I expect others can too - but haven't yet heard of someone
else hitting the exact same problem).

I am able to reproduce this issue too. If needed I will be happy to help fix or test.

To give everyone a quick update, I've double checked and the way we configure perl 5.10.x (OE) and 5.12.x (poky) are the same, really. So I'm double checking now which part of the changes are breaking and if perhaps we need to instead of using the relative paths that work in 5.10.x using full paths and trusting userelocatableinc to work (and then verifying that it does work).

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#10 lore raw

FWIW, I'm seeing the same problem with lib*-perl-native in OE

Op 1 feb. 2011 om 18:00 heeft Tom Rini <[email protected]> het volgende geschreven:

Quoted 48 lines · Nitin A
Quoted 31 lines
Quoted 31 lines

-----Original Message-----
From: [email protected] [mailto:poky- [email protected]] On Behalf Of Darren Hart
Sent: Tuesday, February 01, 2011 7:38 AM
To: Tom Rini
Cc: [email protected]
Subject: Re: [poky] [PATCH] perl-native: Update for userelocatableinc and non-shared libperl

Quoted 7 lines · Tom Rini
Quoted 6 lines · Darren Hart
Quoted 5 lines · Tom Rini

Rather than using a wrapper switch to using upstreams support for relocation. While in here, bring in the mangling to use /usr/bin/env perl rather than /full/path/to in order to work in deep directory paths.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

perl fails do_compile with this patch, reverting it resolves the problem. The log.do_compile is available here (600k):

http://bugzilla.pokylinux.org/show_bug.cgi?id=691

Taken the bug. That'll teach me to short-circuit my testing when

double

Quoted 2 lines

posting patches...

Quoted 6 lines
Quoted 5 lines

I'll be happy to test patches to this as well as I am able to easily reproduce it (I expect others can too - but haven't yet heard of someone
else hitting the exact same problem).

I am able to reproduce this issue too. If needed I will be happy to help fix or test.

To give everyone a quick update, I've double checked and the way we configure perl 5.10.x (OE) and 5.12.x (poky) are the same, really. So I'm double checking now which part of the changes are breaking and if perhaps we need to instead of using the relative paths that work in 5.10.x using full paths and trusting userelocatableinc to work (and then verifying that it does work).

Signature · 6 lines
Tom Rini
Mentor Graphics Corporation
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky