New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPAN to RPM, Failure To Handle CONFIGURE_REQUIRES & @INC #1509

Closed
wbraswell opened this Issue Jul 3, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@wbraswell
Contributor

wbraswell commented Jul 3, 2018

hello @jordansissel ! :-)
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"
https://metacpan.org/pod/ExtUtils::MakeMaker#CONFIGURE_REQUIRES
"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!

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jul 4, 2018

@wbraswell

This comment has been minimized.

Contributor

wbraswell commented Jul 4, 2018

@jordansissel
Thanks for the reply!
@Util and I are hacking on it now, I have the latest development version of fpm installed from github...
Perhaps you could at least point us toward the likely file(s) or subroutine(s) where we need to add the correct temporary dirs to Perl's @inc variable and/or the PERL5LIB env var?

@wbraswell

This comment has been minimized.

Contributor

wbraswell commented Jul 4, 2018

@jordansissel
this issue should be resolved by
#1510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment