Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Problem while installing a module

by abubacker (Pilgrim)
on Dec 30, 2009 at 06:25 UTC ( #814879=perlquestion: print w/ replies, xml ) Need Help??
abubacker has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install a module, and it tries to use the 'cc'
compiler. Then I have installed GCC, then also I got the same problem.
My Question is with regard to the scenario , for which reason
does show the same error, even after installing the Gnu C
Compiler (GCC) compiler?

Comment on Problem while installing a module
Re: Problem while installing a module
by McDarren (Abbot) on Dec 30, 2009 at 07:02 UTC
Re: Problem while installing a module
by ahmad (Hermit) on Dec 30, 2009 at 07:23 UTC

    Some modules requires g++ to compile.

    So you might have mis-understood the error message you've got.

    What's your OS & what's the module name you're trying to install?

Re: Problem while installing a module
by Sinistral (Prior) on Dec 30, 2009 at 13:38 UTC

    Perl modules that require a C compiler to install will use the same compiler that was used to build the perl executable. You can verify the path and binary name of the compiler by looking at the output of

    perl -V

    What you seem to be saying is that you installed GCC, but when you use CPAN to install the module, you get an invocation of cc. You can work around this by making sure that the gcc path comes first. That is, if cc is in /usr/bin and gcc is in /usr/local/bin/gcc, then you'll want to make sure that /usr/local is in your path environment variable first. If you do a

    which cc which gcc cc -v

    You should be able to tell where cc is, where gcc is, and what happens when you run cc -v. If you get GCC installed and first in your path, then it by default has an executable called cc. If there isn't one, then you can create a symoblic link called cc that will ensure that gcc is being used. You know you've succeeded when the command line used to build Perl will invoke GCC instead of a system cc.

    Note that I'm assuming you're on a UNIX or UNIX-like system, since most Windows Perls don't use 'cc'.

    Note also that if you do this, the end results are NOT guaranteed to work. UNIX system C compilers differ in their binary output from GCC, and when trying to mix and match a cc Perl with GCC modules bad things can happen. Then again, it might work. I've been able to get such Franken distributions to function on more difficult platforms like HP-UX and AIX

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://814879]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-07-23 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (131 votes), past polls