Raku / nqp

NQP
Other
336 stars 131 forks source link

Warn about missing perl5 libs in Configure instead of just crashing #801

Closed timo closed 1 year ago

timo commented 1 year ago

On a system where some of the standard library is chopped off into modules, Configure --help would crash with the not-too-scrutible error message that perl5 gives when a module isn't installed, so i'm thinking a friendly message would be nice

timo commented 1 year ago

with this patch:

⬢[timo@toolbox nqp]$ ./Configure.pl --prefix=/home/timo/raku/prefix/
==== !!!! ====
  Some essential perl5 modules are missing!

Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure.pl line 20.

Can't locate IPC/Cmd.pm in @INC (you may need to install the IPC::Cmd module) (@INC contains: /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure.pl line 22.

This usually means you are using a cut-down installation of perl5
which is what some linux distributions include by default.
In order to successfully configure, compile and install nqp and
rakudo, you will need at least these perl modules:

  - FindBin (missing!)
  - IPC::Cmd (missing!)
  - ExtUtils::Command (found)

without this patch:

⬢[timo@toolbox nqp]$ ./Configure.pl --prefix=/home/timo/raku/prefix/
Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure.pl line 12.
BEGIN failed--compilation aborted at ./Configure.pl line 12.