in reply to CPAN Module Installation

Does perl -V from the command line say that perl was build with cc? Sun ship Solaris with perl built with the Sun Workshop compiler, and Solaris (IIRC) doesn't ship with this but (again IIRC) does come with gcc out of the box. Ideally you want to be compiling modules with the same compiler which was used to build perl.

On top of this my general advice is not to use the system perl, but download the source and 'roll your own'. Reason being that your OS uses this perl for systemy type things. Other apps (for example Oracle and BMC patrol) ship with their own perl as part of the distribution. This will ensure you don't run in to any OS/perl related issues and allow you to compile your own verson of perl compiled with your compiler of choice. You could install to somewhere like /opt/appname/perl.

Perhaps it's time to talk to your sysadmin, I'm sure they'd be in favour of you not messing with the perl their OS uses, though they may simply download a build from sunfreeware or similar.

Replies are listed 'Best First'.
Re^2: CPAN Module Installation
by ajeet@perl (Acolyte) on Mar 25, 2010 at 05:57 UTC
    perl -V shows that it is built for Sun Solaris and shows ld=cc here is a snap shot of perl -v

    Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=solaris, osvers=2.10, archname=sun4-solaris uname='sunos bikini-zone4.asd.mbalance.com 5.10 generic_118833-22 +sun4u sparc sunw,sun-fire-v210 ' config_args='-Dlibpth=/usr/local/lib /usr/lib -DPolicy=solaris2 -D +prefix=/usr/local -Dcc=cc -Dinstallprefix=/usr/local -Dccflags=-D_LAR +GEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -Doptimize=-xO3 -xsp +ace -xildoff -Dperladmin=support@mbalance.com -Dvendorprefix=/usr/loc +al -Dotherlibdirs=/usr/local/lib/perl5/site_perl/5.8.0 -desO' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_T +S_ERRNO -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS= +64 -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTE +NV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV', optimize='-xO3 -xspace -xildoff', cppflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO - +I/usr/local/include' ccversion='Sun C 5.8 2005/10/13', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib -L/usr/lib ' libpth=/usr/local/lib /usr/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib -L/usr/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV USE_LARGE_FILES USE_PERLIO Built under solaris Compiled at Jun 21 2007 13:08:59 %ENV: PERLLIB="/u01/app/netboss/unsup/perl/lib/5.6.0:/u01/app/netboss/un +sup/perl/lib/5.6.0/sun4-solaris:/u01/app/netboss/unsup/perl/lib/site_ +perl/5.6.0:/u01/app/netboss/unsup/perl/lib/site_perl/5.6.0/sun4-solar +is" @INC: /u01/app/netboss/unsup/perl/lib/5.6.0 /u01/app/netboss/unsup/perl/lib/5.6.0/sun4-solaris /u01/app/netboss/unsup/perl/lib/site_perl/5.6.0 /u01/app/netboss/unsup/perl/lib/site_perl/5.6.0/sun4-solaris /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/vendor_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/vendor_perl/5.8.8 /usr/local/lib/perl5/vendor_perl /usr/local/lib/perl5/site_perl/5.8.0

    I am seriously screwed up with the installation of module, Your suggestion of using a seprate perl interpreter is best, but the work i m doing is in organization, and they dont want to rebuild/seprate build of perl interpreter, Now I have to install modules from CPAN, I am unable to do anything as of now, because i can not install modules, also installing from CPAN is not working, saying that something "unable to resolve host "...

      'also installing from CPAN is not working, saying that something "unable to resolve host "...'

      Network connectivity is a different problem, and somewhat unrelated to the fact that you still won't be able to compile modules, again speak to your sysadmin. If internet access is out of the question use CPAN::Mini on a machine which does have internet access to create a mirror when you could then use 'offline'.

      'but the work i m doing is in organization, and they dont want to rebuild/seprate build of perl interpreter, Now I have to install modules from CPAN'

      For clarity, I wasn't suggesting you rebuild Perl that Solaris uses, for the love of Zod leave that alone. I suggested that a separate build of perl be compiled using gcc. If your organisation can't see the benefit of this then this isn't an issue we can help you with.

      Compiling your code and required modules using pp on another solaris 10 server (it would need to be the same architecture) would be an option, if you can get access to a server were you can build perl and install modules. If not I guess you need to either raise the issue with your employer again, if they don't want to give you access to the right tools then they can't expect much.