Subject: | Circular dependency between Module::Install and Module::ScanDeps |
[This is mostly the same report as that which I just filed for Module-ScanDeps: https://rt.cpan.org/Ticket/Display.html?id=118787. Cross-filing here because, as is shown below, a circular dependency is a problem for both libraries and warrants a ticket in each library's queue, if only for tracking purposes.]
A circular dependency exists between Module-Install and Module-ScanDeps.
Going first to http://cpansearch.perl.org/src/ETHER/Module-Install-1.17/Makefile.PL, we find:
#####
requires 'Module::ScanDeps' => '1.09'; #detects prereqs better
#####
So Module::ScanDeps must be installed before we can attempt to install Module::Install. But if we now go to
http://cpansearch.perl.org/src/RSCHUPP/Module-ScanDeps-1.22/Makefile.PL, we find:
#####
use inc::Module::Install 1.00;
#####
In other words, merely to get to 'make' with Module::ScanDeps, we must already have Module::Install installed.
Implication: If we are unable to install one of these two libraries, we'll be unable to install the other.
This is precisely the situation we find ourselves in when we attempt to build perl blead with the new '-Ddefault_inc_excludes_dot' configuration argument. I have built such a perl and then installed 'App::cpanminus' against it. When I attempt to use 'cpanm' to install either Module::Install or Module::ScanDeps against that perl, I fail for lack of the other.
First, let's see what happens when I start by trying to install Module::Install.
#####
$ ./bin/cpanm install Module::Install
install is up to date. (0.01)
--> Working on Module::Install
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Module-Install-1.17.tar.gz ... OK
Configuring Module-Install-1.17 ... OK
==> Found dependencies: Module::ScanDeps
--> Working on Module::ScanDeps
Fetching http://www.cpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.22.tar.gz ... OK
Configuring Module-ScanDeps-1.22 ... N/A
! Configure failed for Module-ScanDeps-1.22. See /home/jkeenan/.cpanm/work/1479261391.29214/build.log for details.
! Installing the dependencies failed: Module 'Module::ScanDeps' is not installed
! Bailing out the installation for Module-Install-1.17.
#####
Let's look at the log.
#####
$ vi /home/jkeenan/.cpanm/work/1479261391.29214/build.log
[snip]
Checking if you have Module::ScanDeps 1.09 ... No
[snip]
==> Found dependencies: Module::ScanDeps
Searching Module::ScanDeps (1.09) on cpanmetadb ...
--> Working on Module::ScanDeps
Fetching http://www.cpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.22.tar.gz
-> OK
Unpacking Module-ScanDeps-1.22.tar.gz
Entering Module-ScanDeps-1.22
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.59 ... Yes (7.24)
Configuring Module-ScanDeps-1.22
Running Makefile.PL
Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /home/jkeenan/testing/nodot/lib/perl5/site_perl/5.25.7/x86_64-linux /home/jkeenan/testing/nodot/lib/perl5/site_perl/5.25.7 /home/jkeenan/testing/nodot/lib/perl5/5.25.7/x86_64-linux /home/jkeenan/testing/nodot/lib/perl5/5.25.7) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
-> N/A
-> FAIL Configure failed for Module-ScanDeps-1.22. See /home/jkeenan/.cpanm/work/1479261391.29214/build.log for details.
-> FAIL Installing the dependencies failed: Module 'Module::ScanDeps' is not installed
-> FAIL Bailing out the installation for Module-Install-1.17.
Expiring 3 work directories.
#####
Second, let's see what happens when I start by trying to install Module::ScanDeps.
#####
$ ./bin/cpanm install Module::ScanDeps
install is up to date. (0.01)
--> Working on Module::ScanDeps
Fetching http://www.cpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.22.tar.gz ... OK
Configuring Module-ScanDeps-1.22 ... N/A
! Configure failed for Module-ScanDeps-1.22. See /home/jkeenan/.cpanm/work/1479261659.29269/build.log for details.
#####
Looking into the next log file, we find:
#####
$ vi /home/jkeenan/.cpanm/work/1479261659.29269/build.log
[snip]
Running Makefile.PL
Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /home/jkeenan/testing/nodot/lib/perl5/site_perl/5.25.7/x86_64-linux /home/jkeenan/testing/nodot/lib/perl5/site_perl/5.25.7 /home/jkeenan/testing/nodot/lib/perl5/5.25.7/x86_64-linux /home/jkeenan/testing/nodot/lib/perl5/5.25.7) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
-> N/A
-> FAIL Configure failed for Module-ScanDeps-1.22. See /home/jkeenan/.cpanm/work/1479261659.29269/build.log for details.
#####
Speaking personally: I've never been a fan of Module::Install and have never used it in any my own libraries on CPAN or elsewhere. But at least one of my libraries has a dependency on File::HomeDir which, several years ago, was held up as the best practice for locating a home directory. File::HomeDir, in turn, has a dependency on Module::Install. So if Module::Install cannot be installed, then my own library cannot be installed.
I therefore have a strong incentive to get Module::Install into a minimally functional state. A first step in that direction would be to break the circular dependency.
Thank you very much.
Jim Keenan