How to tell CPAN about path to make and cc

Lawrence I. Siden picture Lawrence I. Siden · Jan 4, 2012 · Viewed 8.9k times · Source

Running Perl 5.10 CPAN on Solaris with opencsw.org packages, Makefile.PL from packages can't find the correct path and cc (gcc).

I found the path to make and set it to gmake, but I can't find any setting for cc.

I thought I once set this in CPAN/Config.pm (or with o config ...) but can no longer find any setting and don't have enough patience to wade through the thicket to figure out where such a basic thing gets set.

Does anyone know?

Answer

Dan picture Dan · Jan 4, 2012

cpan doesn't need to know where gcc or equivalent is, because it isn't cpan's job to call it directly. Usually it's Makefile.PL or Build.PL that needs to know that, and it usually will accept the compiler to use as a command line argument. If you add PERLMAINCC=/compiler/to/use to o conf makepl_arg that should do it.