Re: DBI compilation errors



On Thu, May 10, 2007 at 02:53:39PM +1000, Shane Neubauer wrote:
Hi,

While trying to compile DBI-1.55 and getting the following results
I am on Solaris 9 (SPARC) and I have tried using gcc 3.4.6 and also 3.3.2

# perl Makefile.PL

**************************************************************************
Perl versions below 5.6.1 are no longer supported by the DBI.
Perl versions 5.6.x may fail during installation with a complaint
about the use of =head3 in the pod documentation.
**************************************************************************

Perl 5.6.1 is very old.

Checking if your kit is complete...
Looks good
Warning: prerequisite Scalar::Util failed to load: Can't locate Scalar/Util.pm
Warning: prerequisite Storable failed to load: Can't locate Storable.pm
Warning: prerequisite Test::Simple failed to load: Can't locate Test/Simple.pm
in @INC (@INC contains: lib
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at (eval 11) line 3.

Odd. And not a good start.

cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xdepend
-DVERSION=\"1.55\" -DXS_VERSION=\"1.55\" -KPIC
-I/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE -DDBI_NO_THREADS Perl.c
cc: unrecognized option `-KPIC'
cc: language depend not recognized

It's important to use the same compiler that was used to build the perl executable.

# perl -v
This is perl, v5.6.1 built for sun4-solaris-64int
(with 48 registered patches, see perl -V for more detail)
Copyright 1987-2001, Larry Wall

# gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.

Using a four year old compiler and a six year old perl isn't a good
place to start from.

I suggest you download the latest perl 5.8.x, configure, build and
install it yourself into your own location, separate from the existing perl.

(Might be wise to fetch, build, and install gcc 4.x first.)

Modify your PATH to find that new perl ahead of the existing one.

Then use "perl -MCPAN -e install DBI" to fetch, build and install the
DBI and any prerequisites.

Tim.
.



Relevant Pages