Patchwork [1/1] perl: fix @INC

login
register
mail settings
Submitter Kang Kai
Date Oct. 9, 2012, 8:32 a.m.
Message ID <5638b12dc40290cff09fc211d14b472ef7c2c8c0.1349770454.git.kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/37983/
State New
Headers show

Comments

Kang Kai - Oct. 9, 2012, 8:32 a.m.
perl @INC path includes native perl modules path. When run "perl -V",
the output at the end is something like:
  @INC:
    /etc/perl
    /usr/lib/perl/site_perl/5.14.2/
    /usr/lib/perl/site_perl/5.14.2
    /usr/lib/perl/vendor_perl/5.14.2/
    /usr/lib/perl/vendor_perl/5.14.2
    /mnt/sda10/poky-all-platform/build-qemuppc/tmp/sysroots/qemuppc/usr/lib/perl/5.14.2/
    /usr/lib/perl/5.14.2
    /usr/local/lib/site_perl
    /usr/lib/perl/5.14.2
    .

And this is caused by commit aeca6512f3a5468b8f65e2986024ab07d2ce45b4.
Because the native path is compiled into libperl.so that sed in
perl_package_preprocess() could NOT remove it. So revert the commit.

[Yocto #3099]

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Richard Purdie - Oct. 9, 2012, 1:10 p.m.
On Tue, 2012-10-09 at 16:32 +0800, Kang Kai wrote:
> perl @INC path includes native perl modules path. When run "perl -V",
> the output at the end is something like:
>   @INC:
>     /etc/perl
>     /usr/lib/perl/site_perl/5.14.2/
>     /usr/lib/perl/site_perl/5.14.2
>     /usr/lib/perl/vendor_perl/5.14.2/
>     /usr/lib/perl/vendor_perl/5.14.2
>     /mnt/sda10/poky-all-platform/build-qemuppc/tmp/sysroots/qemuppc/usr/lib/perl/5.14.2/
>     /usr/lib/perl/5.14.2
>     /usr/local/lib/site_perl
>     /usr/lib/perl/5.14.2
>     .
> 
> And this is caused by commit aeca6512f3a5468b8f65e2986024ab07d2ce45b4.
> Because the native path is compiled into libperl.so that sed in
> perl_package_preprocess() could NOT remove it. So revert the commit.
> 
> [Yocto #3099]
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> index 0d4ca1c..dbfabb5 100644
> --- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> +++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> @@ -68,7 +68,7 @@ api_version='14'
>  api_versionstring='5.14.0'
>  ar='ar'
>  archlib='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> -archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> +archlibexp='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
>  archname64=''
>  archname='@ARCH@-thread-multi'
>  archobjs=''

I dislike fixing one bug at the expense of breaking another.

Tom,

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

Any comments on this? How could we test the issue you originally fixed?

Cheers,

Richard
Tom Zanussi - Oct. 9, 2012, 2:12 p.m.
On Tue, 2012-10-09 at 14:10 +0100, Richard Purdie wrote:
> On Tue, 2012-10-09 at 16:32 +0800, Kang Kai wrote:
> > perl @INC path includes native perl modules path. When run "perl -V",
> > the output at the end is something like:
> >   @INC:
> >     /etc/perl
> >     /usr/lib/perl/site_perl/5.14.2/
> >     /usr/lib/perl/site_perl/5.14.2
> >     /usr/lib/perl/vendor_perl/5.14.2/
> >     /usr/lib/perl/vendor_perl/5.14.2
> >     /mnt/sda10/poky-all-platform/build-qemuppc/tmp/sysroots/qemuppc/usr/lib/perl/5.14.2/
> >     /usr/lib/perl/5.14.2
> >     /usr/local/lib/site_perl
> >     /usr/lib/perl/5.14.2
> >     .
> > 
> > And this is caused by commit aeca6512f3a5468b8f65e2986024ab07d2ce45b4.
> > Because the native path is compiled into libperl.so that sed in
> > perl_package_preprocess() could NOT remove it. So revert the commit.
> > 
> > [Yocto #3099]
> > 
> > Signed-off-by: Kang Kai <kai.kang@windriver.com>
> > ---
> >  meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> > index 0d4ca1c..dbfabb5 100644
> > --- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> > +++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> > @@ -68,7 +68,7 @@ api_version='14'
> >  api_versionstring='5.14.0'
> >  ar='ar'
> >  archlib='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> > -archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> > +archlibexp='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> >  archname64=''
> >  archname='@ARCH@-thread-multi'
> >  archobjs=''
> 
> I dislike fixing one bug at the expense of breaking another.
> 
> Tom,
> 
> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=aeca6512f3a5468b8f65e2986024ab07d2ce45b4
> 
> Any comments on this? How could we test the issue you originally fixed?
> 

The original purpose of that commit was to allow the perf build to use
ExtUtils::Embed to build the Perl language bindings for 'perf script'.

perl_package_preprocess() was (I thought) supposed to prevent the
settings in config.sh from making it to the target - I'll have to look
into why they do for libperl.so.

Tom

> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Tom Zanussi - Oct. 10, 2012, 12:52 a.m.
On Tue, 2012-10-09 at 09:12 -0500, Tom Zanussi wrote:
> On Tue, 2012-10-09 at 14:10 +0100, Richard Purdie wrote:
> > On Tue, 2012-10-09 at 16:32 +0800, Kang Kai wrote:
> > > perl @INC path includes native perl modules path. When run "perl -V",
> > > the output at the end is something like:
> > >   @INC:
> > >     /etc/perl
> > >     /usr/lib/perl/site_perl/5.14.2/
> > >     /usr/lib/perl/site_perl/5.14.2
> > >     /usr/lib/perl/vendor_perl/5.14.2/
> > >     /usr/lib/perl/vendor_perl/5.14.2
> > >     /mnt/sda10/poky-all-platform/build-qemuppc/tmp/sysroots/qemuppc/usr/lib/perl/5.14.2/
> > >     /usr/lib/perl/5.14.2
> > >     /usr/local/lib/site_perl
> > >     /usr/lib/perl/5.14.2
> > >     .
> > > 
> > > And this is caused by commit aeca6512f3a5468b8f65e2986024ab07d2ce45b4.
> > > Because the native path is compiled into libperl.so that sed in
> > > perl_package_preprocess() could NOT remove it. So revert the commit.
> > > 
> > > [Yocto #3099]
> > > 
> > > Signed-off-by: Kang Kai <kai.kang@windriver.com>
> > > ---
> > >  meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> > > index 0d4ca1c..dbfabb5 100644
> > > --- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> > > +++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
> > > @@ -68,7 +68,7 @@ api_version='14'
> > >  api_versionstring='5.14.0'
> > >  ar='ar'
> > >  archlib='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> > > -archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> > > +archlibexp='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
> > >  archname64=''
> > >  archname='@ARCH@-thread-multi'
> > >  archobjs=''
> > 
> > I dislike fixing one bug at the expense of breaking another.
> > 
> > Tom,
> > 
> > http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=aeca6512f3a5468b8f65e2986024ab07d2ce45b4
> > 
> > Any comments on this? How could we test the issue you originally fixed?
> > 
> 
> The original purpose of that commit was to allow the perf build to use
> ExtUtils::Embed to build the Perl language bindings for 'perf script'.
> 
> perl_package_preprocess() was (I thought) supposed to prevent the
> settings in config.sh from making it to the target - I'll have to look
> into why they do for libperl.so.
> 

I just submitted a patchset that gets rid of the @INC problem while
still allowing perf scripting to work (rather than exiting with a
'scripting not supported' message).

Tom

> Tom
> 
> > Cheers,
> > 
> > Richard
> > 
> > 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Kang Kai - Oct. 10, 2012, 1:48 a.m.
On 2012?10?10? 08:52, Tom Zanussi wrote:
> On Tue, 2012-10-09 at 09:12 -0500, Tom Zanussi wrote:
>> On Tue, 2012-10-09 at 14:10 +0100, Richard Purdie wrote:
>>> On Tue, 2012-10-09 at 16:32 +0800, Kang Kai wrote:
>>>> perl @INC path includes native perl modules path. When run "perl -V",
>>>> the output at the end is something like:
>>>>    @INC:
>>>>      /etc/perl
>>>>      /usr/lib/perl/site_perl/5.14.2/
>>>>      /usr/lib/perl/site_perl/5.14.2
>>>>      /usr/lib/perl/vendor_perl/5.14.2/
>>>>      /usr/lib/perl/vendor_perl/5.14.2
>>>>      /mnt/sda10/poky-all-platform/build-qemuppc/tmp/sysroots/qemuppc/usr/lib/perl/5.14.2/
>>>>      /usr/lib/perl/5.14.2
>>>>      /usr/local/lib/site_perl
>>>>      /usr/lib/perl/5.14.2
>>>>      .
>>>>
>>>> And this is caused by commit aeca6512f3a5468b8f65e2986024ab07d2ce45b4.
>>>> Because the native path is compiled into libperl.so that sed in
>>>> perl_package_preprocess() could NOT remove it. So revert the commit.
>>>>
>>>> [Yocto #3099]
>>>>
>>>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>>>> ---
>>>>   meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
>>>> index 0d4ca1c..dbfabb5 100644
>>>> --- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh
>>>> +++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
>>>> @@ -68,7 +68,7 @@ api_version='14'
>>>>   api_versionstring='5.14.0'
>>>>   ar='ar'
>>>>   archlib='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
>>>> -archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
>>>> +archlibexp='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
>>>>   archname64=''
>>>>   archname='@ARCH@-thread-multi'
>>>>   archobjs=''
>>> I dislike fixing one bug at the expense of breaking another.
>>>
>>> Tom,
>>>
>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=aeca6512f3a5468b8f65e2986024ab07d2ce45b4
>>>
>>> Any comments on this? How could we test the issue you originally fixed?
>>>
>> The original purpose of that commit was to allow the perf build to use
>> ExtUtils::Embed to build the Perl language bindings for 'perf script'.
>>
>> perl_package_preprocess() was (I thought) supposed to prevent the
>> settings in config.sh from making it to the target - I'll have to look
>> into why they do for libperl.so.
>>
Hi Tom,

Thanks.
> I just submitted a patchset that gets rid of the @INC problem while
> still allowing perf scripting to work (rather than exiting with a
> 'scripting not supported' message).
I'll test perl with your patch.

Regards,
Kai

>
> Tom
>
>> Tom
>>
>>> Cheers,
>>>
>>> Richard
>>>
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>

Patch

diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
index 0d4ca1c..dbfabb5 100644
--- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh
+++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
@@ -68,7 +68,7 @@  api_version='14'
 api_versionstring='5.14.0'
 ar='ar'
 archlib='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
-archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
+archlibexp='@LIBDIR@/perl/5.14.2/@ARCH@-thread-multi'
 archname64=''
 archname='@ARCH@-thread-multi'
 archobjs=''