How to build PPM/CPAN modules on 64-bit windows?

Posted by trillich on 2009-12-09 07:33
Forums: PPM | OS: Windows x64

We've downloaded and installed activeperl 5.10 on a 64-bit windows server but can't get any extra modules to build (ppm, cpan) without a MAKE utility. NMAKE is 16-bit which runs on 32-bit systems, but not on 64-bit systems. DMAKE is heralded as the solution, but it's source-code only and we don't have a C compiler to build it!

Any ideas on how we can get CPAN/PPM modules (e.g. Win32::GUI) to build in a 64-bit windows environment?

grahams
ActiveState Staff
Tue, 2010-04-06 15:13

That's what we use to build 64-bit ActivePerls. It comes with a newer version of nmake.

a50mhzham | Wed, 2012-07-04 12:45

The response I get to cpan install <any module> is show below.

  • I'm typing simply "cpan install <some module>" - is that wrong?
  • I did the default install -- does it set appropriate paths- see next question
  • Does it matter what directory I'm sitting in when I run CPAN?
C:\Perl64\my.programs>cpan install Device::SerialPort

It looks like you don't have a C compiler and make utility installed.  Trying
to install dmake and the MinGW gcc compiler using the Perl Package Manager.
This may take a a few minutes...

ppm.bat install failed: Can't find any package that provides MinGW

It looks like the installation of dmake and MinGW has failed.  You will not be
able to run Makefile commands or compile C extension code.  Please check your
internet connection and your proxy settings!

Skipping a long list of modules,

Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
  COOK/Device-SerialPort-1.04.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites

Please help. I'm stuck right here and can't proceed further.

a50mhzham | Wed, 2012-07-04 13:40

Based on a comment I saw elsewhere in this forum,

...install Microsoft Visual C++ 2010 Express (free) on Windows 7 64-bit then add the VC binary folder ("C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin") to the system %PATH% variable. You should now be able to install CPAN Perl modules by issuing "cpan install " in an administrator terminal window (command prompt).

I did that. I still don't understand the output, but I know it failed. I did confirm that there's now a copy of nmake.exe in the directory I added below, and that it's in my path.

C:\Perl64>path %PATH%;D:\Programs\Microsoft Visual Studio 10.0\VC\bin

C:\Perl64>cpan install Device::SerialPort
CPAN: Term::ANSIColor loaded ok (v3.02)
CPAN: Storable loaded ok (v2.35)
Reading 'C:\Perl64\cpan\Metadata'
  Database was generated on Wed, 04 Jul 2012 10:19:03 GMT
Running install for module 'Device::SerialPort'
Running make for C/CO/COOK/Device-SerialPort-1.04.tar.gz
CPAN: Digest::SHA loaded ok (v5.71)
CPAN: Compress::Zlib loaded ok (v2.052)
Checksum for C:\Perl64\cpan\sources\authors\id\C\CO\COOK\Device-SerialPort-1.04.
tar.gz ok
CPAN: Archive::Tar loaded ok (v1.88)
Device-SerialPort-1.04/
Device-SerialPort-1.04/modemtest
Device-SerialPort-1.04/t/
Device-SerialPort-1.04/t/10basic.t
Device-SerialPort-1.04/t/AltPort.pm
Device-SerialPort-1.04/t/21inherited-state.t

<snip>

Device-SerialPort-1.04/META.yml
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
CPAN: CPAN::Meta loaded ok (v2.120921)

  CPAN.pm: Building C/CO/COOK/Device-SerialPort-1.04.tar.gz

To enable serial port tests, use:
        perl Makefile.PL TESTPORT=<DEVICE>
where <DEVICE> is a specific port or 'auto' to autodetect.
Running ./configure ...
'.' is not recognized as an internal or external command,
operable program or batch file.
The 'configure' script didn't like something.  It should have told you
what went wrong, but you can check 'config.log' for more details.
Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
CPAN: YAML::XS loaded ok (v0.38)
  COOK/Device-SerialPort-1.04.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites

I can't find any config.log

Help!