All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perl: fix startperl configuration option for perl-native
@ 2021-04-16 22:28 paulo.zaneti
  2021-04-17 15:01 ` [OE-core] " Khem Raj
  2021-04-17 22:46 ` Richard Purdie
  0 siblings, 2 replies; 9+ messages in thread
From: paulo.zaneti @ 2021-04-16 22:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Paulo Cesar Zaneti

Unlike vanilla Perl "Configure" script, perl-cross "configure" does not
derive "startperl" from "bin". It instead derives from "perlpath".

This patch aims to fix "startperl" configuration option for perl-native by
correctly setting "perlpath" on perl-cross "configure" script.

Signed-off-by: Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
---
 meta/recipes-devtools/perl/perl_5.32.1.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb b/meta/recipes-devtools/perl/perl_5.32.1.bb
index b28040c7fb..82c2922066 100644
--- a/meta/recipes-devtools/perl/perl_5.32.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
@@ -95,6 +95,7 @@ do_configure_class-nativesdk() {
 do_configure_class-native() {
     ./configure --prefix=${prefix} \
     -Dbin=${bindir}/perl-native \
+    -Dperlpath=${bindir}/perl-native/perl \
     -Duseshrplib \
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-16 22:28 [PATCH] perl: fix startperl configuration option for perl-native paulo.zaneti
@ 2021-04-17 15:01 ` Khem Raj
  2021-04-19  7:48   ` Naveen Saini
  2021-04-17 22:46 ` Richard Purdie
  1 sibling, 1 reply; 9+ messages in thread
From: Khem Raj @ 2021-04-17 15:01 UTC (permalink / raw)
  To: Paulo Cesar Zaneti; +Cc: Patches and discussions about the oe-core layer

I am seeing failure in native recipes e.g. opkg-utils-native


| /usr/bin/env: ‘nativeperl-native/perl’: No such file or directory
| make: *** [Makefile:26: opkg-build.1] Error 127
| WARNING: /mnt/b/yoe/master/build/tmp/work/x86_64-linux/opkg-utils-native/0.4.3-r0/temp/run.do_compil
e.2244982:187 exit 1 from 'exit 1'

On Fri, Apr 16, 2021 at 3:29 PM Paulo Cesar Zaneti
<paulo.zaneti@gmail.com> wrote:
>
> Unlike vanilla Perl "Configure" script, perl-cross "configure" does not
> derive "startperl" from "bin". It instead derives from "perlpath".
>
> This patch aims to fix "startperl" configuration option for perl-native by
> correctly setting "perlpath" on perl-cross "configure" script.
>
> Signed-off-by: Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
> ---
>  meta/recipes-devtools/perl/perl_5.32.1.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb b/meta/recipes-devtools/perl/perl_5.32.1.bb
> index b28040c7fb..82c2922066 100644
> --- a/meta/recipes-devtools/perl/perl_5.32.1.bb
> +++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
> @@ -95,6 +95,7 @@ do_configure_class-nativesdk() {
>  do_configure_class-native() {
>      ./configure --prefix=${prefix} \
>      -Dbin=${bindir}/perl-native \
> +    -Dperlpath=${bindir}/perl-native/perl \
>      -Duseshrplib \
>      -Dsoname=libperl.so.5 \
>      -Dvendorprefix=${prefix} \
> --
> 2.25.1
>
>
> 
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-16 22:28 [PATCH] perl: fix startperl configuration option for perl-native paulo.zaneti
  2021-04-17 15:01 ` [OE-core] " Khem Raj
@ 2021-04-17 22:46 ` Richard Purdie
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-04-17 22:46 UTC (permalink / raw)
  To: Paulo Cesar Zaneti, openembedded-core; +Cc: Naveen Saini

On Fri, 2021-04-16 at 19:28 -0300, Paulo Cesar Zaneti wrote:
> Unlike vanilla Perl "Configure" script, perl-cross "configure" does not
> derive "startperl" from "bin". It instead derives from "perlpath".
> 
> This patch aims to fix "startperl" configuration option for perl-native by
> correctly setting "perlpath" on perl-cross "configure" script.
> 
> Signed-off-by: Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
> ---
>  meta/recipes-devtools/perl/perl_5.32.1.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb b/meta/recipes-devtools/perl/perl_5.32.1.bb
> index b28040c7fb..82c2922066 100644
> --- a/meta/recipes-devtools/perl/perl_5.32.1.bb
> +++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
> @@ -95,6 +95,7 @@ do_configure_class-nativesdk() {
>  do_configure_class-native() {
>      ./configure --prefix=${prefix} \
>      -Dbin=${bindir}/perl-native \
> +    -Dperlpath=${bindir}/perl-native/perl \
>      -Duseshrplib \
>      -Dsoname=libperl.so.5 \
>      -Dvendorprefix=${prefix} \

Also caused:

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

and probably other failures in the build. I dropped the patch from -next.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-17 15:01 ` [OE-core] " Khem Raj
@ 2021-04-19  7:48   ` Naveen Saini
  2021-04-19 14:13     ` Paulo Cesar Zaneti
  0 siblings, 1 reply; 9+ messages in thread
From: Naveen Saini @ 2021-04-19  7:48 UTC (permalink / raw)
  To: Khem Raj, Paulo Cesar Zaneti
  Cc: Patches and discussions about the oe-core layer

[SWAT] 
AB failure link:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2050

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Khem Raj
> Sent: Saturday, April 17, 2021 11:01 PM
> To: Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
> Cc: Patches and discussions about the oe-core layer <openembedded-
> core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH] perl: fix startperl configuration option for
> perl-native
> 
> I am seeing failure in native recipes e.g. opkg-utils-native
> 
> 
> | /usr/bin/env: ‘nativeperl-native/perl’: No such file or directory
> | make: *** [Makefile:26: opkg-build.1] Error 127
> | WARNING:
> | /mnt/b/yoe/master/build/tmp/work/x86_64-linux/opkg-utils-native/0.4.3-
> | r0/temp/run.do_compil
> e.2244982:187 exit 1 from 'exit 1'
> 
> On Fri, Apr 16, 2021 at 3:29 PM Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
> wrote:
> >
> > Unlike vanilla Perl "Configure" script, perl-cross "configure" does
> > not derive "startperl" from "bin". It instead derives from "perlpath".
> >
> > This patch aims to fix "startperl" configuration option for
> > perl-native by correctly setting "perlpath" on perl-cross "configure" script.
> >
> > Signed-off-by: Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
> > ---
> >  meta/recipes-devtools/perl/perl_5.32.1.bb | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb
> > b/meta/recipes-devtools/perl/perl_5.32.1.bb
> > index b28040c7fb..82c2922066 100644
> > --- a/meta/recipes-devtools/perl/perl_5.32.1.bb
> > +++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
> > @@ -95,6 +95,7 @@ do_configure_class-nativesdk() {
> >  do_configure_class-native() {
> >      ./configure --prefix=${prefix} \
> >      -Dbin=${bindir}/perl-native \
> > +    -Dperlpath=${bindir}/perl-native/perl \
> >      -Duseshrplib \
> >      -Dsoname=libperl.so.5 \
> >      -Dvendorprefix=${prefix} \
> > --
> > 2.25.1
> >
> >
> >
> >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-19  7:48   ` Naveen Saini
@ 2021-04-19 14:13     ` Paulo Cesar Zaneti
  2021-04-30 20:42       ` [OE-core] " Peter Kjellerstedt
  0 siblings, 1 reply; 9+ messages in thread
From: Paulo Cesar Zaneti @ 2021-04-19 14:13 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

I just re-send the patch with additional fix for the build failure.

I think the basic problem was an inconsistency in the way perl recipe and cpan.bbclass convert the absolute perl path to env path.
Version 2 of the patch tries to use same cpan.bbclass approach on the perl recipe.

Before submitting I just ran "bitbake -k world". I hope it doesn't break the build again.

[-- Attachment #2: Type: text/html, Size: 400 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-19 14:13     ` Paulo Cesar Zaneti
@ 2021-04-30 20:42       ` Peter Kjellerstedt
  2021-05-03 19:55         ` Otavio Salvador
  2021-05-03 22:10         ` Paulo Cesar Zaneti
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Kjellerstedt @ 2021-04-30 20:42 UTC (permalink / raw)
  To: Paulo Cesar Zaneti; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Well, it did break our builds. I now get the following error when building a native recipe that inherits perlnative and tries to run pod2man:

| /bin/sh: /home/pkj/…/recipe-sysroot-native/usr/bin/pod2man: /home/pkj/…/recipe-sysroot-native/usr/bin/per: bad interpreter: No such file or directory

This is because the first two lines of the pod2man script now looks like

#!/home/pkj/…/recipe-sysroot-native/usr/bin/perl
    eval 'exec /home/pkj/…/recipe-sysroot-native/usr/bin/perl -S $0 ${1+"$@"}'

instead of the previous:

#!/usr/bin/env nativeperl
    eval 'exec /usr/bin/env nativeperl -S $0 ${1+"$@"}'

I.e., the sed command in perl’s do_install_append_class-native() does not seem to have done anything, which is because there is no “perl-native.*/perl" in the path to match (as can be seen above), it is just “perl”, which is what the old code was looking for.

[ In the above examples, I have replaced a longish part of the path with … to protect the innocent. ]

//Peter

From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Paulo Cesar Zaneti
Sent: den 19 april 2021 16:13
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native

I just re-send the patch with additional fix for the build failure.

I think the basic problem was an inconsistency in the way perl recipe and cpan.bbclass convert the absolute perl path to env path.
Version 2 of the patch tries to use same cpan.bbclass approach on the perl recipe.

Before submitting I just ran "bitbake -k world". I hope it doesn't break the build again.

[-- Attachment #2: Type: text/html, Size: 6134 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-30 20:42       ` [OE-core] " Peter Kjellerstedt
@ 2021-05-03 19:55         ` Otavio Salvador
  2021-05-03 20:03           ` Paulo Cesar Zaneti
  2021-05-03 22:10         ` Paulo Cesar Zaneti
  1 sibling, 1 reply; 9+ messages in thread
From: Otavio Salvador @ 2021-05-03 19:55 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Paulo Cesar Zaneti, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2275 bytes --]

Hello,

Couldn't the OE-Core:f2d1523b19cb066a4a06609f036822fe4a8b43f0 to be
reverted in meanwhile?

Em sex., 30 de abr. de 2021 às 17:42, Peter Kjellerstedt <
peter.kjellerstedt@axis.com> escreveu:

> Well, it did break our builds. I now get the following error when building
> a native recipe that inherits perlnative and tries to run pod2man:
>
>
>
> | /bin/sh: /home/pkj/…/recipe-sysroot-native/usr/bin/pod2man:
> /home/pkj/…/recipe-sysroot-native/usr/bin/per: bad interpreter: No such
> file or directory
>
>
>
> This is because the first two lines of the pod2man script now looks like
>
>
>
> #!/home/pkj/…/recipe-sysroot-native/usr/bin/perl
>
>     eval 'exec /home/pkj/…/recipe-sysroot-native/usr/bin/perl -S $0
> ${1+"$@"}'
>
>
>
> instead of the previous:
>
>
>
> #!/usr/bin/env nativeperl
>
>     eval 'exec /usr/bin/env nativeperl -S $0 ${1+"$@"}'
>
>
>
> I.e., the sed command in perl’s do_install_append_class-native() does not
> seem to have done anything, which is because there is no
> “perl-native.*/perl" in the path to match (as can be seen above), it is
> just “perl”, which is what the old code was looking for.
>
>
>
> [ In the above examples, I have replaced a longish part of the path with …
> to protect the innocent. ]
>
>
>
> //Peter
>
>
>
> *From:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> *On Behalf Of *Paulo Cesar
> Zaneti
> *Sent:* den 19 april 2021 16:13
> *To:* openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core] [PATCH] perl: fix startperl configuration option
> for perl-native
>
>
>
> I just re-send the patch with additional fix for the build failure.
>
> I think the basic problem was an inconsistency in the way perl recipe and
> cpan.bbclass convert the absolute perl path to env path.
> Version 2 of the patch tries to use same cpan.bbclass approach on the perl
> recipe.
>
> Before submitting I just ran "bitbake -k world". I hope it doesn't break
> the build again.
>
> 
>
>

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

[-- Attachment #2: Type: text/html, Size: 5675 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-05-03 19:55         ` Otavio Salvador
@ 2021-05-03 20:03           ` Paulo Cesar Zaneti
  0 siblings, 0 replies; 9+ messages in thread
From: Paulo Cesar Zaneti @ 2021-05-03 20:03 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Peter Kjellerstedt, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2579 bytes --]

Yes, I agree to revert until we find out a solution for everyone needs.

Should I send a patch reverting it ?

On Mon, May 3, 2021 at 4:56 PM Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Hello,
>
> Couldn't the OE-Core:f2d1523b19cb066a4a06609f036822fe4a8b43f0 to be
> reverted in meanwhile?
>
> Em sex., 30 de abr. de 2021 às 17:42, Peter Kjellerstedt <
> peter.kjellerstedt@axis.com> escreveu:
>
>> Well, it did break our builds. I now get the following error when
>> building a native recipe that inherits perlnative and tries to run pod2man:
>>
>>
>>
>> | /bin/sh: /home/pkj/…/recipe-sysroot-native/usr/bin/pod2man:
>> /home/pkj/…/recipe-sysroot-native/usr/bin/per: bad interpreter: No such
>> file or directory
>>
>>
>>
>> This is because the first two lines of the pod2man script now looks like
>>
>>
>>
>> #!/home/pkj/…/recipe-sysroot-native/usr/bin/perl
>>
>>     eval 'exec /home/pkj/…/recipe-sysroot-native/usr/bin/perl -S $0
>> ${1+"$@"}'
>>
>>
>>
>> instead of the previous:
>>
>>
>>
>> #!/usr/bin/env nativeperl
>>
>>     eval 'exec /usr/bin/env nativeperl -S $0 ${1+"$@"}'
>>
>>
>>
>> I.e., the sed command in perl’s do_install_append_class-native() does not
>> seem to have done anything, which is because there is no
>> “perl-native.*/perl" in the path to match (as can be seen above), it is
>> just “perl”, which is what the old code was looking for.
>>
>>
>>
>> [ In the above examples, I have replaced a longish part of the path with
>> … to protect the innocent. ]
>>
>>
>>
>> //Peter
>>
>>
>>
>> *From:* openembedded-core@lists.openembedded.org <
>> openembedded-core@lists.openembedded.org> *On Behalf Of *Paulo Cesar
>> Zaneti
>> *Sent:* den 19 april 2021 16:13
>> *To:* openembedded-core@lists.openembedded.org
>> *Subject:* Re: [OE-core] [PATCH] perl: fix startperl configuration
>> option for perl-native
>>
>>
>>
>> I just re-send the patch with additional fix for the build failure.
>>
>> I think the basic problem was an inconsistency in the way perl recipe and
>> cpan.bbclass convert the absolute perl path to env path.
>> Version 2 of the patch tries to use same cpan.bbclass approach on the
>> perl recipe.
>>
>> Before submitting I just ran "bitbake -k world". I hope it doesn't break
>> the build again.
>>
>> 
>>
>>
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
>

[-- Attachment #2: Type: text/html, Size: 6116 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] perl: fix startperl configuration option for perl-native
  2021-04-30 20:42       ` [OE-core] " Peter Kjellerstedt
  2021-05-03 19:55         ` Otavio Salvador
@ 2021-05-03 22:10         ` Paulo Cesar Zaneti
  1 sibling, 0 replies; 9+ messages in thread
From: Paulo Cesar Zaneti @ 2021-05-03 22:10 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3232 bytes --]

Hi Peter,

The motivation for the patch is just using a correct value for "startperl"
configuration when build perl-native.
Without the patch, this configuration option is set to a non existent path.

When I fixed "startperl", tools like "pod2man" stopped working as the
"do_install_append_class-native()"  function expected the non existent path
on the shebang string (#! ...).
So I also had to change the "do_install_append_class()".
If you look at function "cpan_do_install()" in meta/classes/cpan.bbclass,
you see that both functions now use same pattern for shebang string
substitution.

I can't understand why the pod2man in your build is still using the non
existent path on the shebang string.

Would you mind to execute the following steps and send me the results? That
may help me understand a bit better.

bitbake perl-native -c compile -f
head -1 $(find */work/*/perl-native/ -name pod2man)
grep "startperl=" */work/*/perl-native/*/perl*/lib/Config_heavy.pl
*/work/*/perl-native/*/perl*/config.log

You may partially replace the complete path by some "..." as you did before.

I hope we can find a solution to replace the patch with another one that
fixes the "startperl" configuration without breaking your build.

Regards,
Paulo

On Fri, Apr 30, 2021 at 5:42 PM Peter Kjellerstedt <
peter.kjellerstedt@axis.com> wrote:

> Well, it did break our builds. I now get the following error when building
> a native recipe that inherits perlnative and tries to run pod2man:
>
>
>
> | /bin/sh: /home/pkj/…/recipe-sysroot-native/usr/bin/pod2man:
> /home/pkj/…/recipe-sysroot-native/usr/bin/per: bad interpreter: No such
> file or directory
>
>
>
> This is because the first two lines of the pod2man script now looks like
>
>
>
> #!/home/pkj/…/recipe-sysroot-native/usr/bin/perl
>
>     eval 'exec /home/pkj/…/recipe-sysroot-native/usr/bin/perl -S $0
> ${1+"$@"}'
>
>
>
> instead of the previous:
>
>
>
> #!/usr/bin/env nativeperl
>
>     eval 'exec /usr/bin/env nativeperl -S $0 ${1+"$@"}'
>
>
>
> I.e., the sed command in perl’s do_install_append_class-native() does not
> seem to have done anything, which is because there is no
> “perl-native.*/perl" in the path to match (as can be seen above), it is
> just “perl”, which is what the old code was looking for.
>
>
>
> [ In the above examples, I have replaced a longish part of the path with …
> to protect the innocent. ]
>
>
>
> //Peter
>
>
>
> *From:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> *On Behalf Of *Paulo Cesar
> Zaneti
> *Sent:* den 19 april 2021 16:13
> *To:* openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core] [PATCH] perl: fix startperl configuration option
> for perl-native
>
>
>
> I just re-send the patch with additional fix for the build failure.
>
> I think the basic problem was an inconsistency in the way perl recipe and
> cpan.bbclass convert the absolute perl path to env path.
> Version 2 of the patch tries to use same cpan.bbclass approach on the perl
> recipe.
>
> Before submitting I just ran "bitbake -k world". I hope it doesn't break
> the build again.
>

[-- Attachment #2: Type: text/html, Size: 6695 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-03 22:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 22:28 [PATCH] perl: fix startperl configuration option for perl-native paulo.zaneti
2021-04-17 15:01 ` [OE-core] " Khem Raj
2021-04-19  7:48   ` Naveen Saini
2021-04-19 14:13     ` Paulo Cesar Zaneti
2021-04-30 20:42       ` [OE-core] " Peter Kjellerstedt
2021-05-03 19:55         ` Otavio Salvador
2021-05-03 20:03           ` Paulo Cesar Zaneti
2021-05-03 22:10         ` Paulo Cesar Zaneti
2021-04-17 22:46 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.