2 messages in com.mysql.lists.perlQuestion regarding compilation
FromSent OnAttachments
Kostas Milonakis09 Sep 2003 04:41 
Jochen Wiedmann09 Sep 2003 05:42 
Subject:Question regarding compilation
From:Kostas Milonakis (km@hellasnet.gr)
Date:09/09/2003 04:41:42 AM
List:com.mysql.lists.perl

Dear Sirs,

I would like to make you a question regarding Perl Module installation that I
am trying to perform.

I have a Sun Solaris 8 (SPARC) system and i have installed Perl in
/opt/webmail/atmail/perl directory The output of the perl -V command is:

root@athfsrv02 566>/opt/webmail/atmail/perl/bin/perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos athfsrv02 5.8 generic_108528-21 sun4u sparc sunw,ultraax-i2 ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=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 -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.2 19991024 (release)',
gccosandvers='solaris2.8' 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='gcc', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib /usr/local/mysql/lib/mysql libs=-lsocket -lnsl -lgdbm -ldb -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=' -Wl,-E' cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib'

Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Sep 9 2003 12:01:33 @INC: /opt/webmail/atmail/perl/lib/5.8.0/sun4-solaris /opt/webmail/atmail/perl/lib/5.8.0 /opt/webmail/atmail/perl/lib/site_perl/5.8.0/sun4-solaris /opt/webmail/atmail/perl/lib/site_perl/5.8.0 /opt/webmail/atmail/perl/lib/site_perl . root@athfsrv02 567>

The output of the mysql_config (which is installed in the
/opt/webmail/atmail/mysql) is:

root@athfsrv02 567>/opt/webmail/atmail/mysql/bin/mysql_config Usage: /opt/webmail/atmail/mysql/bin/mysql_config [OPTIONS] Options: --cflags [-I'/opt/webmail/atmail/mysql/include/mysql'] --libs [-L'/opt/webmail/atmail/mysql/lib/mysql' -lmysqlclient
-lz -lposix4 -lgen -lsocket -lnsl -lm] --socket [/tmp/mysql.sock] --port [3306] --version [4.0.14] --libmysqld-libs [ -L'/opt/webmail/atmail/mysql/lib/mysql' -lmysqld
-lpthread -lthread -lz -lposix4 -lgen -lsocket -lnsl -lm -lpthread -lthread
-lrt] root@athfsrv02 568>

The actions / commands that I have performed to install the DBD-mysql-2.1028
perl module are: root@athfsrv02 592>/opt/webmail/atmail/perl/bin/perl Makefile.PL
--libs="-L/opt/webmail/atmail/mysql/lib/mysql -lmysqlclient -lz -lposix4 -lgen
-lsocket -lnsl -lm" --cflags=-I/opt/webmail/atmail/mysql/include/mysql
--testdb=mysql --testuser=root --testpassword=forth123 --testhost=127.0.0.1 I will use the following settings for compiling and testing:

cflags (Users choice) = -I/opt/webmail/atmail/mysql/include/mysql libs (Users choice) = -L/opt/webmail/atmail/mysql/lib/mysql
-lmysqlclient -lz -lposix4 -lgen -lsocket -lnsl -lm nocatchstderr (default ) = 0 ssl (guessed ) = 0 testdb (Users choice) = mysql testhost (Users choice) = 127.0.0.1 testpassword (Users choice) = forth123 testuser (Users choice) = root

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

Checking if your kit is complete... Looks good Using DBI 1.38 installed in
/opt/webmail/atmail/perl/lib/site_perl/5.8.0/sun4-solaris/auto/DBI Writing Makefile for DBD::mysql root@athfsrv02 593>

(NOTE: As you can see the DBI Module is already installed)

The problem that I have is in the make command. the output of the make command is:

root@athfsrv02 593>make cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod cp lib/Mysql.pm blib/lib/Mysql.pm cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm cp lib/DBD/mysql.pod blib/lib/DBD/mysql.pod cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm gcc -c -I/opt/webmail/atmail/perl/lib/site_perl/5.8.0/sun4-solaris/auto/DBI
-I/opt/webmail/atmail/mysql/include/mysql -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
-DVERSION=\"2.1028\" -DXS_VERSION=\"2.1028\" -fPIC
"-I/opt/webmail/atmail/perl/lib/5.8.0/sun4-solaris/CORE" dbdimp.c /opt/webmail/atmail/perl/bin/perl -p -e "s/~DRIVER~/mysql/g"
/opt/webmail/atmail/perl/lib/site_perl/5.8.0/sun4-solaris/auto/DBI/Driver.xst >
mysql.xsi /opt/webmail/atmail/perl/bin/perl
/opt/webmail/atmail/perl/lib/5.8.0/ExtUtils/xsubpp -typemap
/opt/webmail/atmail/perl/lib/5.8.0/ExtUtils/typemap mysql.xs > mysql.xsc && mv
mysql.xsc mysql.c Warning: duplicate function definition 'do' detected in mysql.xs, line 193 Warning: duplicate function definition 'rows' detected in mysql.xs, line 291 gcc -c -I/opt/webmail/atmail/perl/lib/site_perl/5.8.0/sun4-solaris/auto/DBI
-I/opt/webmail/atmail/mysql/include/mysql -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
-DVERSION=\"2.1028\" -DXS_VERSION=\"2.1028\" -fPIC
"-I/opt/webmail/atmail/perl/lib/5.8.0/sun4-solaris/CORE" mysql.c Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/opt/webmail/atmail/mysql/lib/mysql:/usr/local/lib:/usr/lib"
/opt/webmail/atmail/perl/bin/perl myld gcc -Wl,-E -G -L/usr/local/lib dbdimp.o
mysql.o -o blib/arch/auto/DBD/mysql/mysql.so
-L/opt/webmail/atmail/mysql/lib/mysql -lmysqlclient -lz -lposix4 -lgen -lsocket
-lnsl -lm *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBD/mysql/mysql.so' root@athfsrv02 594>

The environment variables that I have configured are: root@athfsrv02 594>env USER=kmyl LOGNAME=kmyl HOME=/home/hellasnet/kmyl PATH=/opt/webmail/atmail/mysql/bin:/sbin:/usr/sbin:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/ucb:/usr/opt/SUNWmd/sbin:/usr/proc/bin:/usr/local/sybase/bin MAIL=/var/mail//kmyl SHELL=/bin/tcsh TZ=EET SSH_TTY=/dev/pts/3 TERM=vt100 HOSTTYPE=sun4 VENDOR=sun OSTYPE=solaris MACHTYPE=sparc SHLVL=2 PWD=/tmp/atmail_pkgs/DBD-mysql-2.1028 GROUP=noc HOST=athfsrv02 REMOTEHOST=athnoc01.forthnet.prv LESS=-isnefMQc -x4 PAGER=less -isnefMQc -x4 LESSCHARSET=latin1 EDITOR=vi SYBASE=/usr/local/sybase MANPATH=/usr/share/man:/usr/man:/usr/local/man:/usr/local2/man:/usr/opt/SUNWmd/man:/opt/VRTS/man PS1=# LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/sybase/lib:/opt/webmail/atmail/mysql/lib/mysql

Any ideas about how to troubleshoot my problem?

Thank you in advance.