MySQL Forums
Forum List  »  Perl

Help! - DBD-mysql-4.012 - make fails on Solaris SunOS 5.10
Posted by: Tor Stefan Na
Date: September 02, 2009 03:32AM

Hi all!

I get the error:

"dbdimp.c", line 2814: improper member use: last_errno
"dbdimp.c", line 3422: improper member use: last_errno
cc: acomp failed for dbdimp.c
*** Error code 1
make: Fatal error: Command failed for target `dbdimp.o'

when I try to build DBD-mysql-4.012 manually from source.

CPAN fails as well.

I get the same error when I try to compile DBD-mysql-3.0008

Thanks!
Tor Stefan


--------------------------------------------------------------

[root@yggdrasil DBD-mysql-4.012]# uname -a
SunOS yggdrasil 5.10 Generic_139555-08 sun4u sparc SUNW,Sun-Fire-V240

[root@yggdrasil DBD-mysql-4.012]# cc -V
cc: Sun C 5.10 SunOS_sparc 2009/06/03
usage: cc [ options] files. Use 'cc -flags' for details

[root@yggdrasil ~]# /opt/csw/mysql5/libexec/mysqld -V
/opt/csw/mysql5/libexec/mysqld Ver 5.1.23-rc for sun-solaris2.8 on sparc (Source distribution)

[root@yggdrasil ~]# mysql -V
mysql Ver 14.14 Distrib 5.1.23-rc, for sun-solaris2.8 (sparc) using readline 5.2

[root@yggdrasil DBD-mysql-4.012]# perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
uname='sunos ra 5.8 generic_117350-51 sun4u sparc sunw,sun-blade-1000'
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-xO3 -xtarget=ultra -xarch=v8',
cppflags='-D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include'
ccversion='Sun C 5.8 Patch 121015-06 2007/10/03', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
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/opt/csw/bdb44/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib'
libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/prod/lib/v8plus /opt/SUNWspro/prod/lib /lib /opt/csw/lib
libs=-lsocket -lnsl -lgdbm -ldb-4.4 -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldb-4.4 -ldl -lm -lpthread -lc
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /opt/csw/lib'
cccdlflags='-KPIC', lddlflags='-G -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib'


Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
Built under solaris
Compiled at Mar 25 2008 11:07:21
@INC:
/opt/csw/lib/perl/5.8.8
/opt/csw/share/perl/5.8.8
/opt/csw/lib/perl/site_perl
/opt/csw/share/perl/site_perl
/opt/csw/share/perl/site_perl
/opt/csw/lib/perl/csw
/opt/csw/share/perl/csw
/opt/csw/share/perl/csw
.


[root@yggdrasil DBD-mysql-4.012]# make clean
rm -f \
*.a core \
core.[0-9] blib/arch/auto/DBD/mysql/extralibs.all \
core.[0-9][0-9] mysql.bso \
pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
mysql.x mysql.bs \
perl tmon.out \
*.o pm_to_blib \
blib/arch/auto/DBD/mysql/extralibs.ld mysql.c \
blibdirs.ts core.[0-9][0-9][0-9][0-9][0-9] \
*perl.core core.*perl.*.? \
Makefile.aperl perl \
mysql.def core.[0-9][0-9][0-9] \
mon.out libmysql.def \
perlmain.c perl.exe \
so_locations mysql.exp
rm -rf \
*.xsi blib
mv Makefile Makefile.old > /dev/null 2>&1




[root@yggdrasil DBD-mysql-4.012]# perl Makefile.PL


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user '' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.pl --testuser=username

I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/opt/csw/mysql5/include/mysql -mt -D_FORTEC_ -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/opt/csw/mysql5/include/mysql/include -D
HAVE_RWLOCK_T -DUNIV_SOLARIS
embedded (mysql_config) =
libs (mysql_config) = -L/opt/csw/lib/32 -L/opt/csw/mysql5/lib/mysql -lmysqlclient -lz -lposix4 -lc -lgen -lsocket -lnsl -lm
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (guessed ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Using DBI 1.609 (for perl 5.008008 on sun4-solaris-thread-multi) installed in /opt/csw/lib/perl/site_perl/auto/DBI/
Writing Makefile for DBD::mysql


[root@yggdrasil DBD-mysql-4.012]# make
Skip blib/lib/DBD/mysql.pm (unchanged)
Skip blib/lib/DBD/mysql/GetInfo.pm (unchanged)
Skip blib/lib/DBD/mysql/INSTALL.pod (unchanged)
Skip blib/lib/Bundle/DBD/mysql.pm (unchanged)
cc -c -I/opt/csw/lib/perl/site_perl/auto/DBI -I/opt/csw/mysql5/include/mysql -mt -D_FORTEC_ -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/opt/csw/mysql5/include/mysql/include -DHAVE_RWLOCK_T -DUNIV_SOLARIS -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=\"4.012\" -DXS_VERSION=\"4.012\" -KPIC "-I/opt/csw/lib/perl/5.8.8/CORE" dbdimp.c
"dbdimp.c", line 2814: improper member use: last_errno
"dbdimp.c", line 3422: improper member use: last_errno
cc: acomp failed for dbdimp.c
*** Error code 1
make: Fatal error: Command failed for target `dbdimp.o'



#
# From CPAN
#

...

You can also optionally set the user to run 'make test' with:

perl Makefile.pl --testuser=username

I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/opt/csw/mysql5/include/mysql -mt -D_FORTEC_ -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/opt/csw/mysql5/include/mysql/include -D
HAVE_RWLOCK_T -DUNIV_SOLARIS
embedded (mysql_config) =
libs (mysql_config) = -L/opt/csw/lib/32 -L/opt/csw/mysql5/lib/mysql -lmysqlclient -lz -lposix4 -lc -lgen -lsocket -lnsl -lm
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (guessed ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Checking if your kit is complete...
Looks good
Using DBI 1.609 (for perl 5.008008 on sun4-solaris-thread-multi) installed in /opt/csw/lib/perl/site_perl/auto/DBI/
Writing Makefile for DBD::mysql
cc -c -I/opt/csw/lib/perl/site_perl/auto/DBI -I/opt/csw/mysql5/include/mysql -mt -D_FORTEC_ -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/opt/csw/mysql5/include/mysql/include -DHAVE_RWLOCK_T -DUNIV_SOLARIS -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=\"4.012\" -DXS_VERSION=\"4.012\" -KPIC "-I/opt/csw/lib/perl/5.8.8/CORE" dbdimp.c
/opt/csw/bin/perl -p -e "s/~DRIVER~/mysql/g" /opt/csw/lib/perl/site_perl/auto/DBI/Driver.xst > mysql.xsi
Running Mkbootstrap for DBD::mysql ()
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
chmod 644 mysql.bs
/opt/csw/bin/perl /opt/csw/share/perl/5.8.8/ExtUtils/xsubpp -typemap /opt/csw/share/perl/5.8.8/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Warning: duplicate function definition 'do' detected in mysql.xs, line 225
Warning: duplicate function definition 'rows' detected in mysql.xs, line 650
cc -c -I/opt/csw/lib/perl/site_perl/auto/DBI -I/opt/csw/mysql5/include/mysql -mt -D_FORTEC_ -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/opt/csw/mysql5/include/mysql/include -DHAVE_RWLOCK_T -DUNIV_SOLARIS -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=\"4.012\" -DXS_VERSION=\"4.012\" -KPIC "-I/opt/csw/lib/perl/5.8.8/CORE" mysql.c
"dbdimp.c", line 2814: improper member use: last_errno
"dbdimp.c", line 3422: improper member use: last_errno
cc: acomp failed for dbdimp.c
gmake: *** [dbdimp.o] Error 1
gmake: *** Waiting for unfinished jobs....
"mysql.xs", line 588: warning: implicit function declaration: mysql_st_next_results
"mysql.xs", line 724: warning: implicit function declaration: is_prefix
/usr/sfw/bin/gmake -j3 -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible



Edited 2 time(s). Last edit at 09/02/2009 05:03AM by Tor Stefan Na.

Options: ReplyQuote


Subject
Written By
Posted
Help! - DBD-mysql-4.012 - make fails on Solaris SunOS 5.10
September 02, 2009 03:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.