Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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


In reply to Re: Problem while installing a module by Sinistral
in thread Problem while installing a module by abubacker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-24 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found