Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

What was PERL Compiled With?

by he204035 (Novice)
on Jan 05, 2012 at 18:50 UTC ( #946449=perlquestion: print w/replies, xml ) Need Help??
he204035 has asked for the wisdom of the Perl Monks concerning the following question:

Trying to load some PERL Modules on a new server we inherited, but one of them says I don't have the right compiler. Search for truth and knowledge on internet leads me to believe that whatever compiler I use for Perl Modules (i.e. gcc) needs to be the same compiler used to load Perl. If that is correct, how do I know which compiler was used for Perl itself?

 # echo $CC

gives me nothing in return

Just FYI, I am unable to auto-load the modules through CPAN because the server is behind several firewalls and I am pretty sure CorpSec has thrown in a DeathStar in there somewhere (little bit of levity there). So I have to download the modules' zipped tarballs and then transfer to the server and unzip, untar,, etc etc. The procedure I am using was found on the web. Is there a hard and fast way to manually install modules?

Replies are listed 'Best First'.
Re: What was PERL Compiled With?
by ikegami (Pope) on Jan 05, 2012 at 19:05 UTC
    $ perl -V:cc cc='cc';

    And Perl knows it's really just a symlink to gcc:

    $ perl -V:ccname ccname='gcc';

    Other related config info:

    $ perl -V:'^g?cc.*' cc='cc'; cccdlflags='-fPIC'; ccdlflags='-Wl,-E'; ccflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64'; ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'; ccname='gcc'; ccsymbols=''; ccversion=''; gccansipedantic=''; gccosandvers=''; gccversion='4.4.5'; ccflags_nolargefiles='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing +-pipe -fstack-protector -I/usr/local/include ';

    This information is obtained from the same source that module installers use, Config.

Re: What was PERL Compiled With?
by marto (Bishop) on Jan 05, 2012 at 19:02 UTC

    Running perl -V will show you all sorts of useful information, including compiler information. When working on systems which have no internet connection I use the cpan command and a portable cpan (created using minicpan), saves having to download and transfer each module (and the dependant modules) from system to system.

Re: What was PERL Compiled With?
by CountZero (Bishop) on Jan 05, 2012 at 19:18 UTC
    Perl (the language) or perl (the program), but never PERL.


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: What was PERL Compiled With?
by DStaal (Chaplain) on Jan 06, 2012 at 13:55 UTC

    In response to your second question: You've got what looks like the best way to manually install modules. However, if you can get one machine access to CPAN (not even the machine in question, just one that machine can access), then a better solution would be minicpan. (Possibly with some corporate oversight or editing, as necessary and appropriate.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://946449]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-11-25 11:48 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (355 votes). Check out past polls.