Subject: | Install Fails in Homebrew |
Date: | Wed, 4 Nov 2020 13:17:39 -0500 |
To: | bug-IO-Pager [...] rt.cpan.org |
From: | "David E. Wheeler" <david [...] justatheory.com> |
Installation fails when installing IO::Pager as part of a Homebrew installation:
```
david@fineman IO-Pager-2.01 % perl Makefile.PL
Warning: prerequisite Term::ReadKey 0 not found.
Generating a Unix-style Makefile
Writing Makefile for IO::Pager
Writing MYMETA.yml and MYMETA.json
david@fineman IO-Pager-2.01 % make
make: *** No rule to make target `blib/lib/IO/Pager/tp', needed by `blib/script/tp'. Stop.
make: *** Waiting for unfinished jobs....
cp lib/IO/Pager/Buffered.pm blib/lib/IO/Pager/Buffered.pm
cp lib/IO/Pager/tp blib/lib/IO/Pager/tp
cp lib/IO/Pager/Unbuffered.pm blib/lib/IO/Pager/Unbuffered.pm
cp lib/IO/Pager/less.pm blib/lib/IO/Pager/less.pm
cp lib/IO/Pager/Perl.pm blib/lib/IO/Pager/Perl.pm
cp lib/IO/Pager.pm blib/lib/IO/Pager.pm
cp lib/IO/Pager/Page.pm blib/lib/IO/Pager/Page.pm
david@fineman IO-Pager-2.01 % echo $?
2
```
Immediately running `make` again succeeds:
```
david@fineman IO-Pager-2.01 % make
cp blib/lib/IO/Pager/tp blib/script/tp
"/usr/local/Cellar/perl/5.32.0/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/tp
Manifying 1 pod document
Manifying 6 pod documents
david@fineman IO-Pager-2.01 % echo $?
0
```
Here’s the version of make:
```
david@fineman IO-Pager-2.01 % make version
make: *** No rule to make target `version'. Stop.
david@fineman IO-Pager-2.01 % make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
```
Seems like it tries to make blib/script/tp before it makes blib/lib/IO/Pager/tp. I think this can be fixed by depending on lib, not blib; here’s the patch:
```
diff --git a/Makefile.PL b/Makefile.PL
index f748bbf..13b355f 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -26,7 +26,7 @@ WriteMakefile(
'Text::Wrap' => 0,
'Tie::Handle' => 0,
},
- EXE_FILES => [ 'blib/lib/IO/Pager/tp' ],
+ EXE_FILES => [ 'lib/IO/Pager/tp' ],
META_MERGE => {
"meta-spec" => { version => 2 },
runtime => {
```
And the result:
```
david@fineman IO-Pager-2.01 % perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Term::ReadKey 0 not found.
Generating a Unix-style Makefile
Writing Makefile for IO::Pager
Writing MYMETA.yml and MYMETA.json
david@fineman IO-Pager-2.01 % make
cp lib/IO/Pager/tp blib/script/tp
"/usr/local/Cellar/perl/5.32.0/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/tp
cp lib/IO/Pager.pm blib/lib/IO/Pager.pm
cp lib/IO/Pager/Unbuffered.pm blib/lib/IO/Pager/Unbuffered.pm
cp lib/IO/Pager/Perl.pm blib/lib/IO/Pager/Perl.pm
cp lib/IO/Pager/Buffered.pm blib/lib/IO/Pager/Buffered.pm
cp lib/IO/Pager/less.pm blib/lib/IO/Pager/less.pm
cp lib/IO/Pager/tp blib/lib/IO/Pager/tp
cp lib/IO/Pager/Page.pm blib/lib/IO/Pager/Page.pm
Manifying 1 pod document
Manifying 6 pod documents
david@fineman IO-Pager-2.01 % echo $?
0
```
Thanks,
David
Message body not shown because it is not plain text.