Dear sir/madam,
I encountered some problem on installing DBD on SCO.
My server environment as follow:
OS: SCO_SV mis 3.2 5.0.6 i386
C Compiler:
Reading specs from /usr/local/lib/gcc-lib/i486-pc-sco3.2v5.0/2.95/specs
gcc version 2.95 19990728 (release)
Perl:
# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=sco3.2v5.0, osvers=5.0.X, archname=i486-pc-sco3.2v5.0
uname='sco_sv localhost 3.2 5.0.5 i386 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='/usr/local/bin/gcc', optimize='-O0', gccversion=
cppflags='-UM_XENIX -DPERL_SCO -DPERL_SCO5 -melf'
ccflags ='-UM_XENIX -DPERL_SCO -DPERL_SCO5 -melf'
stdchar='unsigned char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -lndbm -ldbm -lld -lm -lc -lcrypt -lsec -lPW -lx
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-Bexport
-L/usr/local/lib'
cccdlflags='-fpic', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under sco3.2v5.0
Compiled at Jul 27 2000 22:31:17
@INC:
/usr/lib/perl5/5.6.0/i486-pc-sco3.2v5.0
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i486-pc-sco3.2v5.0
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.
# esql -V
INFORMIX-ESQL Version 5.10.UC1
Software Serial Number AAC#A674586
# tbstat -V
RSAM Version AH5.07.UC3
# env | more
CC=/usr/local/bin/gcc
DBD_INFORMIX_ESQLLD_NO_G_OPTION=Y
ENV=${_ENVFILE[(_=1)+(_$-=0)-_${-%%*i*}]}
HOME=/
HUSHLOGIN=FALSE
HZ=100
INFORMIXDIR=/usr/informix
LOGNAME=root
MAIL=/usr/spool/mail/root
PATH=/bin:/etc:/usr/bin:/tcb/bin:/usr/local/bin:/usr/informix/bin
SHELL=/bin/sh
TERM=vt100
TZ=CST-8
_ENVFILE=/.kshrc
-----------------------------------------------------------
The problem in detail is as follow:
Install DBI-1.14 -> Everything is fine..
perl Makefile.PL
make
make test
make install
Install DBD-Informix-1.04.PC1
My procedures are:
1. perl Makefile.PL -> OK
2. make -> error
Informix.xs: In function `XS_DBD__Informix__dr_FETCH':
Informix.xs:102: invalid type argument of `->'
DBIc_DBISTATE(imp_drh)->get_attr(drh, keysv);
*** Error code 1 (bu21)
same error also occurred in compiling dbdimp.ec
3. Update Informix.xs and dbdimp.ec source code
replace DBIc_DBISTATE(imp_drh) with ((dbistate_t*)DBIc_DBISTATE(imp_drh))
4. make -> OK
5. make test -> Only 2% tests OK
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/
5.6.0/i486-pc-sco3.2v5.0 -I/usr/lib/perl5/5.6.0 -e 'use Test::Harness qw(
&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/t00basic..........install_driver(Informix) failed: Can't load 'blib/arch/auto/
DBD/Informix/Informix.so' for module DBD::Informix: dynamic linker: /usr/bin/perl:
relocation error: symbol not found: DBIc_DBISTATE at
/usr/lib/perl5/5.6.0/i486-pc-sco3.2v5.0/DynaLoader.pm line 200.
at (eval 1) line 3
Almost all failed tests due to same above reasons
6. Try static build
make static -> OK
7. make perl -> error
Undefined first referenced
symbol in file
DBIc_DBISTATE
blib/arch/auto/DBD/Informix/Informix.a(Informix.o)
perl: fatal error: Symbol referencing errors. No output written to perl
collect2: ld returned 1 exit status
*** Error code 1 (bu21)
*** Error code 1 (bu21)
I can't find any source code containing DBIc_DBISTATE.
Please give me advice to solve this problem!!
Best Regards,
Brad Kao