Skip to contentSkip to conversation

Can't Locate Module in @INC - you may need to install the Module issue...

DISCUSSION [email protected] 1 participant 1 message Feb 8, 2022

lore
Share & tools
lore
#0 lore raw

Hello All,

I'm getting an error trying create/use a recipe i created for Pearl Module Const::Fast
https://cpan.metacpan.org/authors/id/L/LE/LEONT/Const-Fast-0.014.tar.gz

*It has a Build.PL file as follows:*
use 5.0.0.8
use Module::Build::Tiny 0.21;
Build_PL();

I have built ModuleBuild::Tiny as well. *(meta-cpan has a recipe for Build::Tiny* )  And (think I) am placing it as a dependency for Const::Fast. however... My issue (or my first Issue)  I guess is how to populate Module Build::Tiny into *recipe-sysroot-native.*

When I attempt to build my recipe I get an error as follows:
Can't locate Module/Build/Tiny.pm in @INC (you may need to install the Module::Build::Tiny module) (@INC contains: < list of paths it is looking for>)

Paths @INC (in build/tmp/work) is using to fine Module/Build/Tiny.pm are along these lines:
/all-poky-linux/const-fast-perl/0.014-r0/ *recipe-sysroot-native* /<paths below> /usr/lib/perl5/site_perl/5.34.0/x86_64-linux
/usr/lib/perl5/site_perl/5.34.0
/usr/lib/perl5/vendor_perl/5.34.0
/usr/lib/perl5/5.34.0/x86_64-linux
/usr/lib/perl5/5.34.0

/x86_64-linux/perl-native/5.34.0-r0/ *recipe-sysroot-nativ* e/usr/lib/perl5/<paths below> /site_perl/5.34.0/x86_64-linux
/site_perl/5.34.0
/vendor_perl/5.34.0/x86_64-linux
/vendor_perl/5.34.0
/5.34.0/x86_64-linux
/5.34.0) at Build.PL line 2.
#| BEGIN failed--compilation aborted at Build.PL line 2.

Paths the module is found are along these lines (found via manual search):
#./all-poky-linux/module-build-tiny-perl/0.021-r0/sysroot-destdir/usr/lib/perl5/vendor_perl/5.34.0/Module/Build/Tiny.pm ./all-poky-linux/module-build-tiny-perl/0.021-r0/package/usr/lib/perl5/vendor_perl/5.34.0/Module/Build/Tiny.pm

*My const-fast Recipe is as follows  const-fast-perl_014.bb:*

DESCRIPTION = "This module provides Const::Fast Functionality"
SECTION = "libs"
LICENSE = "Artisticv1 | GPLv1+"
PR = "r0"
MAINTAINER= "Poky <[email protected]>"
HOMEPAGE= "https://metacpan.org/release/Const-Fast"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61" SRC_URI = "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Const-Fast-0.014.tar.gz" SRC_URI[sha256sum] = "f805953a08c57846a16a4d85d7b766398afaf7c36c1465fcb1dea09e5fa394db" S = "${WORKDIR}/Const-Fast-${PV}"
inherit cpan_build allarch
RDEPENDS_${PN} += "extutils-config-perl"
RDEPENDS_${PN} += "extutils-helpers-perl"
RDEPENDS_${PN} += "extutils-installpaths-perl"
DEPENDS += "extutils-config-perl-native"
DEPENDS += "extutils-helpers-perl-native"
DEPENDS += "extutils-installpaths-perl-native"
DEPENDS += "libmodule-build-perl module-build-tiny-perl"
BBCLASSEXTEND = "native"

*My module-build-tiny-perl_0.021.bb is as follows:*

DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a Makefile.PL file \
to drive distribution configuration, build, test and installation. \
Traditionally, Build.PL uses Module::Build as the underlying build system. \
This module provides a simple, lightweight, drop-in replacement."
SECTION = "libs"
LICENSE = "Artisticv1 | GPLv1+"
PR = "r0"
MAINTAINER= "Poky <[email protected]>"
HOMEPAGE= "https://metacpan.org/release/Module-Build-Tiny"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61" SRC_URI = "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.021.tar.gz" SRC_URI[sha256sum] = "65e516c2e99d63100fdf4dbfa35489d0562718a0e8d2b885e9daaa7bc174b43e" RDEPENDS_${PN} += "extutils-config-perl"
RDEPENDS_${PN} += "extutils-helpers-perl"
RDEPENDS_${PN} += "extutils-installpaths-perl"
DEPENDS += "extutils-config-perl-native"
DEPENDS += "extutils-helpers-perl-native"
DEPENDS += "extutils-installpaths-perl-native"
S = "${WORKDIR}/Module-Build-Tiny-${PV}"
inherit cpan_build allarch
BBCLASSEXTEND = "native"

Regards,

Bruce