Skip to contentSkip to conversation

PERL5LIB not properly reflecting target_sdk_dir

PATCH In review Joseph Andrew de la Peña 5 participants 10 messages Oct 3, 2014 – Nov 20, 2014

lore
Share & tools
lore
#0 lore raw

Good day Yocto Dev community,

I have seen a problem in SDK installation where PERL5LIB does not reflect vendor_perl location.
I have specified SDK installtion path as /bonus/scratch/sdk. Yet when I executed -V no vendor_perl is included in PERL5LIB.

perl -V

@INC:
/bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

Can someone shed some light on how to include target sdk path's vendor_perl for @INC? I'm expecting just like the default sdk installation path, it included vendor_perl and site_perl in the PERL5LIB.

Thanks,
Joseph

#1 lore raw

anyone?

Quoted 33 lines · Joseph Andrew de la Peña

Good day Yocto Dev community,

I have seen a problem in SDK installation where PERL5LIB does not reflect vendor_perl location.
I have specified SDK installtion path as /bonus/scratch/sdk. Yet when I executed -V no vendor_perl is included in PERL5LIB.

perl -V

@INC:
/bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

Can someone shed some light on how to include target sdk path's vendor_perl for @INC? I'm expecting just like the default sdk installation path, it included vendor_perl and site_perl in the PERL5LIB.

Thanks,
Joseph

#2 lore raw

Dear Joseph Andrew de la Peña,

Quoted 2 lines · In message <CAJrRHk4Q_bnrv2g1Kup9BTJj9gVMufKmSLtmBx8K5hmp7mE+PQ@mail.gmail.com>…

anyone?

I confirm the problem.

Quoted 4 lines
Quoted 4 lines

I have seen a problem in SDK installation where PERL5LIB does not reflect vendor_perl location.
I have specified SDK installtion path as /bonus/scratch/sdk. Yet when I executed -V no vendor_perl is included in PERL5LIB.

To be more precise, PERL5LIB is not set in the environment, and the installation routine cannot fix the built-in strings in the perl binary.

Quoted 5 lines
Quoted 5 lines

@INC:
/bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

Quoted 8 lines
Quoted 8 lines

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

As you can see, even though you install into a non-standard directory (/bonus/scratch/sdk), perl still references the built-in path (/opt/sdk/...).

The problem is present in all versions of Yocto, up to and including the upcoming 1.7.

I've opened a bug for it, see
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6890

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
"You know, after a woman's raised a family and so on,  she  wants  to
start living her own life."   "Whose life she's _been_ living, then?"
                                  - Terry Pratchett, _Witches Abroad_
#3 lore raw

Good day Wolfgang,

Thank you for helping me with this. I have seen the bug report. Hopefully we get a resolution soon.

- Joseph

Quoted 60 lines · Wolfgang Denk

Dear Joseph Andrew de la Peña,

In message < CAJrRHk4Q_bnrv2g1Kup9BTJj9gVMufKmSLtmBx8K5hmp7mE+PQ@mail.gmail.com> you

Quoted 2 lines · wrote:

anyone?

I confirm the problem.

Quoted 1 line
Quoted 1 line

I have seen a problem in SDK installation where PERL5LIB does not

reflect

Quoted 3 lines
Quoted 3 lines

vendor_perl location.
I have specified SDK installtion path as /bonus/scratch/sdk. Yet when I executed -V no vendor_perl is included in PERL5LIB.

To be more precise, PERL5LIB is not set in the environment, and the installation routine cannot fix the built-in strings in the perl binary.

Quoted 6 lines
Quoted 6 lines

@INC:
/bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl /bonus/scratch/sdk/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3/

Quoted 1 line
Quoted 1 line

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/site_perl/5.14.3

Quoted 2 lines
Quoted 2 lines

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3/

Quoted 1 line
Quoted 1 line

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/vendor_perl/5.14.3

Quoted 3 lines
Quoted 3 lines

/opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3/ /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3 /opt/sdk/1.5.1/sysroots/i686-pokysdk-linux//usr/lib/perl/5.14.3

As you can see, even though you install into a non-standard directory (/bonus/scratch/sdk), perl still references the built-in path (/opt/sdk/...).

The problem is present in all versions of Yocto, up to and including the upcoming 1.7.

I've opened a bug for it, see
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6890

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] "You know, after a woman's raised a family and so on, she wants to
start living her own life." "Whose life she's _been_ living, then?"
- Terry Pratchett, _Witches Abroad_

#4 lore raw

PATCH 1/1 Perl: fix PERL5LIB settings

In reply to Wolfgang Denk

The PERL5LIB settings in the perl wrapper script did not include the "site_perl" or "vendor_perl" directories, which caused some errors.

See https://bugzilla.yoctoproject.org/show_bug.cgi?id=6890

---
 meta/recipes-devtools/perl/perl-native_5.14.3.bb | 4 ++--
 meta/recipes-devtools/perl/perl_5.14.3.bb        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/perl/perl-native_5.14.3.bb +2 -2
index c9ec2d2..8ea7ddb 100644
@@ -101,8 +101,8 @@ do_install () {
 		install $i ${D}${libdir}/perl/${PV}/CORE
 	done
 
-	create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
-	create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
+	create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
+	create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
 }
 
 SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
meta/recipes-devtools/perl/perl_5.14.3.bb +1 -1
index 1e14e17..7ea2c99 100644
@@ -215,7 +215,7 @@ do_install() {
 
 do_install_append_class-nativesdk () {
         create_wrapper ${D}${bindir}/perl \
-            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}'
 }
 
 PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
Signature · 1 line
1.8.3.1
#5 lore raw

Re: [PATCH] Perl: fix PERL5LIB settings

Hi Wolfgang,

Quoted 4 lines · Wolfgang Denk
 meta/recipes-devtools/perl/perl-native_5.14.3.bb | 4 ++--
 meta/recipes-devtools/perl/perl_5.14.3.bb        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Perl was upgraded to 5.20.0 in July, can you rebase and verify that this is still required?

Ross

#6 lore raw

Re: [PATCH] Perl: fix PERL5LIB settings

Am 07.11.2014 um 12:55 schrieb Burton, Ross <[email protected]>:

Quoted 8 lines

Hi Wolfgang,

On 5 November 2014 19:29, Wolfgang Denk <[email protected]> wrote:

 meta/recipes-devtools/perl/perl-native_5.14.3.bb | 4 ++--
 meta/recipes-devtools/perl/perl_5.14.3.bb        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Perl was upgraded to 5.20.0 in July, can you rebase and verify that this is still required?

I can finally confirm that it fixes the issues in daisy (bitbaking Dancer2 using https://github.com/rehsack/meta-cpan/tree/master/recipes-www/dancer2-perl).
You can try whether Dancer2 bitbakes for dizzy and/or master to verify - for me it's impossible to create a dizzy build - to many daisy adoptions and release pressure for next weeks. If you know someone having dizzy - bitbake Dancer2, Unix::Statgrab or alike to prove ...

Cheers

Signature · 2 lines
Jens Rehsack
[email protected]
#7 lore raw

PATCH 1/1 Perl: fix PERL5LIB settings

Hi Richard,

I've seen you sent a patch for Yocto for https://bugzilla.yoctoproject.org/show_bug.cgi?id=6890 which seems to me (compared to Wolfgang's Patch) incomplete and shows another issue ^^.

1st - Wolfgang's Patch also fixes the native-perl, which is important when having a native module requiring another native-module which isn't core... Think about taking the entire fix from Wolfgang (https://www.mail-archive.com/[email protected]/msg21489.html) and also patch daisy.

2nd: See https://github.com/rdm-dev/poky/commit/d58539e94126019126565e7e76f406f0d4975a0e for some other Perl quirks when using CPAN modules ...

3rd: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/perl/perl-native_5.20.0.bb?id=6839a39912d483c6a403bd52e5f889547f1f4807#n10 - compare to $(corelist -a Module::Build) - there is no Module::Build in 5.20 anymore.

Maybe a look to 5.20.1 is also recommended: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod

Anfang der weitergeleiteten Nachricht:

Quoted 16 lines

Von: Jens Rehsack <[email protected]>
Betreff: Aw: [yocto] [PATCH] Perl: fix PERL5LIB settings
Datum: 8. November 2014 13:47:01 MEZ
An: "Burton, Ross" <[email protected]>
Kopie: Wolfgang Denk <[email protected]>, "[email protected]" <[email protected]>

Am 07.11.2014 um 12:55 schrieb Burton, Ross <[email protected]>:

Quoted 7 lines

Hi Wolfgang,

On 5 November 2014 19:29, Wolfgang Denk <[email protected]> wrote:
meta/recipes-devtools/perl/perl-native_5.14.3.bb | 4 ++--
meta/recipes-devtools/perl/perl_5.14.3.bb | 2 +-

2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 5 lines
Quoted 1 line

Perl was upgraded to 5.20.0 in July, can you rebase and verify that this is still required?

I can finally confirm that it fixes the issues in daisy (bitbaking Dancer2 using https://github.com/rehsack/meta-cpan/tree/master/recipes-www/dancer2-perl).
You can try whether Dancer2 bitbakes for dizzy and/or master to verify - for me it's impossible to create a dizzy build - to many daisy adoptions and release pressure for next weeks. If you know someone having dizzy - bitbake Dancer2, Unix::Statgrab or alike to prove ...

Cheers

Signature · 2 lines
Jens Rehsack
[email protected]
#8 lore raw

Re: [PATCH] Perl: fix PERL5LIB settings

Hi,

Quoted 4 lines · Jens Rehsack

I've seen you sent a patch for Yocto for
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6890 which seems to me (compared to Wolfgang's Patch) incomplete and shows another issue ^^.

Aníbal sent a patch for this, I merged it.

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6839a39912d483c6a403bd52e5f889547f1f4807

I agree that there is a missing -native part, I've replied separately to that patch thread about why that patch was at risk of getting lost.

Quoted 2 lines

1st - Wolfgang's Patch also fixes the native-perl, which is important when having a native module requiring another native-module which isn't core... Think about taking the entire fix from Wolfgang (https://www.mail-archive.com/[email protected]/msg21489.html) and also patch daisy.

Firstly, we *need* to fix master. We can then consider backports to previous releases, sounds like we need this for dizzy and daisy in this case.

Quoted 1 line

2nd: See https://github.com/rdm-dev/poky/commit/d58539e94126019126565e7e76f406f0d4975a0e for some other Perl quirks when using CPAN modules ...

This does look exactly like the kind of fixes the perl recipe could use. Unfortunately the format of the mail and where it was sent to has meant it has fallen through the cracks. If it went to the openembedded-core mailing list, it would have had less chance of that. It does need some tweaks as per
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
in particular the subject should start "cpan*:".

I am a little puzzled why the --install_path pieces are removed and a little more detail in the commit message might help there. If you could do that, great. If not, please just say so and we'll have to see what else we can do but I'll try and ensure it doesn't get lost.

Quoted 1 line

3rd: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/perl/perl-native_5.20.0.bb?id=6839a39912d483c6a403bd52e5f889547f1f4807#n10 - compare to $(corelist -a Module::Build) - there is no Module::Build in 5.20 anymore.

The PROVIDES += "libmodule-build-perl-native" is probably there to mean that recipes which "DEPEND" on that continued to work. Ideally, it sounds like we should try and remove that.

Quoted 1 line

Maybe a look to 5.20.1 is also recommended: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod

I'd be very happy to see that upgrade FWIW. I think part of the problem is we don't have a good set of automated perl tests (be it building perl modules, or testing the perl runtime). The problem isn't with perl itself, its just us interfacing to the tests that exist there and knowing for example which set of say 5 modules would test the widest range of ways of building perl modules. Any help with those things would be much appreciated.

Cheers,

Richard

#9 lore raw

Re: [PATCH] Perl: fix PERL5LIB settings

In reply to Jens Rehsack
Quoted 9 lines · Jens Rehsack

Am 07.11.2014 um 12:55 schrieb Burton, Ross <[email protected]>:

Quoted 7 lines

Hi Wolfgang,

On 5 November 2014 19:29, Wolfgang Denk <[email protected]> wrote:

 meta/recipes-devtools/perl/perl-native_5.14.3.bb | 4 ++--
 meta/recipes-devtools/perl/perl_5.14.3.bb        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 5 lines
Quoted 1 line

Perl was upgraded to 5.20.0 in July, can you rebase and verify that this is still required?

I can finally confirm that it fixes the issues in daisy (bitbaking Dancer2 using https://github.com/rehsack/meta-cpan/tree/master/recipes-www/dancer2-perl).
You can try whether Dancer2 bitbakes for dizzy and/or master to verify - for me it's impossible to create a dizzy build - to many daisy adoptions and release pressure for next weeks. If you know someone having dizzy - bitbake Dancer2, Unix::Statgrab or alike to prove ...

I was asked why this patch hasn't gone in. I agree there is a problem here which needs fixing. The trouble is that it doesn't easily apply to master, we don't have many perl experts to review this and patches against oe-core really need to go to the openembedded-core mailing list.

I believe Aníbal did fix part of the problem with:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6839a39912d483c6a403bd52e5f889547f1f4807

which leaves the perl-native part. I don't normally do this however I've updated the remaining part of the patch to apply against master and included it in master-next since I hate to see things getting lost.

Cheers,

Richard