develooper Front page | perl.cpan.metadata | Postings from January 2005

Re: Question on cpan installs

Thread Previous
From:
Randy W. Sims
Date:
January 11, 2005 16:14
Subject:
Re: Question on cpan installs
Message ID:
41E45F32.9000105@ThePierianSpring.org
Michael.Dunham@micorp.com wrote:
> I may have sent this to the wrong discussion group - I am new to using
> CPAN....
> If so, sorry!
> 
> I am running on an IBM AIX 5.2 system.  I am trying to run the following:
> 
> perl -MCPAN -e shell
> 
> cpan> install Bundle::CPAN
> 
> This downloads the bundles fine.  However it tries to use the IBM C
> compiler which is cc_r.  I want it to use gcc.
> 
> Anyone know how to make this happen?

It's actually ExtUtils::MakeMaker or Module::Build that does the 
compiling, and it uses the same compiler used to compile perl itself 
(`perl -V:cc`). This value is stored in Config.pm (`perldoc -l Config` 
will give the location). You can edit your Config.pm and change the 
value assigned to 'cc', but it may cause problems. Specifically, if 
modules are compiled with a different compiler than that used to compile 
perl, especially if it uses a different C runtime library, there can be 
problems of memory corruption (one lib freeing memory allocated in 
another lib), io sync problems, etc. In general, if you want to compile 
modules with gcc, then you should also compile perl with gcc.

Randy.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About