3

I am trying to install CPAN module on Windows 7. I don't have Active Perl so can't use PPM package.

The steps given on all sites include these three steps: make, make test and make install. I know that make is unix command and won't run on Windows.

What command I shall run on Windows to complete installation?

I downloaded dmake from CPAN's site as mentioned by one of the site but when I run it, it gives following error -

D:\Parse-RecDescent-1.965001.tar\Parse-RecDescent-1.965001>D:\dmake\dmake\dmake dmake: Error: -- `D:\indigoampp\perl-5.12.1\libConfig.pm' not found, and can't be made

Please let me know how shall I complete these steps. Thanks!

PS: Again, PPM is not an option.


Thanks everyone.

There is a file called Config_heavy.pl at indigoampp\perl-5.12.1\lib location. It had a line: make='nmake'. I changed that to make='dmake' as I am using dmake commands.

After this, I didn't need to change DIRFILESEP in Makefile of each module. It is now generating \\ as mentioned in of the above links.

So I can run dmake, dmake test and dmake install now. However it doesn't do anything. It didn't copy pm file/files at respective locations. Why so??

Anyway, I manually copied pm file/files in hope that everything should work. However that I could do before as well. Why did I run makefile.pl and dmake commands??

Also, my aim was to install Apache2::Request module. I found that it's dependent on multiple modules. I downloaded those modules and ran above commands for them - no error as such. In the end, when I ran these steps for Apache2::Request module, I get following error in dmake command:

D:\libapreq2-2.12.tar\libapreq2-2.12>dmake
dmake:  makefile:  line 25:  Warning: -- Duplicate target [Release]
dmake:  makefile:  line 25:  Warning: -- Duplicate target [Release]
dmake:  makefile:  line 25:  Warning: -- Duplicate target [!=]
dmake:  makefile:  line 25:  Error: -- Expecting macro or rule defn, found neith
er

I don't find anything suspicious in Makefile under libapreq2-2.12.tar\libapreq2-2.12 folder. The partical content of Makefile (around the error line) is:

LIBAPREQ=libapreq2
APREQ2_TEST=apreq2_test
CGITEST=test_cgi
MOD=mod_apreq2

!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE CFG="Release"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 
!ERROR An invalid configuration is specified.
!ENDIF 

!IF "$(APACHE)" == ""
!MESSAGE No Apache directory was specified.
!MESSAGE Please run Configure.bat to specify a valid Apache directory.
!ERROR
!ENDIF

Can anyone help with this & above question (why it didn't copy pm files automatically)? Thanks for your time!

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
keeping_it_simple
  • 439
  • 1
  • 11
  • 31
  • You question is similar to http://cpanforum.com/posts/9514 and maybe this should solve it: http://cpanforum.com/posts/9716 . – Alan Haggai Alavi Nov 29 '10 at 13:51
  • Check out Strawberry Perl (http://strawberryperl.com/) which is a good Perl distribution for Windows which comes with `dmake` and other tools required for building XS modules under Windows. – Alan Haggai Alavi Nov 29 '10 at 13:54
  • 1
    `make` is a program commonly found on UNIX systems, but it is available for Windows (and Strawberry Perl will bundle a copy) – Quentin Nov 29 '10 at 14:54

2 Answers2

7

Looks like you're using Indigo Perl. According to their web site, they have their own package manager called IPM - have you tried that?

But for Windows Perl work, I'd really recommend looking at Strawberry Perl.

Dave Cross
  • 68,119
  • 3
  • 51
  • 97
  • I'll also check out Strawberry Perl. I actually needed a perl with mod_perl2 (as I was having issue in integrating mod_perl2 with perl) and that's why I installed All In One Indigo package which came with Apache & Perl (with mod_perl2). – keeping_it_simple Nov 30 '10 at 08:24
1

Sometimes to install a Perl module, all you need do is copy the .pm file to the appropriate directory in perl/site or perl/lib. The standard procedure for installing a Perl module always involves running 'make', but in many cases, all the 'make' does is to copy the .pm file to perl/site or perl/lib. But when the Perl module needs low level access to the Windows libraries, then you need more than just 'make', you need a whole C tool chain.

If ActiveState Perl is against your religion, then consider downloading and installing a Cygwin environment. Select Perl and the C development tools (called binutils) for the Cygwin install.

But I tell ya, its hard to beat ActiveState Perl. It is the most complete Perl solution for a Windows platform. And its free!

YoReed
  • 11
  • 1
  • 5
    Things have changed since 2006. It's worth to risk a look at http://win32.perl.org to see some healthy competition. – daxim Nov 29 '10 at 14:30