-2

(Updated, please look at the EDIT, thanks!)

First I would like to point that I cannot use any automated tool to install the modules since the proxy won't resolve names. I already asked how to solve this here to no avail.

So AFAIK I have to download the .tar.gz package of the Perl module, decompress it, and run this:

perl Makefile.pl
make
make test
make install

So here's what I get:

D:>perl Makefile.PL
Set up gcc environment - 4.5.2

It looks like you don't have either nmake.exe or dmake.exe on your PATH,
so you will not be able to execute the commands from a Makefile.  You can
install dmake.exe with the Perl Package Manager by running:

    ppm install dmake

Writing Makefile for PowerBuilder::ORCA

I don't know why it says taht about nmake while I have it installed...

So next command (using NMAKE)

D:>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

syntax error at -e line 1, near "'755')
"
Missing right curly or square bracket at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0xff'
Stop.

Ok, now using MAKE (from MinGW):

D:>C:\MinGW\msys\1.0\bin\make
make: rem: Command not found
make: *** [blibdirs] Error 127

My Perl version:

This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x86-multi-thread
(with 9 registered patches, see perl -V for more detail) Copyright 1987-2010, Larry 
Wall Binary build 1204 [294330] provided by ActiveState http://www.ActiveState.com 
Built Feb 9 2011 14:38:22

Any hints about why this is happening? Thanks in advance!

EDIT: Thanks to Sinan Ünür, I compiled the module. I installed it with dmake install, but at importing it, it says:

Compilation failed in require

When executing it says:

Can't load 'C:/Perl/site/lib/auto/PowerBuilder/ORCA/ORCA.dll' for module PowerBuilder::ORCA: load_file:El acceso a la dirección de memoria no es válido at C:/Perl/lib/DynaLoader.pm line 201 (Invalid memory access)

I think this is due to the fact that I'm compiling against a wrong Perl version, but how come? I used the links for 5.12.

m0skit0
  • 25,268
  • 11
  • 79
  • 127
  • Any comments on why the downvoting? Thank you! – m0skit0 Apr 17 '12 at 23:36
  • It's because you keep changing the question, this makes the Stack Overflow Q&A system less useful; you must [open a new question](http://stackoverflow.com/questions/ask) for each different topic. - I looked through your [previous questions](http://stackoverflow.com/users/898478/m0skit0?tab=questions) to find the one about the claim "I cannot use any automated tool to install the modules". I don't see it. – daxim Apr 27 '12 at 08:45
  • I did not change the question. The question is "Installing Perl modules manually on Windows XP", which has not been answered. I only post the relevant part of what I'm asking because I personally cannot see the future (I don't know what future errors I'm gonna get...). About that other question, I'm unable to find it as well. Probably some moderator deleted it (I ignore why). Anyway, I can't resolve names and thus I can't use automated tools as I said. There is no fix around that, I tried everything I was suggested. – m0skit0 Apr 27 '12 at 10:52
  • 2
    It's plain for everyone to see that the question was first about make, and then after you compiled with success, you edited the question and about some C-level memory error. You get different answers for these separate problems. This runs counter to how this site works because you now are not able anymore to genuinely select one specific answer as "accepted". -- Working network access/name resolving is not a requirement to run CPAN, for working in off-line mode see http://stackoverflow.com/q/10155955#comment-13077299 – daxim Apr 27 '12 at 11:29
  • Sorry, but I insist: the question is about installing manually Perl modules on Windows XP without network. Thanks for the link, looks interesting, but how do I set up a local repository for minicpan to read from? – m0skit0 Apr 27 '12 at 12:45
  • 1
    `minicpan` *creates* the local mirror from any of the hosts on http://mirrors.cpan.org/, run it on a machine connected to the Internet. Then you carry the mirrored files on a removable medium over to the target machine, mount/copy the files and configure the CPAN client there to read from the file system. – daxim Apr 27 '12 at 13:39

3 Answers3

2

That version of nmake is rather old. Mine says 10.00.30319.01. Besides, if you don't have the compiler suite that goes along with it, or if the compiler suite you have is incompatible with the one that built your perl, having nmake is not going to make a difference.

I am assuming you have ActivePerl installed, but you don't mention the version. MinGW make because it can't process makefiles written for nmake or dmake.

If you have ActivePerl 5.10, you can grab this PPD and this archive, put the PPD in a directory and the ZIP in the appropriate directory under that and use ppm to install it.

Otherwise, you're going to have to find a way to get a compiler suite with the appropriate build tools onto that machine.

Does your MinGW installation have dmake? There is still no guarantee that the gcc in your installation is compatible with the compiler used to build perl, but it might be worth a shot.

What you really need is ppm install MinGW.

This thread might help:

The problem is that my main computer is not direct connected to the internet, so I cant issue a 'ppm install MinGW' command.

Keep in mind that these ppd files are specific to perl versions, so you might have to fix the paths mentioned in that answer. I can't do that for you because you, AFAIK, you still haven't told us your perl version.

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
  • Thanks. I got ActivePerl, that's right. I didn't find any dmake on my MinGW installation, but I can install any other MinGW if you recommend it. I can't do `ppm install MinGW` because of NTLM proxy issues as I said (I cannot modify proxy's configuration, and yes, it's stupid corporate rules that won't let me do my work faster...). – m0skit0 Apr 16 '12 at 17:42
  • Sorry for the lateness, but was on holidays. Gonna take a look at that thread, but here's my Perl version anyway: `This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x86-multi-t hread (with 9 registered patches, see perl -V for more detail) Copyright 1987-2010, Larry Wall Binary build 1204 [294330] provided by ActiveState http://www.ActiveState.com Built Feb 9 2011 14:38:22` – m0skit0 Apr 24 '12 at 15:14
  • Ok, I found the correct URLs and installed all that, but looks like Perl is not able to find the library. Do I have to move it manually to C:\Perl\lib? Sorry I'm completely noob in Perl's configuration... :( – m0skit0 Apr 24 '12 at 15:43
  • I meant I installed that and looks like the library was successfully built. – m0skit0 Apr 24 '12 at 21:44
  • Ok I installed with dmake install, but at importing it, it says: "Compilation failed in require". I think this is due to the fact that I'm compiling against a wrong Perl version. – m0skit0 Apr 25 '12 at 13:48
  • Here are the URLs I used: `http://ppm4.activestate.com/MSWin32-x86/5.12/1200/-/--/MINGW/MinGW-5.1.4.1.tar.gz` `http://ppm4.activestate.com/MSWin32-x86/5.12/1200/-/--/MINGW/dmake-4.11.20080107.tar.gz` and the related .ppd ones. – m0skit0 Apr 25 '12 at 16:08
0

To the best of my knowledge, when you see "Set up gcc environment - 4.5.2", it's Perl being reconfigured to use MinGW and dmake.

Is there a reason you're not simply doing the following?

cpan PowerBuilder::ORCA
ikegami
  • 367,544
  • 15
  • 269
  • 518
  • But I got no `dmake` with my MinGW installation... And I can't do `cpan PowerBuilder::ORCA` because of the proxy (it won't DNS). – m0skit0 Apr 16 '12 at 17:43
  • 1
    How's `cpan ...` going to help if he does not have a proper build environment? – Sinan Ünür Apr 16 '12 at 17:54
  • @m0skit0, Earlier, you said you did have `dmake` installed, now you saying you don't. If you do, I don't understand the question. If you don't, install it! – ikegami Apr 16 '12 at 19:24
  • Right, sorry my bad, I don't have dmake installed. – m0skit0 Apr 16 '12 at 21:59
  • @Sinan Ünür, There's was no indication then of an improper build environment. He's just not using the right make tool. Furthermore, cpan installs the tools it needs (or at least with ActivePerl), so if would also address the OP's issue if it wasn't for his proxy. – ikegami Apr 17 '12 at 04:30
  • Thanks, but already installed it ;) And anyway, how do I install it from that link? Again, `cpan` is no use. – m0skit0 Apr 24 '12 at 15:56
  • `cpan` doesn't install anything. It just runs Makefile.PL or Build.PL, so your statement means nothing. This distro isn't a Perl package. It has neither of those files. it's just a plain dmake.exe. Just put it in the path. – ikegami Apr 24 '12 at 17:35
  • `G:\>cpan PowerBuilder::ORCA Set up gcc environment - 3.4.5 (mingw-vista special r3) CPAN: Term::ANSIColor loaded ok (v3.00) CPAN: Storable loaded ok (v2.22) CPAN: LWP::UserAgent loaded ok (v5.835) CPAN: Time::HiRes loaded ok (v1.9721) Fetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to localhost:5865 (connect: time out)] Proxy authentication needed! (Note: to permanently configure username and password run o conf proxy_user your_username o conf proxy_pass your_password ) Username:` – m0skit0 Apr 26 '12 at 08:31
  • @m0skit0, What your point, you already said you couldn't do that, and I didn't suggest that you do that – ikegami Apr 26 '12 at 15:55
0

I don't use perl on Windows much, but the in my experience Strawberry Perl is the best implementation available in that environment. I have used it for some fairly complex programs and installed multiple CPAN modules with no problems at all. If you are having major issues it's definitely worth a shot.

http://strawberryperl.com/

dbyoung
  • 276
  • 2
  • 7