1

I'm on Strawberry Perl on Windows 7 64-bit. cpanm fails like this for many packages in cpan:

$ cpanm Getopt::Long::Descriptive
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.097.tar.gz ... OK
Configuring Getopt-Long-Descriptive-0.097 ... N/A
! The distribution doesn't have a proper Makefile.PL/Build.PL See C:\Users\me\.cpanm\work\1399608810.1056\build.log for details.

Yet, cpan -i Getopt::Long::Descriptive succeeds. Any idea why?


EDIT (build.log output)

cpanm (App::cpanminus) 1.7001 on perl 5.018002 built for MSWin32-x64-multi-thread
Work directory is C:\Users\me/.cpanm/work/1399608810.1056
You have make C:\strawberry\c\bin\dmake.exe
You have LWP 6.05
You have C:\dev\tools\UnxUtils\usr\local\wbin\tar.exe, C:\dev\tools\UnxUtils\usr\local\wbin\gzip.exe and C:\dev\tools\UnxUtils\usr\local\wbin\bzip2.exe
You have C:\dev\tools\UnxUtils\usr\local\wbin\unzip.exe
Searching Getopt::Long::Descriptive on cpanmetadb ...
--> Working on Getopt::Long::Descriptive
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.097.tar.gz
-> OK
Unpacking Getopt-Long-Descriptive-0.097.tar.gz
Entering Getopt-Long-Descriptive-0.097
META.yml/json not found. Creating skeleton for it.
Configuring Getopt-Long-Descriptive-0.097
-> N/A
-> FAIL The distribution doesn't have a proper Makefile.PL/Build.PL See C:\Users\me\.cpanm\work\1399608810.1056\build.log for details.

EDIT (unpacking issue)

Fascinating, it appears that the files are unpacked, but never show up on disk!

C:\Users\me>cpanm -v --look Getopt::Long::Descriptive
cpanm (App::cpanminus) 1.5018 on perl 5.016002 built for MSWin32-x64-multi-thread
Work directory is C:\Users\me/.cpanm/work/1399909160.7264
You have make C:\strawberry\c\bin\dmake.exe
You have LWP 6.04
You have C:\UnxUtils\usr\local\wbin\tar.exe, C:\UnxUtils\usr\local\wbin\gzip.exe and C:\UnxUtils\usr\local\wbin\bzip2.exe
You have C:\UnxUtils\usr\local\wbin\unzip.exe
Searching Getopt::Long::Descriptive on cpanmetadb ...
--> Working on Getopt::Long::Descriptive
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.097.tar.gz ... OK
Unpacking Getopt-Long-Descriptive-0.097.tar.gz
Getopt-Long-Descriptive-0.097
README
Changes
LICENSE
dist.ini
META.yml
MANIFEST
META.json
Makefile.PL
t
descriptive.t
shortcircuit.t
release
pod-syntax.t
000-report-versions-tiny.t
Long
Descriptive.pm
changes_has_content.t
Descriptive
Opts.pm
Usage.pm
Entering Getopt-Long-Descriptive-0.097
Entering C:/Users/me/.cpanm/work/1399909160.7264/Getopt-Long-Descriptive-0.097 with C:\Windows\system32\cmd.exe
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\me\.cpanm\work\1399909160.7264\Getopt-Long-Descriptive-0.097>dir
 Volume in drive C is OS
 Volume Serial Number is 008E-DBB0

 Directory of C:\Users\me\.cpanm\work\1399909160.7264\Getopt-Long-Descriptive-0.097

05/12/2014  11:39 AM    <DIR>          .
05/12/2014  11:39 AM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  48,360,112,128 bytes free

EDIT (found files, up one level)

C:\Users\me\.cpanm\work\1399909160.7264\Getopt-Long-Descriptive-0.097>cd ..

C:\Users\me\.cpanm\work\1399909160.7264>ls
000-report-versions-tiny.t            Makefile.PL
Changes                               Opts.pm
Descriptive                           README
Descriptive.pm                        Usage.pm
Getopt-Long-Descriptive-0.097         changes_has_content.t
Getopt-Long-Descriptive-0.097.tar.gz  descriptive.t
LICENSE                               dist.ini
Long                                  pod-syntax.t
MANIFEST                              release
META.json                             shortcircuit.t
META.yml                              t
6
  • That is weird, because Getopt::Long::Descriptive version 0.097 does contain a Makefile.PL. Can you inspect the build log pointed to by the error message?
    – Edward
    May 9, 2014 at 7:06
  • I added the build.log information. Of note: the Getopt-Long-Descriptive-0.097 directory in .cpanm\work\1399608810.1056 is empty. I'm assuming cpanm deleted the contents after an unsuccessful install? The other packages I installed with this run do not have empty directories. May 9, 2014 at 7:22
  • So build.log isn't very helpful, either ... It seems like something went wrong unpacking the dist. Did you know you can run cpanm --look Getopt::Long::Descriptive to make cpanm unpack the dist for you? It will change to the directory where it unpacked the dist, so you can run perl Makefile.PL, make and all that stuff manually.
    – Edward
    May 12, 2014 at 7:18
  • Regarding --look output: when I run wget, gunzip, and tar by hand, the files unpack fine. May 12, 2014 at 15:47
  • I searched my hard disk, and found the files. They weren't unpacked into the subdirectory cpanm expected them to be in. Instead, they were unpacked into the directory above. I wonder if this is a cpan requirement that the package is missing, or if cpanm could be a little better at detecting files in the root of the archive. May 12, 2014 at 16:19

1 Answer 1

0

It turns out UnxUtils tar was at fault in this case. I'm not sure how the Getopt::Long::Descriptive archive was created, but UnxUtils tar flattens the contents when it is unpacked.

On the other hand, GnuWin32 tar handles the archive just fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .