miyagawa / cpanminus

cpanminus - get, unpack, build and install modules from CPAN
http://cpanmin.us
750 stars 213 forks source link

Unable to upgrade List::MoreUtils using cpanm --self-contained #563

Open sjackman opened 6 years ago

sjackman commented 6 years ago

Apologies upfront if this issue is due to pilot error.

/usr/bin/perl on macOS includes List::MoreUtils. I'm trying to install the recent version 0.428 using

❯❯❯ cpanm -l perl5 --self-contained List::MoreUtils

This command installs List::MoreUtils::XS version 0.428, but oddly does not install List::MoreUtils 0.428, even though it prints Successfully installed List-MoreUtils-0.428, no file MoreUtils.pm is installed.

❯❯❯ cpanm -l perl5 --self-contained List::MoreUtils
❯❯❯ find perl5 -name XS.pm
perl5/lib/perl5/darwin-thread-multi-2level/List/MoreUtils/XS.pm
❯❯❯ find perl5 -name MoreUtils.pm
❯❯❯ ls perl5/lib/perl5/darwin-thread-multi-2level/List
MoreUtils
❯❯❯ PERL5LIB=perl5/lib/perl5 /usr/bin/perl -MList::MoreUtils -le 'print $List::MoreUtils::VERSION'
0.33
❯❯❯ PERL5LIB=perl5/lib/perl5 /usr/bin/perl -MList::MoreUtils::XS -le 'print $List::MoreUtils::XS::VERSION'
0.428

When I try to install forks, which depends on List::MoreUtils I see this error:

❯❯❯ cpanm -l perl5 --self-contained List::MoreUtils
…
Successfully installed List-MoreUtils-0.428
…
! Installing the dependencies failed: Module 'List::MoreUtils' is not installed
! Bailing out the installation for forks-0.36.

Here's a complete build log on CircleCI on macOS: https://circleci.com/gh/brewsci/homebrew-bio/1320

sjackman commented 6 years ago

Complete log:

❯❯❯ cpanm -l perl5 --self-contained forks
--> Working on forks
Fetching http://www.cpan.org/authors/id/R/RY/RYBSKEJ/forks-0.36.tar.gz ... OK
Configuring forks-0.36 ... OK
==> Found dependencies: Acme::Damn, Sys::SigAction, Devel::Symdump, List::MoreUtils
--> Working on Acme::Damn
Fetching http://www.cpan.org/authors/id/I/IB/IBB/Acme-Damn-0.08.tar.gz ... OK
Configuring Acme-Damn-0.08 ... OK
==> Found dependencies: Test::Exception
--> Working on Test::Exception
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test-Exception-0.43.tar.gz ... OK
Configuring Test-Exception-0.43 ... OK
==> Found dependencies: Sub::Uplevel
--> Working on Sub::Uplevel
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.2800.tar.gz ... OK
Configuring Sub-Uplevel-0.2800 ... OK
Building and testing Sub-Uplevel-0.2800 ... OK
Successfully installed Sub-Uplevel-0.2800
Building and testing Test-Exception-0.43 ... OK
Successfully installed Test-Exception-0.43
Building and testing Acme-Damn-0.08 ... OK
Successfully installed Acme-Damn-0.08
--> Working on Sys::SigAction
Fetching http://www.cpan.org/authors/id/L/LB/LBAXTER/Sys-SigAction-0.23.tar.gz ... OK
Configuring Sys-SigAction-0.23 ... OK
Building and testing Sys-SigAction-0.23 ... 
OK
Successfully installed Sys-SigAction-0.23
--> Working on Devel::Symdump
Fetching http://www.cpan.org/authors/id/A/AN/ANDK/Devel-Symdump-2.18.tar.gz ... OK
Configuring Devel-Symdump-2.18 ... OK
Building and testing Devel-Symdump-2.18 ... OK
Successfully installed Devel-Symdump-2.18
--> Working on List::MoreUtils
Fetching http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0.428.tar.gz ... OK
Configuring List-MoreUtils-0.428 ... OK
==> Found dependencies: List::MoreUtils::XS, Exporter::Tiny
--> Working on List::MoreUtils::XS
Fetching http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-XS-0.428.tar.gz ... OK
Configuring List-MoreUtils-XS-0.428 ... OK
==> Found dependencies: XSLoader
--> Working on XSLoader
Fetching http://www.cpan.org/authors/id/S/SA/SAPER/XSLoader-0.24.tar.gz ... OK
Configuring XSLoader-0.24 ... OK
Building and testing XSLoader-0.24 ... OK
Successfully installed XSLoader-0.24 (upgraded from 0.16)
Building and testing List-MoreUtils-XS-0.428 ... OK
Successfully installed List-MoreUtils-XS-0.428
--> Working on Exporter::Tiny
Fetching http://www.cpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-1.000000.tar.gz ... OK
Configuring Exporter-Tiny-1.000000 ... OK
Building and testing Exporter-Tiny-1.000000 ... OK
Successfully installed Exporter-Tiny-1.000000
Building and testing List-MoreUtils-0.428 ... OK
Successfully installed List-MoreUtils-0.428
! Installing the dependencies failed: Module 'List::MoreUtils' is not installed
! Bailing out the installation for forks-0.36.
9 distributions installed
skaji commented 6 years ago

You mean you could reproduce the failure on your local macOS, right? Or on CircleCI only?

Either way,

sjackman commented 6 years ago

I was not able to reproduce this error on my local machine on macOS 10.11 El Capitan, only on CircleCI on macOS 10.12 Sierra. Later today I could test on a local machine running macOS 10.13 High Sierra.

❯❯❯ cpanm -V
cpanm (App::cpanminus) version 1.7043 (/usr/local/bin/cpanm)
perl version 5.018002 (perl)

  %Config:
    archname=darwin-thread-multi-2level
    installsitelib=/Library/Perl/5.18
    installsitebin=/usr/local/bin
    installman1dir=/usr/share/man/man1
    installman3dir=/usr/share/man/man3
    sitearchexp=/Library/Perl/5.18/darwin-thread-multi-2level
    sitelibexp=/Library/Perl/5.18
    vendorarch=/Network/Library/Perl/5.18/darwin-thread-multi-2level
    vendorlibexp=/Network/Library/Perl/5.18
    archlibexp=/System/Library/Perl/5.18/darwin-thread-multi-2level
    privlibexp=/System/Library/Perl/5.18
  %ENV:
  @INC:
    FatPacked::140708723979824=HASH(0x7ff94d827630)
    /Library/Perl/5.18/darwin-thread-multi-2level
    /Library/Perl/5.18
    /Network/Library/Perl/5.18/darwin-thread-multi-2level
    /Network/Library/Perl/5.18
    /Library/Perl/Updates/5.18.2
    /System/Library/Perl/5.18/darwin-thread-multi-2level
    /System/Library/Perl/5.18
    /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
    /System/Library/Perl/Extras/5.18
    .
sjackman commented 6 years ago

Here's a gist of ~/.cpanm/build.log https://gist.github.com/sjackman/46fa26d4c5b9cb02c3b501bbf533ad60

sjackman commented 6 years ago

cpanm -l perl5 forks works as expected without --self-contained, so I've got a workaround that works for me. I don't think I really needed --self-contained, so this issue is not a priority for me.

skaji commented 6 years ago

@sjackman Thanks. I suspect that the error comes from

    This version of List::MoreUtils conflicts with the version of
    List::MoreUtils v0.33 at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/List/MoreUtils.pm you have installed.

    It's strongly recommended that you carefully read
    the Changes file and test your application with
    this version before finally upgrading.

    The installed files will be removed when installing.

(Note that List::MoreUtils v0.33 is in /System/Library/Perl/Extras) I'll look into this.