LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2013, 01:53 PM   #1
stateless
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 166
Blog Entries: 1

Rep: Reputation: 4
Perl CPAN: Changing the compiler


Hi. I have this annoying little hitch: I'm trying to use CPAN to install a Perl module I need onto a system on which I have no root privileges. However, the system has two C compilers: gcc annd pgcc. For reasons I do not understand, CPAN attempts to use pgcc instead of gcc, and of course all build attempts fail because pgcc does not recognize most of expected compiler switches. I need to tell CPAN to use gcc instead of pgcc, but I have no idea how to do this. There does not seem to be such and option listed with "o conf".

I know it is possible to set this if I do not use CPAN, and install manually, but this will be a real pain because I must then install the dependencies manually.
 
Old 01-16-2013, 04:21 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Checking perl for compiler configuration :
$ perl -MConfig -e 'print "$Config{cc}\n"'
... The reply will most often be : gcc .

The most easy way of setting a specific compiler for perl, example :
$ mkdir $HOME/bin && cd bin/ && ln -s /usr/bin/gcc
... And then set $HOME first in your PATH :
PATH = $HOME/bin:$PATH

Ref. http://www.justskins.com/forums/prob...and-97843.html
( Google .. set CC cpan .. )

-
 
Old 01-19-2013, 11:11 AM   #3
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by stateless View Post
Hi. I have this annoying little hitch: I'm trying to use CPAN to install a Perl module I need onto a system on which I have no root privileges. However, the system has two C compilers: gcc annd pgcc. For reasons I do not understand, CPAN attempts to use pgcc instead of gcc, and of course all build attempts fail because pgcc does not recognize most of expected compiler switches. I need to tell CPAN to use gcc instead of pgcc, but I have no idea how to do this. There does not seem to be such and option listed with "o conf".

I know it is possible to set this if I do not use CPAN, and install manually, but this will be a real pain because I must then install the dependencies manually.
It's not CPAN. See http://perldoc.perl.org/Config.html , look for compiler there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPAN and PERL Modules metallica1973 Programming 4 02-01-2008 09:14 PM
f7, perl and CPAN hohum Fedora 1 08-01-2007 04:31 AM
Perl / CPAN question rjcrews Linux - Software 2 02-01-2006 02:02 PM
Perl CPAN Problem murphy23 Slackware 4 01-24-2005 07:03 AM
perl CPAN LinFreak! Slackware 3 01-03-2004 08:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration