Disclaimer: This is by no means a definative guide, merely the ramblings of 
someone who had spent 2 weeks getting DBD::Oracle to install on HP-UX. 

Could you send the output of the following commands: (I'll use my box for 
examples)
**************************************************************************
# perl -V

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=hpux, osvers=11.11, archname=PA-RISC2.0
    uname='hp-ux sulley b.11.11 u 9000889 1428622331 unlimited-user license '
    config_args='-Dprefix=/usr/ulairi_perl -Duselargefiles -Duse64bitall'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
  Compiler:
    cc='cc', ccflags =' +z -D_HPUX_SOURCE +DD64 -Ae -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 ',
    optimize='-O',
    cppflags='+z -D_HPUX_SOURCE +DD64 -Ae'
    ccversion='B.11.11.24830.GP', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='/usr/bin/ld', ldflags ='+s +DD64 -Wl,+vnocompatwarnings -
L/usr/local/lib -L/lib/pa20_64'
    libpth=/usr/local/lib /lib/pa20_64 /lib /usr/lib /usr/ccs/lib
    libs=-lcl -lpthread -lnsl -lnm -ldld -lm -lc -lsec
    perllibs=-lcl -lpthread -lnsl -lnm -ldld -lm -lc -lsec
    libc=/lib/pa20_64/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='+s -b +vnocompatwarnings -L/usr/local/lib -
L/lib/pa20_64'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
  Built under hpux
  Compiled at Feb 26 2002 09:16:45
  @INC:
    /usr/ulairi_perl/lib/5.6.1/PA-RISC2.0
    /usr/ulairi_perl/lib/5.6.1
    /usr/ulairi_perl/lib/site_perl/5.6.1/PA-RISC2.0
    /usr/ulairi_perl/lib/site_perl/5.6.1
    /usr/ulairi_perl/lib/site_perl
    .
*****************************************************************************
# uname -a
HP-UX sulley B.11.11 U 9000/889 1428622331 unlimited-user license
*****************************************************************************
# file `which perl`
/usr/bin/perl:  ELF-64 executable object file - PA-RISC 2.0 (LP64)
file /opt/perl5/lib/site_perl/5.6.0/PA-RISC1.1/auto/DBD/Oracle/Oracle.sl
*****************************************************************************
# grep -E "^cc=|^ccflags=|^cppflags=" /opt/perl5/lib/5.6.0/PA-RISC1.1/Config.pm 
cc='cc'
ccflags=' +z -D_HPUX_SOURCE +DD64 -Ae -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 '
cppflags='+z -D_HPUX_SOURCE +DD64 -Ae'
*****************************************************************************

Are you using the HP-UX bundled or the precompiled Perl?

If either is the case, you'll probably end up needing to recompile Perl from 
scratch (Recommend using the ANSI C compiler from HP, but gcc will work, too).
If and when you do, it is recommended removing the other perls so that the 
modules don't pick up a wrong executable and use a wrong config file (see notes 
on Config.pm below)

Torment your DBA, make sure you have Pro*C installed.

I've beaten my head against the Perl 5.6.1 on HP-UX 11i + DBI 1.21 + 
DBD::Oracle 1.12 + Oracle 8.1.7.3.0 problem for a while, and here's what I came 
up with:

1) Bundled Perl5 is the same one that is available on the freeware site and 
both are compiled with gcc. Not a big deal in of itself, but if you don't have 
GCC installed (and the freeware GCC 3.x will _not_ work on 11i), then nothing 
you try to get via CPAN will work since the Makefile.PL files in the modules 
will go read the cc variable value out of the Config.pm file, try to use gcc 
and fail rather spectacularly.

2) Bundled Perl5, to be as compatible as possible, is a PA-RISC1.1 binary. If 
you have a PA-RISC2.0 (64-bit HP-UX) OS, then chances are, your Oracle install 
is also 64-bit, and the dynamic loader will not let you load a 64-bit library 
into the address space of a 32-bit binary.

3) Ran into weird problems trying to get DBD to install.
   Was doing this on HP-UX 11i, on a K460 machine (64-bit is what this boils 
down to), with the ANSI C compiler installed, not a trace of gcc/binutils, with 
latest/greatest patches for the ANSI C compiler (had to use the 11.0's compiler 
from the June 2001 CDs due to various reasons).

   i) Do a make install on Perl (as root, preferably) 
   ii) Run perl -MCPAN -e shell, install Bundle::CPAN (don't forget to 
either "reload cpan" or quit and re-run 'perl -MCPAN -e shell' command).
   iii) Via CPAN, "install Bundle::DBI" (Strangely enough, I had to do it 
twice, first time it picked up v1.14, second time, v 1.21)
   iv) Via CPAN, "install DBD::Oracle". This may fail (during the testing 
phase). 

Here are the notes I took while dealing with the last piece, hope they help 
someone:

In the development environment, -lpthread and -lcl MUST be the first two ones, 
in that order. Perl itself should NOT be threaded. (HP-UX's threads are... 
broken).

Compile environment:
ORACLE_HOME=/opt/local/appdev/software/oracle/product/8.1.7
SHLIB_PATH=/usr/local/lib:/usr/lib:/usr/ccs/lib:/opt/local/appdev/software/oracl
e/product/8.1.7/lib:/opt/local/ appdev/software/oracle/product/8.1.7/lib64
LDFLAGS=+s -L/usr/local/lib -L/usr/ccs/lib -L/usr/lib -
L/opt/local/appdev/software/oracle/product/8.1.7/lib -L/ 
opt/local/appdev/software/oracle/product/8.1.7/lib64 
CFLAGS=+DD64 +z -I/usr/local/include -I/usr/include -I/usr/ccs/include
CPPFLAGS=+z -I/usr/local/include -I/usr/include -I/usr/ccs/include

Perl's Configure run:
../Configure -Dprefix=/usr/ulairi_perl -Duselargefiles -Duse64bitall

No perl5 compatibility
Use builtin Malloc? (No)
+z added to the compiler flags, 
+s added to the linker flags.

Perl installs Ok, Compress-Zlib-1.16 didn't want to compile until some hacking 
of the Makefile for LibZ was done (threw in +DD64 +z -Ae -
D_FILE_OFFSET_BITS=64 -D_HPUX_SOURCE) and put libz.a in /lib/pa20_64

For whatever reason, DBD::Oracle's Makefile.PL picks up too many -l libs to be 
passed on the command line when building Oracle.sl
So, get the distro, do "perl Makefile.PL", then "make". It fails. Fine. Run the 
command below (may need to adjust paths and such).

LD_RUN_PATH="/opt/local/appdev/software/oracle/product/8.1.7/lib64:/opt/local/ap
pdev/software/oracle/ product/8.1.7/rdbms/lib64:/lib/pa20_64" \
/usr/bin/ld +s -b +vnocompatwarnings -L/lib/pa20_64 -L/usr/local/lib Oracle.o 
dbdimp.o \
oci7.o 
oci8.o /opt/local/appdev/software/oracle/product/8.1.7/rdbms/lib64/ssdbaed.o \
/opt/local/appdev/software/oracle/product/8.1.7/rdbms/lib64/defopt.o \
/opt/local/appdev/software/oracle/product/8.1.7/lib64/nautab.o \
/opt/local/appdev/software/oracle/product/8.1.7/lib64/naeet.o \
/opt/local/appdev/software/oracle/product/8.1.7/lib64/naect.o \
/opt/local/appdev/software/oracle/product/8.1.7/lib64/naedhs.o \
/opt/local/appdev/software/oracle/product/8.1.7/rdbms/lib64/kpuadef.o \
-l:libcl.a -o blib/arch/auto/DBD/Oracle/Oracle.sl \
-L/opt/local/appdev/software/oracle/product/8.1.7/lib64/ \
-L/opt/local/appdev/software/oracle/product/8.1.7/lib \
-lclient8 -lclntsh -lcommon8 -lcore8 -ldld -lgeneric8 -lldapclnt8 \
-lm -lmm -ln8 -lnbeq8 -lncrypt8 -lnent8 -lnhost8 -lnl8 -lnldap8 \
-lnls8 -lnoname8 -lnro8 -lnsgr8 -lnsslb8 -lntcp8 -lntcps8 -lntns8 \
-lnus8 -lnzjs8 -lpls8 -lpthread -lrt -lsql8 -ltrace8 -lvsn8 \
-lwtc8

In the compile directory, do "ldd blib/arch/auto/DBD/Oracle/Oracle.sl"
Here's the output I have on Sulley:
->ulairi<-@sulley in </tmp/.cpan/build/DBD-Oracle-1.12>
[696]$ ldd -v blib/arch/auto/DBD/Oracle/Oracle.sl

find library=libclntsh.sl.8.0; required by blib/arch/auto/DBD/Oracle/Oracle.sl
libclntsh.sl.8.0 
=> /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0

find library=libdl.1; required by blib/arch/auto/DBD/Oracle/Oracle.sl
libdl.1 => /lib/pa20_64/libdl.1

find library=libm.2; required by blib/arch/auto/DBD/Oracle/Oracle.sl
libm.2 => /lib/pa20_64/libm.2

find library=libpthread.1; required by blib/arch/auto/DBD/Oracle/Oracle.sl
libpthread.1 => /lib/pa20_64/libpthread.1

find library=librt.2; required by blib/arch/auto/DBD/Oracle/Oracle.sl
librt.2 => /lib/pa20_64/librt.2

find library=libwtc8.sl; required by blib/arch/auto/DBD/Oracle/Oracle.sl
libwtc8.sl => /opt/local/appdev/software/oracle/product/8.1.7/lib64/libwtc8.sl

find library=libwtc8.sl; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libwtc8.sl => /opt/local/appdev/software/oracle/product/8.1.7/lib64/libwtc8.sl

find library=librt.2; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
librt.2 => /lib/pa20_64/librt.2

find library=libpthread.1; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libpthread.1 => /lib/pa20_64/libpthread.1

find library=libnss_dns.1; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libnss_dns.1 => /lib/pa20_64/libnss_dns.1

find library=libdl.1; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libdl.1 => /lib/pa20_64/libdl.1

find library=libm.2; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libm.2 => /lib/pa20_64/libm.2

find library=libc.2; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libc.2 => /lib/pa20_64/libc.2

find library=libcl.2; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libclntsh.sl.8.0
libcl.2 => /lib/pa20_64/libcl.2

find library=libdl.1; required by /lib/pa20_64/librt.2
libdl.1 => /usr/lib/pa20_64/libdl.1

find library=libc.2; required 
by /opt/local/appdev/software/oracle/product/8.1.7/lib64/libwtc8.sl
libc.2 => /lib/pa20_64/libc.2

find library=libnsl.1; required by /lib/pa20_64/libnss_dns.1
libnsl.1 => /usr/lib/pa20_64/libnsl.1

find library=libdl.1; required by /lib/pa20_64/libnss_dns.1
libdl.1 => /usr/lib/pa20_64/libdl.1

find library=libdl.1; required by /lib/pa20_64/libc.2
libdl.1 => /usr/lib/pa20_64/libdl.1

find library=libdl.1; required by /lib/pa20_64/libcl.2
libdl.1 => /usr/lib/pa20_64/libdl.1

find library=libxti.2; required by /usr/lib/pa20_64/libnsl.1
libxti.2 => /usr/lib/pa20_64/libxti.2

There should be NO unresolved dependencies or there shall be Trouble.

Do "make test", it should be flawless.
If it is, "make install".

Reply via email to