?
Solved

C compiler for instaling perl modules

Posted on 2011-10-10
9
Medium Priority
?
506 Views
Last Modified: 2012-05-12
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
Comment
Question by:trevor1940
  • 4
  • 3
  • 2
9 Comments
 
LVL 9

Expert Comment

by:parparov
ID: 36945604
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
 
LVL 40

Expert Comment

by:evilrix
ID: 36945753
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
 
LVL 1

Author Comment

by:trevor1940
ID: 36952035
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 40

Expert Comment

by:evilrix
ID: 36952471
>> 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
 
LVL 40

Expert Comment

by:evilrix
ID: 36952477
>> 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
 
LVL 1

Author Comment

by:trevor1940
ID: 36952568
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
 
LVL 9

Expert Comment

by:parparov
ID: 36952739
BTW, if you have nmake, you may have MS windows compiler?

I think you can install compileable modules with that compiler too.
0
 
LVL 40

Accepted Solution

by:
evilrix earned 1500 total points
ID: 36954714
>> 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
 
LVL 1

Author Closing Comment

by:trevor1940
ID: 36991953
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question