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
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
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
|
|