Perl Install PAR:Packer Problems - perl

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.

Related

Installing Perl with Perlbrew

I am trying to install Perl version 5.19.2 or version 5.19.8 with perlbrew. I am using the following command to install:
perlbrew -v install perl-5.19.8 (or 5.19.2) -Dcc=gcc
Everytime no matter what version I am trying to install I keep getting the following error:
FatPacker error loading Devel/PatchPerl.pm (could be a perl installation issue?) at /Path/to/my/perl/bin/patchperl line 33687
I am not sure whats going on. I am not very experienced in Perl. If anyone can offer me some tips/help that will be great.
Thanks

Strawberry perl CPAN dmake will not build

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.

installing perl module Class-Load-XS

I tried to install module Class-Load-XS-0.04 manually. I saw the following error:
$ perl Build.PL
Warning: ExtUtils::CBuilder not installed or no compiler detected
Proceeding with configuration, but compilation may fail during Build
However, the execution of perl -e 'use ExtUtils::CBuilder' was perfectly fine. I even tried to re-install ExtUtils::CBuilder, but it still does not work.
Could you please help?
I tried on my Win 7 machine, and it shows some warnings like this when I do perl Build.pl:
collect2: ld returned 1 exit status
Checking prerequisites...
requires:
! Class::Load is not installed
build_requires:
! Class::Load is not installed
! Module::Implementation is not installed
! Test::Fatal is not installed
! Test::Requires is not installed
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
Then I installed the above mentioned modules, and things went fine then.
You may try install these modules first.
Hope it helps.
It looks to me like you don't have a compiler. Try this:
perl -e 'use ExtUtils::CBuilder; $cb = ExtUtils::CBuilder->new; print $cb->have_compiler ? "have\n" : "dont have\n";'
Can I guess that you are on Windows using ActiveState Perl? If so perhaps try Strawberry Perl which comes with a compiler.
Had a similar problem installing a different module (Win32::Mutex). This isn't a great fix, but it got the job done. From the build directory (e.g., ~/.cpan/build/The-Module-mYyzLx)
First, set the CC environment variable yourself
SET CC=C:\strawberry\c\bin\g++.exe [Windows]
export CC=/usr/bin/g++.exe [Cygwin]
and try to build (perl Build.PL, perl Build, ...). If it is still complaining about missing programs (g++, dlltool, etc.):
Second, copy pieces of your tool chain into the build directory
COPY C:\strawberry\c\bin\g++.exe . [Windows]
COPY C:\strawberry\c\bin\dlltool.exe .
cp /usr/bin/g++ . [Cygwin]
cp /usr/bin/dlltool .
If the build still complains about missing programs, copy those to your build directory too.
The fix and the symptoms are consistent with ExtUtils::CBuilder not being able to use the current PATH setting, though I have no idea what that would be so difficult.
I'd suggest installing these first:
apt-get install libc6-dev
and
apt-get install libtest-exception-perl
By the way you describe the problem it looks like you have these two perl modules missing. On the other hand it takes just a couple of seconds to double-check if those are installed, but these 'seconds' could help you save on a lot of head ache.

How to install GD library with Strawberry Perl

I am attempting to install the GD library using Strawberry perl and GnuWin32. However, when I enter "install GD" in the CPAN shell, the following message appears:
'gdlib-config' is not recognized as an internal or external command, operable program or batch file. **UNRECOVERABLE ERROR** Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
I believe perl is having difficulty locating the GD library installed at C:\Program Files\GnuWin32\bin, but I am not sure how to fix this. I am still new to perl, so any help would be appreciated.
Your error is confirmed on cpan testers.
Looks like you need to manually compile and install gdlib.
If you make sure that C:\Program Files\GnuWin32\bin is in your PATH variable ($PATH? %PATH%? I'm not sure which one GnuWin32 uses) before you start CPAN, the installer should find the gdlib-config program and you will at least be able to get through that step of the installation.
Run 'Makefile.PL' manually. It will show you list of parameters. Try running it with parameter "-lib_gd_path".
GD may be included in Strawberry 5.10.1.0 beta. A good place to ask is irc://irc.perl.org/#win32 IRC channel.
Which version of Strawberry Perl are you using? I am using the one bundled with Padre and GD came with it:
C:\opt> perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread
uname='Win32 padre 5.10.0.7.beta_1 #1 20 i386'
...
And:
C:\opt> perl -MGD -Mfeature=say -e "say $GD::VERSION"
2.44

Why can't I install DBD::mysql so I can use it with Maatkit?

I'm trying to install Maatkit following the maatkit instructions. I can't get past having to install DBD::mysql. "Warning: prerequisite DBD::mysql 1 not found."
When I try to install DBD::mysql from cpan, I get very helpful "make had returned bad status, install seems impossible".
Perl is "v5.8.8 built for darwin-thread-multi-2level", the one that came with OS X. I also tried building from source with same result.
We need more of the error message. Most likely, you are missing the MySQL client development files. I don't know how to install these on OSX. Also see this older post on OSX 10.5.2 , in which some other failures with the mysql client libraries are found.
Possibly post this question with more parts of your error message at perlmonks.org, if stackoverflow doesn't allow for convenient pasting of your make session or rather the last 20 or 10 lines of it.
Some more Googling with site:perlmonks.org also finds this post which has some more details on things to watch out for when installing DBD::MySQL. Depending on how comfortable you feel with the installation, you might want to manually run the tests, supplying a test database and test user or even skip testing the module.
After a bit more googling, this worked for me:
sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
sudo ln -s /usr/local/mysql/include /usr/local/mysql/include/mysql
sudo perl -MCPAN -e 'install Bundle::DBD::mysql'
press enter a bunch of times, then in your maatkit folder:
perl Makefile.PL
sudo make install
and you'll find the mk-* programs in /usr/local/bin/
You will want to install MySQL first. I usually use the binary packages they provide for OS X. The packages do include the headers and MySQL client libraries which DBD::MySQL requires. Once the MySQL package is installed, DBD::MySQL should install without issue.
Here is my output:
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite DBD::mysql 1 not found.
Writing Makefile for maatkit
$ mysql --version
mysql Ver 14.12 Distrib 5.0.51b, for apple-darwin9.0.0b5 (i686) using readline 5.0
I notice that there are in effect DBD::MySQL packages in the fink repositories. For example:
ayaz#ayazs-macbook$ fink list | grep -i 'dbd-mysql'
dbd-mysql-pm586 3.0008-10 Perl5 Database Interface to MySQL
dbd-mysql-pm588 3.0008-10 Perl5 Database Interface to MySQL
Perhaps installing through fink one of those packages may help alleviate your troubles.
Also, and I cannot be certain of this, you may want to install for MySQL-5.x (if you have that version installed) the mysql15-dev and mysql15-shlibs packages. I installed those through fink thus:
$ sudo fink --use-binary-dist install mysql15-dev