1

I am trying to install GD and Chart to Strawberry Perl in a Windows 10 Pro PC (using CPANM). Both GD and Chart requires a dependency called ExtUtils::MakeMaker. Unfortunately MakeMaker fails to be install and I cannot tell what the error is. I hope someone can understand the error message and tell me what goes wrong.

That is how I try to install Chart and the few error message that I get:

cpanm Chart

--> Working on Chart
Fetching http://www.cpan.org/authors/id/L/LI/LICHTKIND/Chart-v2.402.1.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.64.tar.gz ... OK
Configuring ExtUtils-MakeMaker-7.64 ... N/A
! Configure failed for ExtUtils-MakeMaker-7.64. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.
Configuring Chart-v2.402.1 ... N/A
! Configure failed for Chart-v2.402.1. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.

The build.log says this:

cpanm (App::cpanminus) 1.7046 on perl 5.012003 built for MSWin32-x86-multi-thread
Work directory is C:\Users\..user-name../.cpanm/work/1655122864.2228
You have make C:\Strawberry\c\bin\dmake.exe
You have LWP 6.02
Falling back to Archive::Tar 1.76
Searching Chart () on cpanmetadb ...
--> Working on Chart
Fetching http://www.cpan.org/authors/id/L/LI/LICHTKIND/Chart-v2.402.1.tar.gz
-> OK
Unpacking Chart-v2.402.1.tar.gz
Entering Chart-v2.402.1
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... No (6.56 < 6.58)
==> Found dependencies: ExtUtils::MakeMaker
Searching ExtUtils::MakeMaker (6.58) on cpanmetadb ...
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.64.tar.gz
-> OK
Unpacking ExtUtils-MakeMaker-7.64.tar.gz
Entering ExtUtils-MakeMaker-7.64
Checking configure dependencies from META.json
Configuring ExtUtils-MakeMaker-7.64
Running Makefile.PL
-> N/A
-> FAIL Configure failed for ExtUtils-MakeMaker-7.64. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.
Configuring Chart-v2.402.1
Running Makefile.PL
-> N/A
-> FAIL Configure failed for Chart-v2.402.1. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.

Please let me know what goes wrong and how to fix this problem. If there is no solution to this problem, I would like to know if there is any workaround. Thanks.

UPDATE 1: I installed the latest version of Perl (5.32.1.1). Unfortunately I still cannot install the dependency MakeMaker for Chart library. The content in the build.log after trying to install Chart is:

cpanm (App::cpanminus) 1.7046 on perl 5.032001 built for MSWin32-x86-multi-thread-64int
Work directory is C:\Users\...user-name.../.cpanm/work/1655143835.7588
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.52
Falling back to Archive::Tar 2.38
Searching Chart () on cpanmetadb ...
--> Working on Chart
Fetching http://www.cpan.org/authors/id/L/LI/LICHTKIND/Chart-v2.402.1.tar.gz
-> OK
Unpacking Chart-v2.402.1.tar.gz
Entering Chart-v2.402.1
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.58)
Configuring Chart-v2.402.1
Running Makefile.PL
-> N/A
-> FAIL Configure failed for Chart-v2.402.1. See C:\Users\...user-name...\.cpanm\work\1655143835.7588\build.log for details.

UPDATE 2: I used the -v switch with CPANM to install Chart, and this somehow worked fine. I don't know why -v switch can make a difference. But I am glad that this works for installing Chart. Now Chart is successfully installed. Unfortunately when I try to install GD using the -v switch, I run into the same error.

The build.log of my latest attempt is the following:

cpanm (App::cpanminus) 1.7046 on perl 5.032001 built for MSWin32-x86-multi-thread-64int
Work directory is C:\Users\...user-name.../.cpanm/work/1655147078.2428
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.52
Falling back to Archive::Tar 2.38
Searching GD () on cpanmetadb ...
--> Working on GD
Fetching http://www.cpan.org/authors/id/R/RU/RURBAN/GD-2.76.tar.gz
-> OK
Unpacking GD-2.76.tar.gz
Entering GD-2.76
Checking configure dependencies from META.json
Checking if you have ExtUtils::PkgConfig 0 ... Yes (1.16)
Checking if you have ExtUtils::Constant 0.22 ... Yes (0.25)
Configuring GD-2.76
Running Makefile.PL
-> N/A
-> FAIL Configure failed for GD-2.76. See C:\Users\...user-name...\.cpanm\work\1655147078.2428\build.log for details.

Please note that the build.log mentioned in the last line above is the same build.log that I have posted right above. I don't know why it refers to itself. I mention this just in case someone wants to see the "real" build.log.

UPDATE 3: Finally with the help from Håkon Hægland, I figured out that the PATH of the computer was missing several paths (namely C:\Windows;C:\Windows\System32;C:\Windows\System32\Wbem). I added the missing paths to PATH, and the installation is successful. I have no idea why those important paths would go missing. But I am glad that the installation of GD and Chart are successful.

Jay C
  • 141
  • 1
  • 12
  • *"Checking if you have ExtUtils::MakeMaker 6.58 ... No (6.56 < 6.58)"* Which version of strawberry perl is this? Maybe you need to upgrade it? – Håkon Hægland Jun 13 '22 at 14:40
  • 2
    *"cpanm (App::cpanminus) 1.7046 on perl 5.012003"*: seems like you are using perl version 5.12? Then I would recommend upgrading your perl, version 5.12 is 12 years old now – Håkon Hægland Jun 13 '22 at 14:43
  • Thanks for the suggestion of installing the latest version of Perl. Unfortunately, I still cannot install the dependency ExtUtils::MakeMaker. The latest version of Perl that I have just installed is Strawberry Perl version 5.32.1.1 that is the latest Windows version from Perl.org. I will put the build.log content in the main body of this message thread. – Jay C Jun 13 '22 at 18:16
  • From your last update, it is clear that it is not ExtUtils::MakeMaker that fails now: *"Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.58)"* but something else. Please include the relevant part of `build.log` in your question. – Håkon Hægland Jun 13 '22 at 18:24
  • 1
    I tried to install [Chart](https://metacpan.org/pod/Chart) on Windows 11 now. It installed fine, [here](https://pastebin.com/QdhH2VM7) is the log. – Håkon Hægland Jun 13 '22 at 18:36
  • Thanks for letting me know your exact command to install Chart. I notice that you use the "-v" switch as in "cpanm -v Chart" to install Chart. I follow your step and surprisingly I can install Chart without any problem. This is GERAT! Unfortunately when I try to use the same -v switch to install GD library, I run into the same problem. I will put the build.log in the main body of my original post above. – Jay C Jun 13 '22 at 19:26
  • *".. when I try to use the same -v switch to install GD library, I run into the same problem"* strange, and the build.log shows nothing interesting? Btw, it installs fine here: [log](https://pastebin.com/LiUkxL7F). Can you try to install the distribution manually? – Håkon Hægland Jun 13 '22 at 19:38
  • 1
    [Here](https://pastebin.com/vUvrpPN5) is an example of how to configure manually – Håkon Hægland Jun 13 '22 at 19:48
  • 1
    Thanks a lot for showing me the steps to manually install the GD library. This helps me to figure out what went wrong. When I tried the "curl" command, I got an error saying that Windows cannot find the command. This helped me to figure out that the PATH in that PC was missing the path to C:\Windows\System32 (and several others). I added the missing paths, and installation of GD works fine. I don't think I would be able to figure this out without your help. Thanks a lot! How do I mark your last comment as the "Answer"? – Jay C Jun 14 '22 at 13:05

1 Answers1

0

With the help from Håkon Hægland, I finally figured out that the PATH of the computer somehow was missing several important paths, namely C:\Windows, C:\Windows\System32, and C:\Windows\System32\Wbem. This explains the reason why CPANM failed to install GD and Chart. It probably could not get access to a command to install the distribution or its dependency. After I have added the missing paths to PATH, I have no problem using CPANM to install GD and Chart.

As of why those paths were missing from PATH, I have no idea. I don't recall this problem ever happened to me.

As of why I could use CPANM to install Chart using the -v switch despite the fact that the paths were missing, I have no idea either.

Jay C
  • 141
  • 1
  • 12