atrodo / App-MechaCPAN

Mechanize the installation of CPAN things
Other
2 stars 2 forks source link

Building App::MechaCPAN in docker fails #13

Closed pattieja1 closed 5 years ago

pattieja1 commented 5 years ago

I'm trying to execute the following docker command (after installing cpanm from rpms, etc.):

RUN cpanm autodie File::Fetch App::MechaCPAN ;cat /root/.cpanm/work/*/build.log

It installs autodie, File::Fetch and any dependencies they have and then proceeds to attempt building, testing and installing App::MechaCPAN. It builds okay and then fails on the tests with the following snippet being representative of all the failures.

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.

t/01_sanity.t .............. ok
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
t/02_cmds.t ................ ok
Name "App::MechaCPAN::TIMEOUT" used only once: possible typo at t/03_run.t line 8.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
t/03_run.t ................. ok
Name "App::MechaCPAN::PROJ_DIR" used only once: possible typo at t/04_opts.t line 41.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
t/04_opts.t ................ ok
Scalar value @parts[0] better written as $parts[0] at t/05_re.t line 30.
Scalar value @exparts[0] better written as $exparts[0] at t/05_re.t line 30.
Scalar value @parts[1] better written as $parts[1] at t/05_re.t line 31.
Scalar value @exparts[1] better written as $exparts[1] at t/05_re.t line 31.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
t/05_re.t .................. ok
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.

Subroutine File::Temp::cleanup redefined at t/06_restart.t line 37.
Subroutine App::MechaCPAN::self_install redefined at t/06_restart.t line 29.
Subroutine App::MechaCPAN::self_install redefined at t/06_restart.t line 29.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1019.
Use of uninitialized value in split at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1021.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Subroutine App::MechaCPAN::self_install redefined at t/06_restart.t line 29.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1019.
Use of uninitialized value in split at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1021.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Subroutine App::MechaCPAN::self_install redefined at t/06_restart.t line 29.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1019.
Use of uninitialized value in split at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1021.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Subroutine App::MechaCPAN::self_install redefined at t/06_restart.t line 29.
Subroutine App::MechaCPAN::self_install redefined at t/06_restart.t line 29.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1019.
Use of uninitialized value in split at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1021.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Use of uninitialized value $ENV{"PERL_LOCAL_LIB_ROOT"} in regexp compilation at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 1042.
Subroutine App::MechaCPAN::Install::go redefined at t/06_restart.t line 104.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
t/06_restart.t ............. ok
Name "App::MechaCPAN::info" used only once: possible typo at t/07_tmpdata.t line 27.
Name "App::MechaCPAN::PROJ_DIR" used only once: possible typo at t/07_tmpdata.t line 11.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
Subroutine App::MechaCPAN::info redefined at t/07_tmpdata.t line 27.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
t/07_tmpdata.t ............. ok
Name "App::MechaCPAN::logmsg" used only once: possible typo at t/11_perl.t line 19.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
Subroutine App::MechaCPAN::logmsg redefined at t/11_perl.t line 22.
# logging to '/tmp/mechacpan_t_myqGGuYR/local/logs/mecha_log.20181029_045056.pKlA'...
# Looks like /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/t/../test_dists/FakePerl-5.12.0.tar.gz is perl 5.12.0, assuming that's true
# Fetching perl 5.12.0
# Configuring perl 5.12.0
# Building perl 5.12.0
# Testing perl 5.12.0
# Installing perl 5.12.0
# Installed perl 5.12.0
t/11_perl.t ................ ok
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $_ in -s at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 593.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $_ in -s at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 593.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
t/12_perl__get_targz.t ..... ok
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
Subroutine App::MechaCPAN::Perl::_run_configure redefined at t/13_perl_smart_tests.t line 25.
Subroutine App::MechaCPAN::Perl::_run_make redefined at t/13_perl_smart_tests.t line 27.
Use of uninitialized value $_[0] in hash element at t/13_perl_smart_tests.t line 27.
Use of uninitialized value $_[0] in hash element at t/13_perl_smart_tests.t line 27.
Use of uninitialized value $pv_ver in string eq at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Perl.pm line 157.
Use of uninitialized value $_[0] in hash element at t/13_perl_smart_tests.t line 27.
Use of uninitialized value $_[0] in hash element at t/13_perl_smart_tests.t line 27.
t/13_perl_smart_tests.t .... ok
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
Subroutine App::MechaCPAN::Perl::_run_configure redefined at t/14_perl_opts.t line 34.
t/14_perl_opts.t ........... ok
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 48.
Too late to run INIT block at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 473.
"my" variable $error masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 835.
Subroutine App::MechaCPAN::copy redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN.pm line 915.
"my" variable $target masks earlier declaration in same scope at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 594.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Use of uninitialized value $file in string ne at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 321.
Use of uninitialized value $file in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm line 329.
Could not unpack archive: /tmp/mechacpan_t_1aHY5lan/local/tmp/mecha_Try-Tiny-0.30.tar.gz.20181029_045059.8jzn
 at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 236.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 202.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 202.
Use of uninitialized value in list assignment at /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/blib/lib/App/MechaCPAN/Install.pm line 202.
Use of uninitialized value $key in concatenation (.) or string at ./t/helper.pm line 25.
#  - Failed to install 1 modules

#   Failed test 'Can install /root/.cpanm/work/1543466998.8/App-MechaCPAN-0.26/t/../test_dists/ConfigDeps/ConfigDeps-1.0.tar.gz'
#   at t/21_install.t line 22.
#          got: '-1'
#     expected: '0'

#   Failed test 'Library exists as expected'
#   at t/21_install.t line 24.

What do you need me to test to try and figure this out?

Thanks,

pattieja1 commented 5 years ago

Sample Dockerfile to reproduce the error:

FROM centos:7

RUN yum -y install yum-utils \
 openssh-clients \
 epel-release \
 gcc \
 git \
 which \
 automake \
 autoconf \
 libtool \
 make \
 libxml2-devel \
 gettext-devel \
 freetds \
 freetds-devel \
 expat-devel \
 openssl-devel \
 pkgconfig \
 gd-devel \
 postgresql-devel \
 libmcrypt-devel \
 libtool-ltdl-devel \
 gnupg \
 iproute

RUN yum -y install \
 perl \
 perl-CPAN \
 perl-App-cpanminus 

RUN cpanm autodie File::Fetch App::MechaCPAN ;cat /root/.cpanm/work/*/build.log
pattieja1 commented 5 years ago

Following the instructions I specified --force and dropped the cat command. It installed but then when it went to build perl it failed trying to extract the tarball.

logging to '/opt/gpsi/perl/local/logs/mecha_log.20181030_144836.GU43'... 
logging to '/opt/gpsi/perl/local/logs/mecha_log.20181030_144836.GU43'... 
Fetching perl 5.26.3
Could not unpack archive: /opt/gpsi/perl/local/tmp/mecha_perl-5.26.3.tar.gz.20181030_144840.FBOk
Fetching perl 5.26.3
Could not find perl to configure.Inflated to "/opt/gpsi/perl/local/tmp/mecha_mecha_perl-5.26.3.tar.gz.20181030_144840.FBOk.20181030_144843.kXHQ" extracted from http://www.cpan.org/src/5.0/perl-5.26.3.tar.gz at /usr/local/share/perl5/App/MechaCPAN/Perl.pm line 99. 

The command '/bin/sh -c MECHACPAN_TIMEOUT=300 mechacpan perl --threads --skip-tests 5.26' returned a non-zero code: 255
atrodo commented 5 years ago

I've seen that error crop up on cpan testers, and my vague, terrible theory so far was that it was failing because it wasn't starting the script in a new process. Then I actually ran the test command in your log: perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t and lo-and-behold, the same Too Late errors appeared. I'm going to investigate those, although they may just be hiding the actual issue. In the meantime, can I get the versions of the items involved in that cpanm line? The version of Perl, cpanm, Test::More, ExtUtils::MakeMaker should be the most important things involved.

pattieja1 commented 5 years ago

CentOS 7

cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 

perl 5.16.3

cpanm (App::cpanminus) 1.7044 on perl 5.016003 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1543883294.21
You have make /usr/bin/make
You have /usr/bin/curl
You have /usr/bin/tar: tar (GNU tar) 1.26

Test::More 1.302141 ExtUtils::MakeMaker 6.68

pattieja1 commented 5 years ago

PS. Your code appears to rely on autodie but isn't depending on it and that causes an issue when trying to install App::MechaCPAN on centos. debian appears to have the module already installed so it doesn't throw a dependency failure.

pattieja1 commented 5 years ago

Same with File::Fetch.

pattieja1 commented 5 years ago

NOTE: using the perl:latest docker image (which is Debian based), using perl 5.28.0, App::MechaCPAN installs just fine. Using the same version of cpanm.

Downgraded the perl to 5.16.3, to match the centos image (though it is a perl brew build and not debian provided perl), and App::MechaCPAN installs just fine.

This is really pointing to something with the centOS image. :)

atrodo commented 5 years ago

App::MechaCPAN doesn't list autodie nor File::Fetch as a dependency because both are core modules, they should exist in every perl since 5.10.1 when autodie was introduced. (File::Fetch was introduced in 5.9.5). I know in the past RedHat (and by extension, CentOS) decided to be nice and ship a stripped down version of Perl without all the core modules.

I'm looking a little more closely tonight at the error, which is hard to see because of all the noise, but I'm not seeing where autodie is the source of the issue. It appears to be somehow related to the function inflate_archive and failing using the system tar (because the file doesn't end in gz or bz2 it tries to use xz which fails) and Archive::Tar (which shouldn't fail in the same way). I haven't been able to replicate a failure, but I think some of that code needs cleaned up a bit more and made more intelligent. If you have any insights, I'd love to hear about them.

The other side of this, the "Too late to run INIT block" error I've tracked down to the fact that Test::Harness runs the tests with perl -w by default, causing an excessive amount of warnings. The -w was suppressed starting in ExtUtils::MakeMaker v6.78. I am adding that as a configure dependency going forward to suppress those warnings.

pattieja1 commented 5 years ago

yum install perl-core

fixes all my issues. :)

App::MechaCPAN just installed and it's building perl 5.26.3 right now.

I'm going to close this ticket as a non-issue.

Thanks for your help debugging. I haven't touched RedHat in > 11 years so a lot's changed. :)