<!-- keep this as a security measure: * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup,Main.LCGAdminGroup * Set ALLOWTOPICRENAME = Main.TWikiAdminGroup,Main.LCGAdminGroup #uncomment this if you want the page only be viewable by the internal people #* Set ALLOWTOPICVIEW = Main.TWikiAdminGroup,Main.LCGAdminGroup --> KeyWords: SysAdmin, [[Solaris]] ---+ Building Perl CPAN modules on Solaris The CPAN Perl module has a very convenient shell for downloading and installing modules, with one simple command. Everything works also on Solaris, as long as you are installing "pure Perl" modules; if the module requires some additional C language components, you enter a compiler version nightmare: * The Perl interpreter embeds the compilation flags used to build it \ (look at the output of =perl -V=), and _every_ additional module \ is built with the same configuration flags; * The Perl interpreter shipped with Solaris 10 (and the one provided by \ BlastWave.org's CSW also!) are compiled with the Sun Studio =cc=; * Sun does no longer ship Sun Studio =cc= with Solaris 10, they bundle \ GNU =gcc= instead; * =gcc= and =cc= use a different set of command-line options. The problem has been known for so long on Solaris, that there is even a CPAN module [[http://search.cpan.org/~aburlison/Solaris-PerlGcc-1.3/pod/perlgcc.pod perlgcc]] which installs a new set of Perl configuration files to work with =gcc=, but it doesn't work with Perl 5.8 (the one shipped with Solaris 10). Googling for the issue hasn't been of much help (except for a few other [[http://hivearchive.com/2007/05/23/solaris-perl-cpan/ rants]] on this topic - we're not alone :-)), until I found [[http://prefetch.net/blog/index.php/2006/07/29/building-perl-modules-for-solaris/ this blog post]] which explains that one can simply remove the conflicting options and get a working Perl module. So, I wrote a [[https://twiki.cscs.ch/twiki/bin/viewfile/LCGTier2/PhoenixBlog20081120x1505?filename=perlcc perlcc]] script, which removes the offending options and invokes =gcc= instead. I installed ==perlcc== as =/usr/bin/cc= on the Solaris boxes, and -voila- =cpan -i Time::HiRes= is now working... -- Main.RiccardoMurri - 20 Nov 2008 ---++ Readers' comments %COMMENT{type="below"}%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
EXT
perlcc
r1
manage
3.2 K
2008-11-20 - 15:23
RiccardoMurri
Wrapper around "gcc" invocation to compile Perl modules on Solaris
This topic: LCGTier2
>
WebHome
>
PhoenixClusterBlog
>
PhoenixBlog20081120x1505
Topic revision: r1 - 2008-11-20 - RiccardoMurri
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback