• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 512
  • Last Modified:

C compiler for instaling perl modules

Hi

I'm trying to install these perl moduals on a standalone (No internet conection) windows 7 32 bit PC
Algorithm::Cluster
Algorithm::ClusterPoints

ActiveSttate perl 5.14 will not install any modules even with a local repository and a ppd file

I wish to use the To use the C clustering library from
http://bonsai.hgc.jp/~mdehoon/software/cluster/software.htm#source

i've managed to install other modules using
perl Makefile.PL
nmake
nmake test
nmake install

but i get an error installing  these modules
nmake fatal error u1077
i think this is because  i need a c compiler

i attempted to install minGW but the exe needs to access the Internet to get the code which can not happen on a stand alone PC

I've gone here and downloaded every thing but I've not attempted to install it yet
http://www.mingw.org/wiki/InstallationHOWTOforMinGW

It occurs to me there could be a simpler way to download and install a  c compiler   and further install perl modules

Thanks
0
trevor1940
Asked:
trevor1940
  • 4
  • 3
  • 2
1 Solution
 
parparovCommented:
I think you should be ok with downloading the latest snapshot package of MinGW, unpacking it and then just running mingw-get install . Skip the update part.
0
 
evilrixSenior Software Engineer (Avast)Commented:
You realise if the machine has no internet connection certain things in Perl (such as PPM and CPAN) are not going to work properly (or at all?).

By far MinGW is your best bet here as it is basically gcc for windows and that is pretty much the compiler used by all open source  and will certainly work fine for building Perl modules.
0
 
trevor1940Author Commented:
Well that didn't work!
Unpacked MinGW & set the path variable to C:\MinGW\bin

ran gcc -V & got a sensible return

cd to the Algorithm::Cluster ran perl MakeFile.pl
then

nmake got an error can't find dmake or similar

googled 'gcc mingw perl' and found dmake attempted to follow the install instructions within the download but all i'm getting now is

dmake fatal error

unsure if I've installed it correctly

can some point me to a good dmake installation + Guide? or How to install these perl mods?

evilrix: Why will PPM not work without Internet? in passed versions of perl running on standalone PC's PPM worked by first setting a local repository then creating a ppd file to point at the my_perlMod.tar.giz



0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
evilrixSenior Software Engineer (Avast)Commented:
>> nmake got an error can't find dmake or similar
nmake isn't a MinGW makefile, it's a Windows compiler make file.
http://msdn.microsoft.com/en-us/library/ms930369.aspx

You need to run the MinGW shell and then build from there otherwise your environment won't be set up correctly. You can't just do this (at least not easily) from a Dos prompt.
0
 
evilrixSenior Software Engineer (Avast)Commented:
>> Why will PPM not work without Internet?
Because it connects to remote servers to download packages. You could set up a local repo (never tried this) but it kinda defeats the object. You've be better off getting tar balls from CPAN and using cpan or cpanm to install them.
0
 
trevor1940Author Commented:
evilrix:
You need to run the MinGW shell and then build from there

what am i building from this shell? the perl mod install or MinGW  itself?
what steps should i be following?

are you suggesting dmake is a red herring?

PPM Did work with perl 5.8 by removing www repo's and creating a local one I've suceesfully installed mods in this way allot admittedly not on a win 7 box, I assumed from your comment there was another reason.

0
 
parparovCommented:
BTW, if you have nmake, you may have MS windows compiler?

I think you can install compileable modules with that compiler too.
0
 
evilrixSenior Software Engineer (Avast)Commented:
>> what am i building from this shell? the perl mod install or MinGW  itself?
The perl module.

>> are you suggesting dmake is a red herring?
Yes.

You should install MSYS and MinGW http://www.mingw.org/wiki/MSYS
Once you have them installed you should have an icon to start a MinGW shell. This starts a bash shell with an environment set up such that you can build using MinGW. From within this shell you run your perl Makefile.PL and it should recongnise you are building in a gcc style environment and work correctly.

Below I've copy/pasted the output I get. You make have issues with missing dependencies (I did) but that's a different problem and one you'll just need to figure out (ie, if it's missing you'll need to install it).
@evil ~/tmp/Algorithm-Cluster-1.17
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for libcluster
Note (probably harmless): No library found for -lm
                                                  Writing Makefile for Algorithm
::Cluster
Writing Makefile for Algorithm-Cluster

$ make
make[1]: Entering directory `/c/Users/evilrix/tmp/Algorithm-Cluster-1.17/src'
gcc -c -I../ranlib/src -I../ranlib/linpack -DVERSION=\"1.17\" -DXS_VERSION=\"1.1
7\" -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-
after-statement -DUSEIMPORTLIB -o cluster.o cluster.c
gcc -c -I../ranlib/src -I../ranlib/linpack -DVERSION=\"1.17\" -DXS_VERSION=\"1.1
7\" -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-
after-statement -DUSEIMPORTLIB -o ../ranlib/src/ranlib.o ../ranlib/src/ranlib.c
gcc -c -I../ranlib/src -I../ranlib/linpack -DVERSION=\"1.17\" -DXS_VERSION=\"1.1
7\" -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-
after-statement -DUSEIMPORTLIB -o ../ranlib/src/com.o ../ranlib/src/com.c
gcc -c -I../ranlib/src -I../ranlib/linpack -DVERSION=\"1.17\" -DXS_VERSION=\"1.1
7\" -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-
after-statement -DUSEIMPORTLIB -o ../ranlib/linpack/linpack.o ../ranlib/linpack/
linpack.c
ar cru libcluster.a cluster.o ../ranlib/src/ranlib.o ../ranlib/src/com.o ../ranl
ib/linpack/linpack.o
: libcluster.a

<SNIP>

Open in new window

0
 
trevor1940Author Commented:
I'm closing this i've not actuly got it work Under win 7 and managed to screw up apacie

I got the same error as you No library found for -lm
but i also got can't find perldoc.bat

So i'm creating a dule boot into fedora
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now