Hi Paul,


The commit summary here is an excellent example of Claudish. I'm not
really sure what it means... It could do with re-writing.

Thats true. I think I only could follow it because I knew which real issue this fixes for me. The problem is, that I'm following more or less regulary the current master branch of oe-core and whenever there have been changes to perl the following build breaks a few perl recipes. that then required a '-c cleansstate' to become buildable again.

I'm not really familiar with cpan packages - are we sure that none
include a Makefile?

I wasn't sure about this either, but since �do_configure� generates a new Makefile, I left it in. However,
that isn't necessary to fix the actual problem.


We don't want surprise rebuilds during do_install.

I'll send a v2 that just ignores the different timestamp

On Sat, Sep 26 2026 at 15:05:24 +01:00:00, Paul Barker <[email protected]> wrote:
On Tue, 2026-09-22 at 11:23 +0200, Markus Volk wrote:
ExtUtils::MakeMaker makes the generated Makefile depend on Config.pm and config.h from the perl it was configured against. do_prepare_recipe_sysroot stages those files fresh on every run, so their mtime can end up newer than
 a Makefile written by a do_configure that is still valid. make then
regenerates the Makefile, prints "Please rerun the make command" and exits non-zero, which fails do_compile or do_install. Run make a second time in that case, which is what MakeMaker asks for; a run that fails for any other reason fails again. Also drop a stale Makefile before Makefile.PL runs, so a configure in a used work directory does not start from old settings.

Reproduced with liburi-perl by touching Config.pm and config.h in the recipe sysroot and forcing do_install: it failed before the change and
 succeeds after it.

 AI-Generated: Uses Claude Code (Claude Opus 5)
Signed-off-by: Markus Volk <[email protected] <mailto:[email protected]>>

Hi Markus,

The commit summary here is an excellent example of Claudish. I'm not
really sure what it means... It could do with re-writing.

 ---
  meta/classes-recipe/cpan.bbclass | 13 +++++++++++--
  1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/cpan.bbclass b/meta/classes-recipe/cpan.bbclass
 index dbf44da9d2..0f7384786f 100644
 --- a/meta/classes-recipe/cpan.bbclass
 +++ b/meta/classes-recipe/cpan.bbclass
@@ -23,6 +23,10 @@ export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/" export PERLHOSTARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl5/${@get_perl_version(d)}/${@get_perl_hostarch(d)}/"

  cpan_do_configure () {
+ # A Makefile left behind by an earlier configure run would be used with the + # settings it was generated with, so start from the Makefile.PL every time.
 +      rm -f Makefile

I'm not really familiar with cpan packages - are we sure that none
include a Makefile?

 +
yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 PERL=$(which perl) ${EXTRA_CPANFLAGS}

        # Makefile.PLs can exit with success without generating a
 @@ -57,12 +61,17 @@ do_configure:append:class-nativesdk() {
             -e 's:LD_RUN_PATH ?= ?"?[^"]*"?::g'
  }

+# ExtUtils::MakeMaker regenerates the Makefile when the staged perl has become +# newer than it, and then exits asking for make to be rerun. Do that instead of +# failing the task; a run that fails for any other reason fails again.
  cpan_do_compile () {
 -      oe_runmake PASTHRU_INC="${CFLAGS}" LD="${CCLD}"
 +      oe_runmake_call PASTHRU_INC="${CFLAGS}" LD="${CCLD}" || \
 +              oe_runmake PASTHRU_INC="${CFLAGS}" LD="${CCLD}"

Are we sure this won't mask other issues? The staged perl becoming newer
than the generated Makefile should be a rare occurance, perhaps we can
check for that before calling make and handle it explicitly?

  }

  cpan_do_install () {
 -      oe_runmake DESTDIR="${D}" install_vendor
 +      oe_runmake_call DESTDIR="${D}" install_vendor || \
 +              oe_runmake DESTDIR="${D}" install_vendor

We don't want surprise rebuilds during do_install.

for PERLSCRIPT in `grep -rIEl '#! *${bindir}/perl-native.*/perl' ${D}`; do sed -i -e 's|${bindir}/perl-native.*/perl|/usr/bin/env nativeperl|' $PERLSCRIPT
        done

Best regards,

--
Paul Barker





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246640): 
https://lists.openembedded.org/g/openembedded-core/message/246640
Mute This Topic: https://lists.openembedded.org/mt/121371712/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to