Can't install some POE perl module in Strawberry Perl - perl

I've inherited a Perl project that uses a number of Perl modules. I've been trying to set up the environment, but it's been a nightmare. I'm now on day two of just trying to install the modules. The developer who's handing this off said he was able to install everything in about half an hour, and he never saw any of these problems.
My Environment:
Windows 10 Enterprise 20H2
Intel(R) Core(TM) i7-10850H CPU # 2.70GHz
32GB
64 bit
Strawberry Perl revision 5 version 32 subversion 1
Using CPAN Client, I've been able to install a number of modules without any issue. CPAN::Author, Test::MockObject, pp, Tk, Archive::Any, and a few others all just worked. However, POE has been a disaster.
Most times, I get stuck with a "can't move" failure:
cpan[1]> install POE
Database was generated on Tue, 26 Jul 2022 14:02:23 GMT
Running install for module 'POE'
Checksum for C:\strawberry\cpan\sources\authors\id\B\BI\BINGOS\POE-1.370.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE
Couldn't move C:\strawberry\cpan\build\tmp-12468\POE-1.370\lib to C:\strawberry\cpan\build\POE-1.370-0\lib: No such file or directory; #82295? CPAN::VERSION=2.28; File::Copy::VERSION=2.34; C:\strawberry\cpan\build\tmp-12468\POE-1.370\lib exists; C:\strawberry\cpan\build\POE-1.370-0\lib does not exist; cwd=C:/strawberry/cpan/build/tmp-12468;
I've run cpan from the command line, I've run the CPAN Client, I've run both variations as administrator, and nothing seems to work.
I've tried the "copy-hacked.pm" fix described at https://rt.cpan.org/Public/Bug/Display.html?id=82295
On some occasions, after blowing away all CPAN\BUILD\POE* directories, tmp* directories and POE*.yml files, rebooting, and running CPAN Client as administrator, I have actually gotten it (sometimes) to actually start installing/building, but then it gets stuck at "t/10_units/04_drivers/01_sysrw.t................1/17", where it sits for over an hour before we kill it.
I've tried copying the CPAN\build\POE*.* directories and POE*.yml files from the other developer, and run reload index/reload cpan, but that doesn't work, either.
Everyone else is just saying "it works for me", which doesn't really help.
Does anyone have any idea how I can force an installation of POE? Unfortunately, everything I'm finding online just says "all you have to to is run CPAN POE", so there's not much beyond that.
Needless to say, "debug perl installation process" wasn't part of the handoff plan, but right now we have no idea how to proceed.
Any help would be appreciated.

Related

cpan getting killed when installing Log::Log4perl

I'm trying to install the perl module Log::Log4perl on a basic Digital Ocean server through Ubuntu as a backup tool I'm trying to use depends on it but it keeps saying "Killed". Could anyone with experience with cpan provide some guidiance on where I can find a log file telling me what the problem is?
$ cpan Log::Log4perl
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Sat, 27 Jun 2015 12:17:02 GMT
HTTP::Date not available
..............
New CPAN.pm version (v2.10) available.
[Currently running version is v2.00]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
............Killed
It appears that this is a resource issue and it looks like other people have had similar issues with this as well. At the point in the run that you're showing, CPAN is trying to slurp that entire 02packages.details.txt.gz file into memory which is causing your OS to kill the process.
Take a look at this answer for instructions on how to use cpanm, or you could try downloading the module as a gz and run perl Makefile.PL && make && make install.
You are most likely running out of memory. I have had this issue when using a VM with 1GB of RAM and adding some swap space fixes the problem.

CPAN 1.61 has issue with embedded space in path within Cygwin on Win7

I’m a mere mortal using Cygwin on Win7 and wanting to develop perl scripts using SOAP::lite. Installation instructions I found at soaplite.com directed me to start with perl –MCPAN –e shell before attempting an > install SOAP::lite
The newb in me didn’t appreciate that my windows user profile has a space character in it and the CPAN set-up seemed to go all horribly wrong around the point where the script was writing make files for local::lib, MYMETA.yml and MYYMETA.json. I got “no such file or directory” messages quoting only the portion of the path that followed the space in my user profile.
$ uname -a
CYGWIN_NT-6.1 UKLHRL00020 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin
$ cpan --version
Loading internal null logger. Install Log::Log4perl for logging messages
/usr/bin/cpan version 1.61 calling Getopt::Std::getopts (version 1.06 [paranoid]),
running under Perl version 5.14.4.
[Now continuing due to backward compatibility and excessive paranoia.
See ``perldoc Getopt::Std'' about $Getopt::Std::STANDARD_HELP_VERSION.]
Nothing to install!
When I ran perl –MCPAN –e shell for the first time, it did report “Warning: You do not have write permission for Perl library directories.” and I elected for the default option [local::lib] for the approach to be taken.
So what can I do next?
Looking closer at the Cygwin’s setup-x86_64.exe, a search for “cpan” lists eight packages under the perl category for perl-CPAN-* and perl-Parse-CPAN*, which are all set to “Skip”. The package perl-CPANMeta: Perl distribution CPAN-Meta is version 2.150001-1 from cygwin.mirrors.pair.com. Since this is not installed yet, but the installed Perl5 has some knowledge of an old CPAN, I need to know if it is safe to install the latest and will it work with a space in my profile? Do I need to remove the old CPAN, and how?
You probably want to update to the latest version of ExtUtils::MakeMaker, recent versions contain various fixes for paths containing spaces. This should fix these issues.

Perl Module install error CPAN Spreadsheet::ParseExcel

hi am trying to install perl module from cpan in my windows machine am getting below error after hitting two times yes .
Checking if your kit is complete...
Warning: the following files are missing in your kit:
README
Please inform the author.
Writing Makefile for Digest::Perl::MD5
'nmake' is not recognized as an internal or external command,
operable program or batch file.
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Running make for D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz
Is already unwrapped into directory C:\Perl\cpan\build\Spreadsheet-ParseExcel
0.65
CPAN.pm: Going to build D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz
'nmake' is not recognized as an internal or external command,
operable program or batch file.
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
>perl exceltoxml.pl
Can't locate Spreadsheet/ParseExcel.pm in #INC (#INC contains: C:/Perl/site/lib
C:/Perl/lib .) at exceltoxml.pl line 4.
BEGIN failed--compilation aborted at exceltoxml.pl line 4.
I have tried 5 times.
nmake' is not recognized as an internal or external command
Sinan Ünür is right. The error message is that you don't have nmake installed. This means you are attempting to compile code (probably C code) and there's no C compiler or Make program.
A while ago, I would tell people that ActiveState doesn't fully support cpan because it can't compile code. ActiveState uses it's own pre-compiled packages available via the Perl Package Manager (PPM) which can be used from the command line or from a GUI interface. If a package isn't available via the PPM and it requires compilation, you were just out of luck. I would usually recommend Strawberry Perl instead of ActivePerl for this very reason. Strawberry Perl comes with the complete MinGW environment needed for those compilable CPAN modules.
However, about a half a dozen years ago, ActiveState put together an installable PPM package for the MinGW environment. Once this is installed, ActivePerl can use CPAN.
So you have two solutions:
Install this PPM package as Sinan Ünür mentioned in his answer. Then, try Spreadsheet::ParseExcel again.
Install Strawberry Perl instead of ActiveState's Perl. Strawberry Perl seems to be more compatible with the version of Perl found on Unix/Mac/Linux systems. Then try installing the Spreadsheet::ParseExcel package.
Okay, three solutions: Install Cygwin which will give you the complete Linux Environment on your Windows machine. It can take about two hours to install, but it comes with all of the GNU utilities you've known and love, most other Unix/Linux utilities, and the BASH shell.
It's what a lot of Linux/Unix homeboys use when they get sick of that ol' C:\> prompt. Cygwin comes with the latest version of Perl and works with every single CPAN package I've tried. There are a few minor issues (Like Termcaps) where things don't quite work the way they're suppose to, but I'm generally happy with it. It even comes with X11 and allows you to run XWindow apps, and even use XWindow apps across systems -- just like a REAL operating system does!
There maybe a few instances where CPAN modules may still have issues on Windows. One has to do with archiving and unarchiving modules and the missing libz library. However, installing this MinGW package (or using Strawberry Perl or Cygwin) will solve about 95% of the cpan installation issues.
I have tried 5 times.
Computers are deterministic things. That means, unless you change the conditions under which a program runs, it will always do the same thing (except, maybe, if there is a solar flare or an EMP).
So, there is no difference between issuing the same command once versus five times. If it failed the first time, ceteris paribus, it fill fail all five times.
That said, it looks like you installed ActiveState Perl, but did not install the MinGW package which provides the gcc & dmake based build tools.
So,
C:\>ppm install MinGW
and then try to install packages.
You also have the option of building your own perl using the Community Edition of Microsoft Visual Studio 2013 tools, or any other supported compiler.

perl -V failing on Windows 7, even after uninstall, reinstall, reboot cycle

I'm running 32-bit Windows 7 Starter on a cheap netbook. I used to do most of my experimental coding in ActiveState Perl but switched to node.js and stopped using Perl for some time.
I had kept my Perl up to date despite not using it so had the latest version, 5.15.3 Build 1604.
Today I found something I wanted try out in Perl but ran into some problems I'd never seen before.
The perl -V command in the console would lock up without outputting anything.
I uninstalled Perl, reinstalled, did a Windows update, and rebooted my machine but now I get a system error dialog:
The dialog is followed by this error in the console:
Can't load 'C:/Perl/site/lib/auto/Win32/Win32.dll' for module Win32: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 191.
at C:/Perl/lib/ActivePerl/Config.pm line 405.
Simple things work in perl, such as printing a literal string. ActiveState's package manager tool, ppm, seems to work fine.
I tried doing a "repair" on the installation through the control panel, but this changed nothing.
After posting the question I've noticed mentions perl512.dll!
For some reason, even though I had uninstalled and reinstalled Perl 5.15.3 something was tying it to Perl version 5.12.X ...
Since ppm was working I tried ppm upgrade Win32 and got:
Win32 0.49 (have 0.44)
Downloading Win32-0.49...done
Unpacking Win32-0.49...done
Generating HTML for Win32-0.49...done
Updating files in user area...done
2 files deleted
1 file installed
4 files updated
Perl -V now works in the console. I can't say I really understand what was going on though.

Strawberry CPAN crash after Camelbox installation

CPAN of my Strawberry perl installation used to work fine. A while ago I installed Camelbox perl to get its GTK libraries. I fixed the PATHs to leave no trace of Camelbox, and added its libs PERL5LIB. This solved my GTK-on-Windows-7 problems.
Today, I had to use CPAN again, but it crashes inexplicably. It is the Strawberry CPAN that runs.
C:\Users\tim>cpan -v
C:\strawberry\perl\bin/cpan script version 1.9, CPAN.pm version 1.9402
When I try to get anything -- including already installed modules -- CPAN successfully deletes a temporary directory, and suddenly crashes.
cpan> get List::Object
Running get for module 'List::Object'
Checksum for C:\strawberry\cpan\sources\authors\id\M\MS\MSHILTONJ\List-Object-0.01.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE
DEL(1/1): C:\strawberry\cpan\build\tmp-16240
C:\Users\tim>
I get a generic Windows perl.exe has stopped working popup.
I'm fairly sure that this is caused by Camelbox. What can I do to fix or debug this? I've found no CPAN debug switches.
As daxim suggested, I ran cpan in the perl debugger. Here is the output as RAR (127 KB) and clear text (10.8 MB).
I fixed the PATHs to leave no trace of Camelbox, and added its libs PERL5LIB [to a Strawberry installation]
Your self-caused problem is on the C/object linking level. Mixing XS libraries for different versions of Perl is a bad idea.
Run the CPAN client under the Perl debugger, enable trace, continue until the crash happens. The Perl library that was loaded last hints you at the faulty link library. My gut suspects readline.
Crash occurs at Compress/Raw/Bzip2.pm line 63 which is XSLoader::load('Compress::Raw::Bzip2', $XS_VERSION);. This attempts to load the XS Bzip2 DLL whose exact name eludes me because I don't have a Strawberry installation around for checking. Reinstall this library without invoking the CPAN client, or try to hunt down all the pieces and delete them.