Hi,
I spent some considerable time attempting to get DBD::Oracle working and
wanted to share the solution in hopes of helping fellow travelers.

Here are the details of the environment:
        HPUX 11.0
        Oracle 8.1.7.2 64-bit
        perl-5.8.0
        DBI-1.30
        DBD-Oracle-1.12

Using the following HP ANSI C compiler per swlist:
B3901BA                       B.11.02.04     HP C/ANSI C Developer's Bundle
for HP-UX 11.00 (S800) 

Build procedure:

* Build Perl taking the defaults except for:

        * Add "-lcl -lpthread " at the begging of the list in response to
the question "What libraries to use?".
        * Add "+z" to the list in response to the question "Any additional
cc flags?".
        * Add "+s" to the list in response to the question "Any additional
ld flags (NOT including libraries)?".

The "+s" allows Perl to look at SHLIB_PATH, so you can use the same build
with different ORACLE_HOME's on different machines.  This originally got me
around the error that the Oracle shared library could not be found.  Sorry,
I did not save the error message, but it gave a crazy hard-coded path like
"/e/p//lib/xxx.sl".

* Build DBI with defaults.

* Build DBD::Oracle with modifications to the Makefile generated from
Makefile.PL:

Added the following string just before '-lqsmashr', which occurs 3 times in
my file:

        -lm $ORACLE_HOME/rdbms/lib/homts.o -lclntsh -lagtsh

Note that $ORACLE_HOME was hard-coded, but it won't matter since the file
will be statically linked.  There may be a better way to do this than
editing the Makefile, but I did not take the time to figure it out.

Building without -lagtsh (and the .o file) gave unresolved symbol errors for
"LhtStrCreate" and "LhtStrInsert".  Without homts.o, there is another
unresolved symbol from libagtsh.  I got the information about homts.o from
Oracle MetaLink Note:123476.1 (which references Note:99383.1 where the real
information resides.)  An alternative, apparently, is to regenerate
libclintsh after editing a file 'shrept.lst' controlling which symbols are
exported.

Please feel free to email me if any clarification of this procedure is
required.

Thanks,
Paul

Reply via email to