Hi,

In the 'Changes in DBD-Oracle 1.15 27th January 2004' is written that:

        Fixed to build okay for Oracle 8.0.x and for older C compilers.

But DBD-Oracle 1.15 is not usable if it build using Oracle 8.0.6 libraries:

        Unresolved symbol: OCILobWriteAppend (code)  from 
blib/arch/auto/DBD/Oracle/Oracle.sl

There is really no *.o, *.a and *.sl (HP-UX 10.20 => Oracle 8.0.6 last possible
release) in the Oracle 8.0.6 tree, which defines OCILobWriteAppend.

I have done the following changes:

--- Oracle.xs~  Wed Jan 28 00:44:50 2004
+++ Oracle.xs   Thu May 27 18:16:48 2004
@@ -160,7 +160,7 @@
    amtp = data_len;
    /* if locator is CLOB and data is UTF8 and not in bytes pragma */
    /* if (0 && SvUTF8(data) && !IN_BYTES) { amtp = sv_len_utf8(data); }  */
-#ifdef OCI_V8_SYNTAX
+#if defined(OCI_V8_SYNTAX) && defined(OCIFileInit)
    OCILobWriteAppend_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
            &amtp, bufp, (ub4)data_len, OCI_ONE_PIECE,
            NULL, NULL,
--- t/long.t~   Wed Jan 28 00:45:18 2004
+++ t/long.t    Thu May 27 18:43:33 2004
@@ -275,7 +275,7 @@



-if (ORA_OCI >= 8 && $type_name =~ /LOB/i) {
+if (ORA_OCI > 8 && $type_name =~ /LOB/i) {
    print " --- testing ora_auto_lob to access $type_name LobLocator\n";
    my $ll_sth = $dbh->prepare(qq{
            SELECT lng, idx FROM $table ORDER BY idx


Now it works, except the lob appending. The second patch was already necessary for DBD-Oracle 1.12 and Oracle 8.0.6 (the server version is the same), because otherwise some blob test failes and this stops be rpm (yes on HP-UX) build. I don't know if defined(OCIFileInit) is a general good choice, but OCI_V8_SYNTAX is defined in oci.h of Oracle 8.0.6 and 8.1.6 and has for both releases the value 3. But 8.1.6 provides OCILobWriteAppend and 8.0.6 not.

BTW, it would be a good idea that Makefile.PL supports in the next release a
additional option. Currenty -l forces the usage of liblntsh.sl, the additional
option should force the usage of the static libclnt library (e.g. libclntst8.a).
On HP-UX 11.00 the liblntsh.sl of Oracle 8.1.6 is linked with libcl.2. This is not
necessary for DBD-Oracle but raises a incompatibly error if Oracle.sl is loaded
by a non threaded Perl 5.6.1 (but linked with libpthread). Using libclntst8.a all
works fine.

regards, Silvio



Reply via email to