Strawberry perl CPAN dmake will not build - perl

I am having a problem installing CPAN modules using strawberry perl 5.16.2.2 64 bit and later versions. When installing from CPAN dmake fails to build the module with the following error:
dmake.exe: Error executing 'C:\Windows\system32\cmd.exe; /c C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib\MIME': No such file or directory
dmake.exe: Error code -1, while making 'blib\lib\MIME\.exists'
After extensive research I have found that the fix for the problem is to add SHELL=cmd.exe to the top of the dmake Makefile file produced by perl Makefile.PL and then the module can be installed using
dmake
dmake install
The problem is that no CPAN modules will install automatically without attempting a CPAN install, editing the Makefile and running dmake manually in the cpan/build directory. Using an environment variable SHELL=cmd.exe or MAKESHELL=cmd.exe does NOT work, as the build does not run correctly if used.
Does anyone know a fix for why my Windows 7 64 bit machine has this problem?
Is there is any configuration for cpan or some other technique so that I dont have to manually edit and run the dmake makefile for every CPAN module for my strawberry perl installation?

Did you already have dmake (MinGW) installed? For me this works just fine on a standard x64 bit Windows installation.
Also, is your perl directory in path? If you don't you might need to restart your computer first before installing CPAN modules (really!).

It seems that your path is the issue:
blib\lib\MIME
Relative paths in MS Windows start with a ".\"
.\blib\lib\MIME
I'd recommend you to try it with the absolute path, first. If it works, try the relative one.

Related

What to do for Math::Pari in cpan terminal

I found this one relevant question on problems with installing Math::Pari, here. Except this is for shell and I have cpanm. I downloaded the latest version of Pari, Pari 2-7-6. Where should I extract the files in C:\Program Files (x86)\Pari-2-7-6 to install Math::Pari in perl (not in cpan shell however) successfully? Thanks in advance.
C:\Users\Jlinne\Documents> cpanm Math::Pari
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080900.zip ... OK
Configuring Math-Pari-2.01080900 ... N/A
! Configure failed for Math-Pari-2.01080900. See C:\Users\Jlinne\.cpanm\work\1476648581.10216\build.log for details.
Here is an easy way on Windows:
Download and extract the module: https://metacpan.org/pod/Math::Pari
cd into the directory you created when extracting
perl Makefile.PL force_download <- this downloads things to the right place
dmake
dmake install

Error while Installing Math::Pari

I'm trying to install Math::Pari module but getting error.
I'm installing on Windows Server 2012R2, I've Strawberry perl v5.18.4.1 32-bit currently installed on it.
Actually Math::Pari is dependency for Net::SSH::W32Perl and I want to install that module.
Following is the error log. Please Give me step by step installation procedure.
cpanm (App::cpanminus) 1.7039 on perl 5.018004 built for MSWin32-x64-multi-thread
Work directory is C:\Users\script/.cpanm/work/1438929213.2276
You have make C:\strawberry\c\bin\dmake.exe
You have LWP 6.08
Falling back to Archive::Tar 2.02
Searching Math::Pari () on cpanmetadb ...
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.010808.zip
-> OK
Unpacking Math-Pari-2.010808.zip
Entering Math-Pari-2.010808/
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.98)
Configuring Math-Pari-2.010808
Running Makefile.PL
Did not find GP/PARI build directory around.
Apparently, you are running a 64-bit Perl built with MicroSoft's compilers.
GP/PARI (at least the versions I know how to work with, 2.1.* and 2.3.*)
cannot be built in this environment. I won't auto-download GP/PARI.
If you believe that this message is printed erroneously, please report
(see files README and INSTALL), and put force_download on the command line:
perl Makefile.PL force_download
One can rerun Makefile.PL after fetching GP/PARI archive (e.g., pari-2.1.7.tgz,
or pari-2.3.4.tar.gz) manually to the current directory, or a (grand)parent
directory of the current directory.
[Keep in mind that the numbers "inside version" of Math::Pari module
correspond to the last versions of GP/PARI it was tested with (additionally,
2.0108* works best with the last 2.1.* version, 2.1.7).
As an alternative to having archive in CWD or its (grand)parent, specify
pari_tgz=PATH_TO_TAR_GZ
option to Makefile.PL.
There is no need to extract the archive, or build GP/PARI; but if you
have it extracted [and patched, if needed], you may specify
paridir=PATH_TO_DIST_DIR
option to Makefile.PL instead of `pari_tgz'. However, in this case
the files WON'T be auto-patched.
As a last-resort solution, there is also a possibility to use an already
compiled PARI library. See the documentation in README and INSTALL files.]
Could not find GP/PARI build directory, please run Makefile.PL
with paridir=/directory option.
-> N/A
-> FAIL Configure failed for Math-Pari-2.010808. See C:\Users\script\.cpanm\work\1438929213.2276\build.log for details.
I thought I'd add a note for anyone coming here as a result of a Google search after their own Math::Pari install fails under Strawberry Perl.
Here is what worked for me (Strawberry 5.22):
A. from the cpan shell, tried to install Math::Pari. this failed
B. Downloaded pari-2.1.7 and placed the extracted folder pari-2.1.7 in the cpan build folder that was created in (0). This is found, by default, in C:\Strawberry\cpan\build
C.perl Makefile.PL Configure machine=none
D. dmake
E. dmake install
It basically means that 64 bit versions of perl are not supported. It also means that if you're sure that you're running a 32 bit version incorrectly detected as 64 bit, you can try opening a command line and then doing
cd C:\Users\script\.cpanm\work\1438929213.2276\
perl Makefile.PL force_download

BOBTFISH/Task-Catalyst installation error

I am using CentOS 5.7 perl 5.14.2. While installing CPAN module Task::Catalyst
cpan -i Task::Catalyst
i am getting the error:
http://pastebin.com/N1p1UMAH
3 modules Catalyst::Authentication::Credential::HTTP, Catalyst::View::Email and Catalyst::Plugin::Session::Store::DBIC are giving installation errors
When i tried to manually install the modules , say Catalyst::View::Email
i downloaded the tar file, and then after running the ./Makefile.pl
i got the error
http://pastebin.com/ZSDLtqii
Please suggest?
Makefile.PL is just a perl script, that is generally invoked as perl Makefile.PL, and its output is a regular 'make' style makefile.
Have a look at its contents - perhaps it's been corrupted somehow. In the case of C::V::Email, it should be 39 lines long, and look exactly like this.

Perl Install PAR:Packer Problems

My perl version is 5.16.2 on my Windows 7 64bit, I failed to install PAR:Packer. I tried active perl and strawberry perl , both got the same error. Can you please give me some suggestion. Below is my experience:
I tried ppm install PAR:Packer, version 1.013, But when I use pp, I got the error:
Perl lib version (5.16.2) doesn't match executable version (v5.16.0).
I also tried cpan install PAR:Packer, version 1.014. But I got the error during installation. The pop up window says: par.exe has stopped working. Then command prompt got the error:
C:\Perl64\bin\perl.exe -Mblib run_with_inc.pl par.exe -q -B -Oparldyn.exe
system(par.exe -I C:\Users\PAR-Packer-1.014\blib\arch -I C:\Users\PAR-Packer-1.014\blib\lib - IC:/Perl64/site/lib -IC:/Perl64/lib -I. -q -B -Oparldyn.exe) failed:
dmake.exe: Error code 255, while making 'parldyn.exe'
dmake.exe: Error code 255, while making 'subdirs'
I have googled extensively, but as of yet haven't been able to find a solution, any help is greatly appreciated, thanks a lot!
I simply changed the line 60 in .../perl64/Config.pm from
`$^V eq 5.16.3`
to
`$^V eq 5.16.3 or $^V eq 5.16.0`
and voila! My par-packer module 1.013 installed through ppm (ActiveState Perl 5.16.3) works ...
I'll start off with my own environment:
Windows 7 x64 en_US
Strawberry Perl v5.16.2 32bit
I just confirmed that I do have PAR::Packer working on my environment. I'm running PAR::Packer version 1.014.
There is a bug logged about PAR::Packer 1.013 failing to build on certain environments. The bug is logged on CPAN here: https://rt.cpan.org/Public/Bug/Display.html?id=77408
I recommend trying one of the following paths forward (based on your build version requirements):
Install PAR::Packer 1.0.14.
Install the patched version of PAR::Packer 1.013 that is available at http://strawberryperl.com/package/kmx/perl-modules-patched/PAR-Packer-1.013_patched.tar.gz
To build you will need any dependencies as well. Hopefully those work just fine through CPAN.
Download either the patched version listed above or the latest version from the CPAN site, then execute:
perl Makefile.pl
dmake
dmake test
dmake install
Keep in mind PAR::Packer requires a C/C++ compiler to build.
I ran into this exact same error scenario with Perl 5.16.3 on my Windows 7 64 bit machine. I started my Perl tinkering with ActiveState and later installed other related programs like Komodo Edit and finally installed StrawberryPerl. After reading quite a few of these online posts I tried the manual dmake methods and whatever other suggestions I could find. I then tried uninstalling ActiveState. That didn't help either. Finally, I went on an uninstall binge and found that after uninstalling all of the ActiveState and Komodo applications (along with a bunch of other stuff I wasn't using anymore) I was able to successfully install and use pp in two simple steps from the cpan prompt:
install CPAN
install pp
I was going to uninstall and re-install StrawberryPerl next but didn't have to. The install CPAN may not be necessary but it was suggested in the log output in one of my previously failed attempts so I figured I'd try that first. Hope this saves someone all the hassle I went to as a begginer.

Dependency problem of Perl CPAN modules

I tried to install SOAP::WSDL on Ubuntu 8.04 Server through CPAN but got the following error message:
cpan> install SOAP::WSDL
Running install for module SOAP::WSDL
Running make for M/MK/MKUTTER/SOAP-WSDL-2.00.10.tar.gz
Checksum for /root/.cpan/sources/authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.10.tar.gz ok
SOAP-WSDL-2.00.10/
SOAP-WSDL-2.00.10/benchmark/
(skipped many lines)
SOAP-WSDL-2.00.10/README
CPAN.pm: Going to build M/MK/MKUTTER/SOAP-WSDL-2.00.10.tar.gz
# running Build.PL --installdirs site
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'SOAP-WSDL' version '2.00.10'
Prereq '0.0.5' for 'Class::Std::Fast' is not supported by Module::Build::Compat
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
I have the latest versions of Class::Std::Fast and Module::Build::Compat:
$ perl -MModule::Build::Compat -e 'print $Module::Build::Compat::VERSION;'
0.3607
$ perl -MClass::Std::Fast -e 'print $Class::Std::Fast::VERSION;'
0.0.8
Any idea how to solve the problem? Perhaps I need to downgrade Class::Std::Fast to version 0.0.5?
Long story short, it looks like your CPAN installation is preferring to use the compatibility Makefile.PL instead of the Build.PL. It should prefer the Build.PL. The Makefile.PLs were intended for compatibility only and may not have all the features of Module::Build, such as supporting three part versions.
Fire up cpan. o conf will let you see your configuration. If prefer_installer isn't set to MB then do o conf prefer_installer MB. You may have to o conf commit to save it (it will tell you). You may also have to install Module::Build, either from the libmodule-build-perl package or from CPAN.
Bug reported to SOAP::WSDL.
PS You can work around this by installing Class::Std::Fast first, download SOAP::WSDL manually, edit the Build.PL to remove that dependency, and run cpan . in SOAP::WSDL's directory to install it and its deps.
What is your CPAN version? And configuration? (o conf at the cpan shell prompt.)
Hmm, that all looks ok. Unless for some reason CPAN wasn't able to load Module::Build?
Can you try the install again from a fresh CPAN shell, with no previous commands?
Or try doing a manual install without using CPAN.pm?
Try it,
cpan Module::Build
and
cpan Module::Build::Compat
And I forget to say something, the Ubuntu modify the packages if you are trying to install modules with root user, forget. Try again with local::lib.
After you do it, do:
cpan install CPAN
and finally,
cpan upgrade
It should solve your problem.