xslate / p5-Mouse

Lightweight class builder for Perl, as a subset of Moose
https://metacpan.org/release/Mouse
Other
46 stars 32 forks source link

Broken CPAN based install on Centos7: Fatal.pm missing #95

Closed daxbert closed 5 years ago

daxbert commented 5 years ago

Expectation: CPAN should be able to install Mouse w/ needed dependencies

Fails to install via CPAN on default centos7 docker image after installing make, gcc, perl and cpan

Error is "Can't locate Fatal.pm"

After installing Fatal via CPAN, Mouse is able to successfully install.

# docker run -it centos:centos7 /bin/bash
[root@... /]# yum install make gcc perl cpan
...
[root@... /]# perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
...
[root@... /]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
...
[root@... /]# cpan
... 
( default setup w/ sudo )
...
cpan[1]> install CPAN    # upgrade CPAN
...
cpan[2]> reload cpan    # reload
...
cpan[3]> install Mouse
...
All tests successful.
Files=21, Tests=1216,  6 wallclock secs ( 0.44 usr  0.04 sys +  4.72 cusr  0.64 csys =  5.84 CPU)
Result: PASS
  BDFOY/Test-Output-1.031.tar.gz
  /usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl5/Test/Output.pm
Installing /usr/local/share/man/man3/Test::Output.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  BDFOY/Test-Output-1.031.tar.gz
  /usr/bin/make install  -- OK
  SKAJI/Mouse-v2.5.6.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Mouse-v2.5.6-0
  SKAJI/Mouse-v2.5.6.tar.gz
  Has already been prepared
Running Build for S/SK/SKAJI/Mouse-v2.5.6.tar.gz
Building Mouse
Can't locate Fatal.pm in @INC (@INC contains: /root/.cpan/build/Mouse-v2.5.6-0/_build/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at tool/generate-mouse-tiny.pl line 5.
BEGIN failed--compilation aborted at tool/generate-mouse-tiny.pl line 5.
Died at builder/MyBuilder.pm line 20.
  SKAJI/Mouse-v2.5.6.tar.gz
  ./Build -- NOT OK
Failed during this command:
 SKAJI/Mouse-v2.5.6.tar.gz                    : make NO

cpan[4]> exit

[root@... /]# cpan

cpan[1]> install Fatal
...
Installing /usr/local/share/man/man3/Fatal.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  PJF/autodie-2.29.tar.gz
  /usr/bin/make install  -- OK

cpan[2]> exit

[root@... /]# cpan

cpan[1]> install Mouse
...
Installing /usr/local/share/man/man3/Mouse::Spec.3pm
  SKAJI/Mouse-v2.5.6.tar.gz
  ./Build install  -- OK
daxbert commented 5 years ago

Found this possibly related reference for XML::SAX

https://rt.cpan.org/Public/Bug/Display.html?id=112647

Fatal.pm is not declared as a dependency because it is a standard library shipped in the core Perl distribution.

It would appear that some folks expect Fatal.pm to be part of the core perl distribution. This is not the case with Centos7. I'm going to experiment with installing perl, perl-core and perl-devel and see if this resolves the issue with Fatal.pm missing.

Maybe it should still be called out as a dependency?

daxbert commented 5 years ago

Confirmed:

# yum install perl-core 

installs /usr/share/perl5/vendor_perl/Fatal.pm

Closing this issue as the solution is to have both perl and perl-core installed with Centos.