On 8/30/25 22:14, Joseph Mills via lists.openembedded.org wrote:
> Hi all,
>
> I’m seeing a native-packaging/sysroot staging issue with
> libcapture-tiny-perl on current meta-perl.
>
> Environment
> Host: Debian sid (for reproducibility reports)
> Poky: perl-native 5.38.4 (meta/recipes-devtools/perl/perl_5.38.4.bb
> <http://perl_5.38.4.bb>)
> meta-perl: libcapture-tiny-perl 0.48 (BBCLASSEXTEND = "native")
> cpan.bbclass + perlnative.bbclass
>
> Symptom (consumer fails to find Capture::Tiny in native sysroot)
> A dependent native build (e.g. libunix-statgrab) dies with:
>
> Can't locate Capture/Tiny.pm in @INC ...
>
> In that consumer’s workdir:
>
> $ find recipe-sysroot-native/usr/lib/perl5 -name Tiny.pm
> # (empty)
> $ find recipe-sysroot/usr/lib/perl5 -name Tiny.pm
> .../vendor_perl/5.38.4/Capture/Tiny.pm # target variant present
>
> Provider logs (native variant)
> libcapture-tiny-perl-native:do_install writes under an absolute path
> that includes the provider’s recipe-sysroot-native:
>
> NOTE: make -j 32 DESTDIR=.../libcapture-tiny-perl-native/0.48/image
> install_vendor
> Installing
> .../image/.../recipe-sysroot-native/usr/lib/perl5/vendor_perl/5.38.4/Capture/Tiny.pm
> Installing
> .../image/.../recipe-sysroot-native/usr/share/man/man3/Capture::Tiny.3
>
> So the file ends up at:
> ${D}${STAGING_DIR_NATIVE}/usr/lib/perl5/vendor_perl/5.38.4/Capture/Tiny.pm
>
> instead of the expected:
> ${D}/usr/lib/perl5/vendor_perl/5.38.4/Capture/Tiny.pm
>
> Because do_populate_sysroot stages from ${D}/usr/..., anything under
> ${D}${STAGING_DIR_NATIVE}/usr/... is skipped. The provider’s
> recipe-sysroot-native thus lacks Capture/Tiny.pm, and dependents can’t
> use Capture::Tiny.
>
> Configure context
> cpan.bbclass runs:
>
> perl ... Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 ...
>
> For class-native, perl-native’s Config.pm advertises
> installvendorlib/installvendorarch as absolute paths pointing into the
> provider’s .../recipe-sysroot-native/usr/.... ExtUtils::MakeMaker then
> combines those absolutes with DESTDIR=${D}, producing the
> ${D}${STAGING_DIR_NATIVE}/... install tree shown above.
>
> Minimal reproduction
> bitbake -c cleanall libcapture-tiny-perl-native
> bitbake -c install libcapture-tiny-perl-native
> # Observe absolute path under image/:
> find tmp/work/*-linux/libcapture-tiny-perl-native/*/image -name
> 'Tiny.pm' -print
> # Observe absence in staged sysroot:
> bitbake -c populate_sysroot libcapture-tiny-perl-native
> find
> tmp/work/*-linux/libcapture-tiny-perl-native/*/recipe-sysroot-native
> -name 'Tiny.pm' -print
>
> Impact
> Affects *-native CPAN modules that install into vendor_perl. Target
> builds are fine; only native staging is affected. In downstream
> recipes this presents as missing Capture/Tiny.pm (or similar CPAN
> modules) despite correct DEPENDS.
>
> Proposed direction
> For class-native in cpan.bbclass, pass relative vendor install dirs to
> Makefile.PL so DESTDIR=${D} lands under ${D}/usr/...
> (prefix-relative), which do_populate_sysroot will stage as usual. For
> example:
>
> #??? Conceptual sketch for class-native: ???
> Makefile.PL ... \
> INSTALLVENDORLIB=${libdir}/perl5/vendor_perl/${perlver} \
> INSTALLVENDORARCH=${libdir}/perl5/vendor_perl/${perlver}/${perlhostarch}
This sounds like an issue in oe-core, not in meta-oe. I'm not a perl
user, personally I can't really comment on the overall soundness of
this, but why not prepare a patch and send it to the oe-core mailing list?
>
> That would keeps target behavior unchanged, and fixes native staging
> without per-recipe hacks.
> Workaround (recipe-local, for those blocked now) In a
> libcapture-tiny-perl_%.bbappend limited to class-native, forcing
> relative vendor paths at configure time unblocks the build:
>
> EXTRA_CPANFLAGS:append:class-native = " \
> INSTALLVENDORLIB=${libdir}/perl5/vendor_perl/${@get_perl_version(d)} \
>
>
> INSTALLVENDORARCH=${libdir}/perl5/vendor_perl/${@get_perl_version(d)}/${@get_perl_hostarch(d)}
> \
> "
> After that, do_install places Capture/Tiny.pm under
> ${D}/usr/lib/perl5/vendor_perl/..., and do_populate_sysroot stages it
> correctly.
>
> Happy to provide full logs/workdirs privately if needed. Thanks!
>
> — Joseph Mills (jmills)
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#119168):
https://lists.openembedded.org/g/openembedded-devel/message/119168
Mute This Topic: https://lists.openembedded.org/mt/114982249/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-