CPAN to RPM, Failure To Handle CONFIGURE_REQUIRES & @INC

8 views
Skip to first unread message

William Braswell

unread,
Jul 3, 2018, 3:02:28 PM7/3/18
to fpm-users
Hello fpm experts !  :-)

I am using fpm to build RPM packages for a number of Perl software distributions from the CPAN server including Alien::JPCRE2 etc...
fpm sets up temporary build directories for all of Alien::JPCRE2's software prerequisites from CPAN, including Alien::Build and Alien::PCRE2, however when fpm makes it into the Alien::JPCRE2 build phase we hit an error because "@INC" (should be all uppercase @ I N C) does not include fpm's temp build dirs.
At first it was failing due to missing prerequisite Alien::Build::MM from CPAN, I thought maybe I could temporarily fix it by installing Alien::Build system-wide, but that just caused it to fail due to missing prerequisite Alien::PCRE2 instead, and as you can see from the output log file (linked below) we DO have the Alien/PCRE2.pm and Alien/Build/MM.pm files in fpm's temp dirs.
(Both Alien::Build::MM and Alien::PCRE2 are dependencies of the example package in question, Alien::JPCRE2)

The log file showing example output with errors:    https://pastebin.com/ZmTSq6nM

This is the error:

Can't locate Alien/PCRE2.pm in @INC (@INC contains: /usr/local/lib64/perl5 ...) at /usr/share/perl5/vendor_perl/Module/Load.pm line 27.

Here's the file in fpm's temp build dir, which fpm is failing to find during Alien::JPCRE2 build time:

/home/SOMEUSER/rperl_packager_tmp/package-cpan-build-LONGSERIALNUMBER/cpan/lib/perl5/x86_64-linux-thread-multi/Alien/PCRE2.pm

So the files ARE correctly present in fpm's temporary build directories, however fpm is NOT correctly handling the CONFIGURE_REQUIRES from the Makefile.PL, specifically in this case the Makefile.PL of Alien::JPCRE2.
How do we get fpm and/or Alien to have the correct entry '/home/SOMEUSER/rperl_packager_tmp/package-cpan-build-LONGSERIALNUMBER/cpan/lib/perl5/x86_64-linux-thread-multi/' added to @INC, which should happen automatically inside fpm itself?

I asked these same questions to the creators of the Alien software in irc.perl.org #native, they said it is an issue with fpm:
"if you are seeing that error when it runs Makefile.PL it means that it isn't handling CONFIGURE_REQUIRES correctly.  Those need to be installed before running Makefile.PL"


"installer needs to consult META.json for configure and install them before running Makefile.PL"

That's all the info I have right now, I am trying to get this working right now today, please help!  :-)  Thanks in advance!

~ Will
Reply all
Reply to author
Forward
0 new messages