Hi,
Having a problem with the DBD::Oracle 1.07 module, on the make step.
The box we are running it on is an N class HP Server running HPUX 11.0,
trying to link to Oracle 7.3.4.
We get the message:
cc: "dbdimp.c", line 740: error 1588: "desc_h" undefined.
cc: "dbdimp.c", line 740: error 1531: Invalid member of struct or union.
*** Error exit code 1
(full log below)
Have checked with DBA re. $ORACLE_HOME, $ORACLE_SID, $ORACLE_PATH,
$LD_LIBRARY_PATH - all confirmed as correct.
We have a working install of Perl 5.6.1, built using HP ANSI C compiler on
the local machine, accepting all defaults.
Also static version of DBI 1.18, created using commands from DBD::Oracles'
README.help:
perl Makefile.PL LINKTYPE=static
make
make perl
make test FULLPERL=./perl
make install
Everything seems fine to this point.
To install DBD::Oracle, have tried:
perl Makefile.PL LINKTYPE=static
perl Makefile.PL -p LINKTYPE=static
One of my colleagues who knows C has had a look at the dbdimp.c program.
desc_h seems to be defined only for OCI 8,
we should be picking up 7 with Oracle 7.3.4? From logs below, I'm also not
convinced that the static linking is working correctly.
Log files:
root@uk200:/tmp/perl> perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=hpux, osvers=11.00, archname=PA-RISC2.0
uname='hp-ux uk200 b.11.00 u 9000800 659349332 unlimited-user license '
config_args='-de'
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cc', ccflags ='-D_HPUX_SOURCE -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ae',
optimize='-O',
cppflags='-D_HPUX_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Ae'
ccversion='A.11.01.20', 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, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -Wl,+vnocompatwarnings -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lnm -lndbm -ldld -lm -lc -lndir -lcrypt -lsec
perllibs=-lnsl -lnm -ldld -lm -lc -lndir -lcrypt -lsec
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,deferred '
cccdlflags='+z', lddlflags='-b +vnocompatwarnings -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under hpux
Compiled at Jul 11 2001 09:15:35
@INC:
/opt/perl5/lib/5.6.1/PA-RISC2.0
/opt/perl5/lib/5.6.1
/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0
/opt/perl5/lib/site_perl/5.6.1
/opt/perl5/lib/site_perl
.
perl Makefile.PL -V log
Using DBI 1.18 installed in
/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI
Configuring DBD::Oracle ...
>>> Remember to actually *READ* the README file!
Especially if you have any problems.
Using Oracle in /oracle/app/oracle/product/7.3.4
4.0.1.0.0 Oracle Unix Installer
1.0.1.0.0 Oracle On-Line Text Viewer
7.3.4.0.0 ORACLE NLS Libraries and Utilities
7.3.4.0.0 ORACLE Core Libraries
7.3.4.0.0 Oracle Common RDBMS Libraries and Utilities
7.3.4.0.0 ORACLE PL/SQL Libraries
7.3.4.0.0 ORACLE Common Libraries
7.3.4.0.0 ORACLE Common Precomp Libraries
7.3.4.0.0 ORACLE Common Network Libraries and Utilities
7.3.4.0.0 ORACLE Common Trace Libraries
7.3.4.0.0 ORACLE Common Utilities
7.3.4.0.0 ORACLE Common Libraries and Utilities
7.3.4.0.0 Platform specific Libraries and Utilities
2.3.4.0.0 SQL*Net (V2)
2.3.4.0.0 TCP/IP Protocol Adapter (V2)
1.3.2.0.0 Remote Operations
2.1.4.14.0 ToolKit 2.1 Base
7.3.4.0.0 SLAX: parser
2.3.4.0.0 PL/SQL V2
7.3.4.0.0 Oracle7 Distributed Database option
2.3.4.0.0 Oracle Server Manager
7.3.4.0.0 Oracle7 Server (RDBMS)
1.0.0.0.1 <Database Startup> Load Files
7.3.4.0.0 Oracle Intelligent Agent
7.3.4 Oracle Trace
7.3.4.0.0 Precomp
2.2.4.0.0 Pro*C
1.8.4.0.0 Pro*COBOL
1.1.5.0.0 SQL*Module
1.1.5.0.0 SQL*Module for C
3.3.4.0.0 SQL*Plus
2.1.4.14.0 ToolKit 2.1 Extension
2.0.5.4.0 Multimedia APIs
2.1.1.0.0 Oracle Help
2.1.3.0.0 Oracle Office Automation Core
2.3.4.0.0 Oracle Server Manager (Motif)
Found rdbms/demo/ocidfn.h
Found rdbms/demo/ocidem.h
Found rdbms/demo/ociapr.h
Found rdbms/demo/ocikpr.h
Found rdbms/demo/oratypes.h
Found header files in rdbms/demo.
Found /oracle/app/oracle/product/7.3.4/rdbms/demo/oracle.mk
Found /oracle/app/oracle/product/7.3.4/otrace/demo/atmoci.mk
Found /oracle/app/oracle/product/7.3.4/precomp/demo/proc/proc.mk
Using /oracle/app/oracle/product/7.3.4/rdbms/demo/oracle.mk
Reading /oracle/app/oracle/product/7.3.4/rdbms/demo/oracle.mk.
Reading /oracle/app/oracle/product/7.3.4/rdbms/lib/env_rdbms.mk.
Read a total of 587 lines from
/oracle/app/oracle/product/7.3.4/rdbms/lib/env_rdbms.mk (including
inclusions)
Read a total of 746 lines from
/oracle/app/oracle/product/7.3.4/rdbms/demo/oracle.mk (including inclusions)
Deleted AR definition: AR=ar
Deleted LDFLAGS definition: LDFLAGS =-o $@ $(PRODUCT_LIBHOME) -L$(LIBHOME)
Deleted SHELL definition: SHELL=/bin/sh
Deleted ECHO definition: ECHO = echo
Deleted CHMOD definition: CHMOD = chmod
Deleted CFLAGS definition: CFLAGS= $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS)
$(QACCFLAGS) $(PFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS)
Deleted CCFLAGS definition: CCFLAGS= $(HPCCFLAGS)
Deleted CPP definition: CPP=/usr/ccs/lbin/cpp
Deleted OPTIMIZE definition: OPTIMIZE=$(OPTIMIZE2)
Deleted ASFLAGS definition: ASFLAGS=-c $(HPCCFLAGS)
COMPXANO macro redefined by Oracle
from $(subst -xO2,,$(COMPXA))
to $(subst +O2,,$(COMPXA))
Deleted CC definition: CC=cc
COMPRONO macro redefined by Oracle
from $(subst -xO2,,$(COMPRO))
to $(CC) $(ROFLAGS) $(CDEBUG) $(CCFLAGS) $(PFLAGS) $(MAKERONO)
Deleted LD definition: LD=ld
LDFLAGS macro redefined by Oracle
from -o $@ $(PRODUCT_LIBHOME) -L$(LIBHOME)
to $(OPTIMIZE) -o $@ $(PRODUCT_LIBHOME) -L$(LIBHOME) -L/usr/lib
Deleted LDFLAGS definition: LDFLAGS= $(OPTIMIZE) -o $@ $(PRODUCT_LIBHOME)
-L$(LIBHOME) -L/usr/lib
Deleted PERL definition: PERL = perl
SHELL macro redefined by Oracle
from /bin/sh
to /usr/bin/sh
Deleted SHELL definition: SHELL=/usr/bin/sh
Deleting ORA_NLS = $(ORACLE_HOME)/ocommon/nls/admin/data
because it is not already set in the environment
and it can cause ORA-01019 errors.
Deleted ORA_NLS definition: ORA_NLS = $(ORACLE_HOME)/ocommon/nls/admin/data
NTCONTAB macro redefined by Oracle
from ntcontab.c
to $(LIBHOME)/ntcontab.o
LINK macro redefined by Oracle
from ld $(COMPOBJS)
to cc +O2 +Ofastaccess +Oprocelim
OTHERLIBS macro redefined by Oracle
from `cat $(ORACLE_HOME)/rdbms/lib/sysliblist` $(LLAIO)
to `cat $(ORACLE_HOME)/rdbms/lib/sysliblist` $(LLAIO) $(LDSTRING)
DEVTTLIBS macro redefined by Oracle
from $(TTLIBS)
to $(NETLIBS) $(LLIBORA) $(NETLIBS) $(LLIBORA) $(LIBPLSHACK) \
$(LLIBEPC) $(CORELIBS) $(SPLIBS) $(LOCALLIBS) $(EXOSLIBS) \
`cat $(ORACLE_HOME)/rdbms/lib/sysliblist` $(SECLIBS) $(MATHLIB)
LDFLAGS macro redefined by Oracle
from $(OPTIMIZE) -o $@ $(PRODUCT_LIBHOME) -L$(LIBHOME) -L/usr/lib
to -L$(LIBHOME) -L$(ORACLE_HOME)/rdbms/lib
Deleted LDFLAGS definition: LDFLAGS=-L$(LIBHOME) -L$(ORACLE_HOME)/rdbms/lib
ECHO macro redefined by Oracle
from echo
to $(ORACLE_HOME)/bin/echodo
Deleted ECHO definition: ECHO=$(ORACLE_HOME)/bin/echodo
Evaluating `cat /oracle/app/oracle/product/7.3.4/rdbms/lib/sysliblist`
returned '-l:libcma.sl -lcl -lm -l:libcl.a'
Discovering Oracle OCI build rules...
by executing:
make -f /oracle/app/oracle/product/7.3.4/rdbms/demo/oracle.mk build
ECHODO=true ECHO=echo GENCLNTSH='echo genclntsh' EXE=DBD_ORA_EXE
OBJS=DBD_ORA_OBJ.o
Oracle oci build command:
cc -Wl,-Bimmediate -o DBD_ORA_EXE DBD_ORA_OBJ.o
/oracle/app/oracle/product/7.3.4/lib/libclntsh.sl -l:libcma.sl -lcl -lm
-l:libcl.a
***
*** Warning: You may need to build using static linking. See the README
file.
***
System: perl5.006001 hp-ux uk200 b.11.00 u 9000800 659349332 unlimited-user
license
Compiler: cc -O -D_HPUX_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Ae
Linker: /usr/bin/ld
Oracle makefiles would have used these definitions but we override them:
CC: cc
CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS)
$(SHARED_CFLAG) $(ENV_FLAGS)
[$(GFLAG) +O2 $(CDEBUG) -Ae -DHPUX +Z -z -DSLXMX_ENABLE
-DSLTS_ENABLE -D_REENTRANT +Ofastaccess +Oentrysched +Onolimit +ESlit
+Oprocelim +DA1.0 +DS2.0 $(QACCFLAGS)
-I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/oracle/app/oracle/product/7.3.4/rdbms/public -I. $(LPFLAGS)
$(SHARED_CFLAG) $(ENV_FLAGS)]
CLIBS: $(LOCALLIBS) $(EXOSLIBS) $(LIBBSD) $(OTHERLIBS) $(SECLIBS)
$(M6LIBS)
[ -l:libcma.sl -lcl -lm -l:libcl.a -L/usr/lib ]
LDFLAGS: -L$(LIBHOME) -L$(ORACLE_HOME)/rdbms/lib
[-L$(LIBHOME) -L/oracle/app/oracle/product/7.3.4/rdbms/lib]
LDSTRING: -L/usr/lib
[-L/usr/lib]
Linking with OTHERLDFLAGS = -Wl,-Bimmediate
/oracle/app/oracle/product/7.3.4/lib/libclntsh.sl -l:libcma.sl -lcl -lm
-l:libcl.a [from 'build' rule]
MakeMaker (v5.45)
ABSTRACT_FROM => q[Oracle.pm]
AUTHOR => q[Tim Bunce ([EMAIL PROTECTED])]
DEFINE => q[]
DIR => []
EXE_FILES => [q[ora_explain]]
INC => q[-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public
-I. -I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI]
NAME => q[DBD::Oracle]
OBJECT => q[$(O_FILES)]
PREREQ_PM => { DBI=>q[0] }
VERSION_FROM => q[Oracle.pm]
clean => { FILES=>q[Oracle.xsi dll.base dll.exp sqlnet.log
libOracle.def ora_explain mk.pm] }
dist => { DIST_DEFAULT=>q[clean distcheck disttest ci tardist],
PREOP=>q[$(MAKE) -f Makefile.old distdir], COMPRESS=>q[gzip -v9],
SUFFIX=>q[gz] }
dynamic_lib => { OTHERLDFLAGS=>q[ -Wl,-Bimmediate
/oracle/app/oracle/product/7.3.4/lib/libclntsh.sl -l:libcma.sl -lcl -lm
-l:libcl.a] }
Using PERL=/usr/bin/perl
Warning: By default new modules are installed into your 'site_lib'
directories. Since site_lib directories come after the normal library
directories you must delete any old DBD::Oracle files and directories from
your 'privlib' and 'archlib' directories and their auto subdirectories.
Using DBD::Oracle 1.07.
Using DBI 1.18 installed in
/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI
Writing Makefile for DBD::Oracle
*** If you have problems, read the README and README.help files ***
(Of course, you have read README by now anyway, haven't you?)
running make (where the error occurs)
when I run make, get :
root@uk200:/tmp/perl/mod/DBD-Oracle-1.07> make
cp oraperl.ph blib/lib/oraperl.ph
cp Oracle.pm blib/lib/DBD/Oracle.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp Oraperl.pm blib/lib/Oraperl.pm
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" <
/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI/Driver.xst > Orac
le.xsi
/usr/bin/perl -I/opt/perl5/lib/5.6.1/PA-RISC2.0
-I/opt/perl5/lib/5.6.1 /opt/perl5/lib/5.6.1/ExtUtils/xsubpp -ty
pemap /opt/perl5/lib/5.6.1/ExtUtils/typemap Oracle.xs > Oracle.xsc && mv
Oracle.xsc Oracle.c
cc -c -I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/oracle/app/oracle/product/7.3.4/rdbms/public -I. -I/oracl
e/app/oracle/product/7.3.4/rdbms/demo
-I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/opt/perl5/lib/site_perl/5.6.1/PA-
RISC2.0/auto/DBI -D_HPUX_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Ae -O -DVERSION=\"1.
07\" -DXS_VERSION=\"1.07\" +z -I/opt/perl5/lib/5.6.1/PA-RISC2.0/CORE
Oracle.c
cc -c -I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/oracle/app/oracle/product/7.3.4/rdbms/public -I. -I/oracl
e/app/oracle/product/7.3.4/rdbms/demo
-I/oracle/app/oracle/product/7.3.4/rdbms/demo
-I/opt/perl5/lib/site_perl/5.6.1/PA-
RISC2.0/auto/DBI -D_HPUX_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Ae -O -DVERSION=\"1.
07\" -DXS_VERSION=\"1.07\" +z -I/opt/perl5/lib/5.6.1/PA-RISC2.0/CORE
dbdimp.c
cc: "dbdimp.c", line 740: error 1588: "desc_h" undefined.
cc: "dbdimp.c", line 740: error 1531: Invalid member of struct or union.
*** Error exit code 1
Stop.
Have tried perl Makefile.PL -s desc_h on the off-chance - nothing
interesting comes up that I can see.
Any help greatly appreciated.