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.