Nalina has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
Whenever I try to install perl modules on solaris, I get an error saying '/usr/ucb/cc: language optional software package not installed *** Error code 1 make: Fatal error: Command failed for target `Perl.o''
Could anyone please tell me what it means and how to overcome this?
I get this error when I try to install DBI.pm. The output of perl -V is as follows.
root@st-kvar.statoil> perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuratio +n: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris uname='sunos st-kvar 5.6 generic_105181-33 sun4u sparc ' config_args='-Dcc=gcc -Dprefix=/prog/perl/curr_inst' 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='gcc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FI +LE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing' ccversion='', gccversion='3.2', gccosandvers='solaris2.6' 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='gcc', ldflags =' ' libpth=/usr/lib /usr/ccs/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='-fPIC', lddlflags='-G' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Jan 15 2003 07:31:49 @INC: /prog/perl/curr_inst/lib/5.8.0/sun4-solaris /prog/perl/curr_inst/lib/5.8.0 /prog/perl/curr_inst/lib/site_perl/5.8.0/sun4-solaris /prog/perl/curr_inst/lib/site_perl/5.8.0 /prog/perl/curr_inst/lib/site_perl /local/adm/INC_dir .

Replies are listed 'Best First'.
Re: Problem in installing perl modules.
by mhearse (Chaplain) on Apr 02, 2008 at 14:36 UTC
    It has been a while since I have dealt with solaris, but here is what I know. Perl is letting you know that it can't find the compiler it was built with. Sun charges a princely sum for their compiler suite. I'm not even sure what the official product name is anymore, they periodically change.

    There are two solutions I know of.
    1) Purchase/install sun compiler suite.
    2) Install a Solaris freeware Perl package which was built using gcc (they all are). Then install the Solaris freeware gcc package (and it's friends). Please note that you will then have two versions of Perl on the machine. The usual location for the second is /usr/local/bin/perl. So you should make sure you are calling/using the right version. I have been told not to remove the version included with Solaris due to dependencies.

    There are further resources regarding this on the web, including this site.

      I found that there is gcc already installed on the server. Also there is a perl version (5.8.0) compiled with gcc and installed on the server. I tried to build DBI with gcc and using the perl version which is compiled using gcc. But I get the following error.
      sailfish@st-kvar02 -> make gcc -c -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS +=64 -O -DVERSION=\"1.604\" -DXS_VERSION=\"1.604\" -fPIC "-I/prog/ +perl/curr_inst/lib/5.8.0/sun4-solaris/CORE" -W -Wall -Wpointer-arith + -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual -W +missing-noreturn -Wno-unused-parameter -DDBI_NO_THREADS Perl.c In file included from /usr/include/sys/stream.h:22, from /usr/include/netinet/in.h:66, from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/perl.h:612, from DBIXS.h:19, from Perl.xs:6: /usr/include/sys/vnode.h:259: parse error before "pgcnt_t" /usr/include/sys/vnode.h:281: parse error before '}' token /usr/include/sys/vnode.h:567: parse error before '*' token /usr/include/sys/vnode.h:568: parse error before '*' token /usr/include/sys/vnode.h:569: parse error before '*' token /usr/include/sys/vnode.h:571: parse error before '*' token /usr/include/sys/vnode.h:573: parse error before '*' token /usr/include/sys/vnode.h:574: parse error before '*' token /usr/include/sys/vnode.h:575: parse error before '*' token /usr/include/sys/vnode.h:576: parse error before '*' token /usr/include/sys/vnode.h:578: parse error before '*' token /usr/include/sys/vnode.h:579: parse error before '*' token /usr/include/sys/vnode.h:581: parse error before '*' token /usr/include/sys/vnode.h:583: parse error before '*' token /usr/include/sys/vnode.h:584: parse error before '*' token /usr/include/sys/vnode.h:585: parse error before '*' token /usr/include/sys/vnode.h:586: parse error before '*' token /usr/include/sys/vnode.h:588: parse error before '*' token /usr/include/sys/vnode.h:589: parse error before '*' token /usr/include/sys/vnode.h:590: parse error before '*' token /usr/include/sys/vnode.h:591: parse error before '*' token /usr/include/sys/vnode.h:592: parse error before '*' token /usr/include/sys/vnode.h:593: parse error before '*' token /usr/include/sys/vnode.h:594: parse error before '*' token /usr/include/sys/vnode.h:595: parse error before '*' token /usr/include/sys/vnode.h:596: parse error before '*' token /usr/include/sys/vnode.h:597: parse error before '*' token /usr/include/sys/vnode.h:598: parse error before '*' token /usr/include/sys/vnode.h:599: parse error before '*' token /usr/include/sys/vnode.h:601: parse error before '*' token /usr/include/sys/vnode.h:603: parse error before '*' token /usr/include/sys/vnode.h:604: parse error before '*' token /usr/include/sys/vnode.h:607: parse error before '*' token /usr/include/sys/vnode.h:608: parse error before '*' token /usr/include/sys/vnode.h:610: parse error before '*' token /usr/include/sys/vnode.h:612: parse error before '*' token /usr/include/sys/vnode.h:614: parse error before '*' token /usr/include/sys/vnode.h:615: parse error before '*' token /usr/include/sys/vnode.h:616: parse error before '*' token /usr/include/sys/vnode.h:617: parse error before '*' token /usr/include/sys/vnode.h:619: parse error before '*' token /usr/include/sys/vnode.h:620: parse error before '*' token /usr/include/sys/vnode.h:621: parse error before '*' token /usr/include/sys/vnode.h:622: parse error before '*' token /usr/include/sys/vnode.h:623: parse error before '*' token /usr/include/sys/vnode.h:624: parse error before '*' token In file included from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/perl.h:626, from DBIXS.h:19, from Perl.xs:6: /usr/include/sys/stat.h:251: parse error before "blksize_t" /usr/include/sys/stat.h:255: parse error before '}' token /usr/include/sys/stat.h:309: parse error before "blksize_t" /usr/include/sys/stat.h:313: parse error before '}' token In file included from /usr/include/sys/signal.h:34, from /usr/include/signal.h:26, from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/unixish.h:106, from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/perl.h:1877, from DBIXS.h:19, from Perl.xs:6: /usr/include/sys/siginfo.h:259: parse error before "ctid_t" /usr/include/sys/siginfo.h:292: parse error before '}' token /usr/include/sys/siginfo.h:294: parse error before '}' token /usr/include/sys/siginfo.h:390: parse error before "ctid_t" /usr/include/sys/siginfo.h:398: conflicting types for `__fault' /usr/include/sys/siginfo.h:267: previous declaration of `__fault' /usr/include/sys/siginfo.h:404: conflicting types for `__file' /usr/include/sys/siginfo.h:273: previous declaration of `__file' /usr/include/sys/siginfo.h:420: conflicting types for `__prof' /usr/include/sys/siginfo.h:287: previous declaration of `__prof' /usr/include/sys/siginfo.h:424: conflicting types for `__rctl' /usr/include/sys/siginfo.h:291: previous declaration of `__rctl' /usr/include/sys/siginfo.h:426: parse error before '}' token /usr/include/sys/siginfo.h:428: parse error before '}' token /usr/include/sys/siginfo.h:432: parse error before "k_siginfo_t" /usr/include/sys/siginfo.h:437: parse error before '}' token In file included from /usr/include/signal.h:26, from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/unixish.h:106, from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/perl.h:1877, from DBIXS.h:19, from Perl.xs:6: /usr/include/sys/signal.h:85: parse error before "siginfo_t" In file included from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/unixish.h:106, from /prog/perl/curr_inst/lib/5.8.0/sun4-solaris/CORE +/perl.h:1877, from DBIXS.h:19, from Perl.xs:6: /usr/include/signal.h:111: parse error before "siginfo_t" /usr/include/signal.h:113: parse error before "siginfo_t" *** Error code 1 make: Fatal error: Command failed for target `Perl.o'
      I don't know what it means. Could anyone please help me out?
Re: Problem in installing perl modules.
by Anonymous Monk on Apr 02, 2008 at 13:41 UTC