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

Hi,

I am trying to install DBI-1.201 on a Solaris system.

bash-2.03$ perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer ... yada yada yada bash-2.03$ make cc -c -xO3 -xdepend -DVERSION=\"1.201\" -DXS_VERSION=\"1.201\" +-KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS Perl.c ucbcc: Warning: Option -YP,:/usr/ucblib:/opt/SUNWspro/WS6U2/bin/../lib +:/opt/SUNWspro/WS6U2/bin:/usr/ccs/lib:/usr/lib passed to ld, if ld is + invoked, ignored otherwise License Error : The license for this product(Sun WorkShop Compiler C S +PARC) has expired ... blah blah blah
Okay I don't have cc I have gcc so I cleaned things up and did this ...
bash-2.03$ perl Makefile.PL CC=`which gcc` *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer ... yada yada yada bash-2.03$ make mkdir blib mkdir blib/lib ... cp DBI.pm blib/lib/DBI.pm /usr/bin/perl -p -e "s/~DRIVER~/Perl/g" < blib/arch/auto/DBI/Driver.xs +t > Perl.xsi /usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 / +usr/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/perl5/5.00503/ExtUti +ls/typemap Perl.xs >xstmp.c && mv xstmp.c Perl.c /usr/local/bin/gcc -c -xO3 -xdepend -DVERSION=\"1.201\" -DXS_VE +RSION=\"1.201\" -KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO +_THREADS Perl.c gcc: unrecognized option `-KPIC' gcc: language depend not recognized gcc: Perl.c: linker input file unused because linking not done /usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 / +usr/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/perl5/5.00503/ExtUti +ls/typemap DBI.xs >xstmp.c && mv xstmp.c DBI.c /usr/local/bin/gcc -c -xO3 -xdepend -DVERSION=\"1.201\" -DXS_VE +RSION=\"1.201\" -KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO +_THREADS DBI.c gcc: unrecognized option `-KPIC' gcc: language depend not recognized gcc: DBI.c: linker input file unused because linking not done Running Mkbootstrap for DBI () chmod 644 DBI.bs LD_RUN_PATH="" cc -o blib/arch/auto/DBI/DBI.so -G DBI.o ucbcc: Warning: Option -YP,:/usr/ucblib:/opt/SUNWspro/WS6U2/bin/../lib +:/opt/SUNWspro/WS6U2/bin:/usr/ccs/lib:/usr/lib passed to ld, if ld is + invoked, ignored otherwise ld: warning: option -YP appears more than once, first setting taken ld: fatal: file DBI.o: cannot open file: No such file or directory ld: fatal: File processing errors. No output written to blib/arch/auto +/DBI/DBI.so *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBI/DBI.s +o' bash-2.03$
... after this I gave up and am I asking you ... the Monks!

Oh here's some other info that my shred some light ...
bash-2.03$ uname -a SunOS stupid 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2 bash-2.03$ perl -v This is perl, version 5.005_03 built for sun4-solaris Copyright 1987-1999, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5.0 source +kit. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge.

Thanks much!

20030221 Edit by Corion : Changed PRE to CODE

Replies are listed 'Best First'.
Re: Install DBI on Solaris
by jepri (Parson) on Feb 21, 2003 at 02:20 UTC
    Just from eyeballing it, it appears that perl still thinks you have CC (ugh). Delete or move everything that looks like a CC binary or symlink, and start again. This time, perl should detect gcc, and start issuing the correct options.

    In any case, the Solaris linker works differently to the GNU linker. If you don't want to go to the effort of install ld (and you probably shouldn't), you can usually get by by forcing perl to install the module. Ignore linker errors, and everthing should be fine, provided your library files end up in a system library directory.

    Update: More to the point, your makefile is still passing CC options, even though you have gcc installed. And to mess with your linker paths, check out crle

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Re: Install DBI on Solaris
by mowgli (Friar) on Feb 21, 2003 at 09:39 UTC

    Baltic Online offers a Solaris package of Perl 5.6.1 that includes DBI and DBD::Oracle - look for "BOperlDBI" on their download page. I haven't looked into it myself yet, but it might be useful.

    --
    mowgli

Re: Install DBI on Solaris
by steves (Curate) on Feb 21, 2003 at 10:07 UTC

    Solaris is my primary Perl platform. I think you'll keep hitting dead ends unless you bite the bullet and upgrade to a newer version of Perl (I'm on 5.6.1; starting to evaluate 5.8) and build it all with gcc. Depending on your experience and access permissions this shouldn't be as hard as it sounds. I recently upgraded a full Perl install with over 250 CPAN modules in less than a day. I have never had success mixing gcc and cc built pieces on Solaris, including the perl binary.

      Thanks man! Install 5.8 and DBI and DBD::Oracle installed no prob!
      Too bad the README file didn't say anything about this.
      What cracks me is the line ...
          Remember to actaully *read* the REAME file!
      
      ... when you do the perl Makefile.PL. I guess they put
      that line in because people aren't reading their README's
      Maybe some someone should explain to them that people don't
      read the README's because *reading* the README's don't help.