Re: Failed build attempt for Oracle-OCI-0.04

[email protected] ("Fox, Michael") Wed, 8 Aug 2001 17:31:21 +1000
Newsgroups perl.dbi.oracle-oci
Message-ID <033708395F6FD4119CFD0008C7B365A80539370C@exs-mel-04.hq.auspost.com.au>
OK.
First I reported it incorrectly, when I went back to DBD::Oracle I found
that it had not built correctly at all, and had the same problem as the OCI
build (upioep unresolved).  Tim then announced DBD::Oracle 1.08, so I
switched to that.

The "Discovering Oracle OCI build rules..." section of Makefile.PL failed,
whereas it hadn't on previous versions of Oracle, so I investigated that.
As I understand it, by setting ECHODO=true you get the command the makefile
would have generated, then dissect that.  The demo_rdbms.mk files are quite
different in Oracle 8.0.4 and 8.1.7 (59 diffs).  One is that the build
option no longer includes the ${ECHODO} part, so the fake make issues an
error and the build discovery fails.

I made a copy of the demo directory, put in the ${ECHODO} against the build:
part of the makefile, and included this directory in the search path in
Makefile.PL.  The build discovery now worked, DBD::Oracle built OK, and the
tests all passed (I think - output below).

I then went back to the OCI build, and got a different error:

t/01base............Can't load 'blib/arch/auto/Oracle/OCI/OCI.so' for module
Oracle::OCI: dlopen: blib/arch/auto/Oracle/OCI/OCI.so: 
symbol "OCICollIsLocator" unresolved at
/usr/users/foxm/lib/perl5/5.6.0/alpha-dec_osf/DynaLoader.pm line 200.
 at t/01base.t line 8

I then returned to Tim's original advice and searched used Makefile.PL -s
"OCICollIsLocator".  It produced (the interesting bits?):

  searching oracle lib/libclntst8.a ...
OCICollIsLocator                 | 0000000000108144 | T | 0000000000000008
  searching oracle lib/libgeneric8.a ...
OCICollIsLocator                 | 0000000000108144 | T | 0000000000000008
  searching oracle lib/libclntsh.so ...
OCICollIsLocator                 | 0004396970517280 | T | 0000000000000008
  searching oracle lib/libnjni8.so ...
OCICollIsLocator                 | 0004396970564096 | T | 0000000000000008
  searching oracle lib/libocijdbc8.so ...
OCICollIsLocator                 | 0004396970912256 | T | 0000000000000008
  searching oracle lib/libocijdbc8_g.so ...
OCICollIsLocator                 | 0004396964230048 | T | 0000000000000008


I'm not to sure where to go from here?

DBD::ORACLE 1.08 test output
============================

[foxm(8.1.7:dwhx01) /u02/devel/src/cpan/modules2/DBD-Oracle-1.08] make test
PERL_DL_NONLAZY=1 /usr/users/foxm/bin/perl -Iblib/arch -Iblib/lib
-I/usr/users/foxm/lib/perl5/5.6.0/alpha-dec_osf -I/usr/users/foxm/
lib/perl5/5.6.0 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0;
runtests @ARGV;' t/*.t
t/base..............ok

t/general...........ok

t/long..............ok

t/plsql.............ok

t/reauth............skipped test on this platform
All tests successful, 1 test skipped.
Files=5, Tests=228, 12 wallclock secs ( 0.52 cusr +  0.25 csys =  0.77 CPU)
PERL_DL_NONLAZY=1 /usr/users/foxm/bin/perl -Iblib/arch -Iblib/lib
-I/usr/users/foxm/lib/perl5/5.6.0/alpha-dec_osf -I/usr/users/foxm/
lib/perl5/5.6.0 test.pl
Oraperl test application $Revision: 1.2 $

Oraperl emulation interface version 1.41 
DBD::Oracle 1.08 using OCI8 by Tim Bunce
DBI 1.19 by Tim Bunce

Data sources:
        dbi:Oracle:HRDMART8
        dbi:Oracle:HRDMRDV
        dbi:Oracle:dwhc01
        dbi:Oracle:dwhd01
        dbi:Oracle:dwhd01.world
        dbi:Oracle:dwhp01.world
        dbi:Oracle:dwhp02.world
        dbi:Oracle:dwht01
        dbi:Oracle:dwht01.world
        dbi:Oracle:dwht02
        dbi:Oracle:dwht02.world
        dbi:Oracle:dwhx01
        dbi:Oracle:dwhx01.world


Connecting
 to '' (from command line, else uses ORACLE_SID or TWO_TASK - recommended)
 as 'scott/tiger' (via ORACLE_USERID env var or default - recommend
name/passwd@dbname)
(ORACLE_SID='dwhx01', TWO_TASK='')

Testing internal row fetch overhead.
50000 fetches:  0 wallclock secs ( 0.27 usr +  0.00 sys =  0.27 CPU)
50000 per clock second, 187499 per cpu second

Fields:    5
Names:     'NUM_T'      'DATE_T'        'CHAR_T'        'ROWID_T'
'NULL_T'
Lengths:   134  76      31      21      1
OraTypes:  2    12      1       104     1
SQLTypes:  8    9       12      -9104   12
Scale:     0    0       0       0       0
Precision: 126  75      30      20      0
Nullable:  1    1       1       1       1
Est row width:    49
Data rows:
    fetch: '7.2', '08-AUG-01', 'SCOTT', 'AAAACsAABAAAATNAAA', undef

csr reassigned (forces destruction)...
Fetch list of tables:
Fetched: DUAL
Fetched: SYSTEM_PRIVILEGE_MAP
Fetched: TABLE_PRIVILEGE_MAP
Fetched: STMT_AUDIT_OPTION_MAP
Test ora_do with harmless non-select statement (set transaction read only)
Expect an 'ORA-01453' error message:
ora_do: 1453: ORA-01453: SET TRANSACTION must be first statement of
transaction (DBD ERROR: OCIStmtExecute)
csr out of scope...
ora_logoff...
lda out of scope...

Testing repetitive connect/open/close/disconnect:
Expect sequence of digits, no other messages:
1 2 3 4 5 

Test interaction of explicit close/logoff and implicit DESTROYs
Expect just 'done.', no other messages:
done.

Testing row cache (5).
Test completed in 0 seconds.

Test complete (1 seconds).
If the tests above have produced the 'expected' output then they have
passed.



-----Original Message-----
From: Tim Bunce [mailto:[email protected]]
Sent: Monday, August 06, 2001 9:15 AM
To: Fox, Michael
Cc: '[email protected]'
Subject: Re: Failed build attempt for Oracle-OCI-0.04


On Fri, Jul 27, 2001 at 11:47:20AM +1000, Fox, Michael wrote:
> Platform: Compaq Alpha Tru64 Unix V 5.1
> Perl: v5.6.0
> Oracle: 8.1.7
> DBI: 1.19
> DBD-Oracle: 1.07
> 
> We are just upgrading from Unix 4 to 5.1, and Oracle 8.0.4 to 8.1.7; built
a
> new perl, DBI and DBD-Oracle without any problems; then tried Oracle-OCI
for
> the first time. To get the build to go, I:
> 
> 1. added $orahome/rdbms/public to @ora_dirs in boot, as some of the header
> files are there (Oracle 8.1.7 thing?):
> nzerror.h  nzt.h      ociextp.h  tnsapi.h
> 
> 2. added to extra_typemap as described in readme.build
> OCIType *		T_PTROBJ
> OCITrans *		T_PTROBJ

Thanks.

> Can't load 'blib/arch/auto/Oracle/OCI/OCI.so' for module Oracle::OCI:
> dlopen: blib/arch/auto/Oracle/OCI/OCI.so:
> symbol "upioep" unresolved at
> /usr/users/foxm/lib/perl5/5.6.0/alpha-dec_osf/DynaLoader.pm line 200
> cc: Warning: OCI.xs, line 158: The function "constant_OCI_OR" returns a
value, but no value is given in this return statement. (noreturnval)
> 	    return OCI_ORACLE;
> ------------^
> cc: Warning: OCI.xs, line 6791: The function "constant_OCI_F" returns a
value, but no value is given in this return statement. (noreturnval)
> 	    return OCI_FLAGS;
> ------------^

Umm. Those are empty #define's used to prevent header files being
included more than once. I guess I'll just explicitly exclude them.

> cc: Warning: OCI.c, line 8782: In the initializer for ocbfp, the
referenced type of the pointer value "ora_getptr_generic(...)" is "void",
which is not compatible with "function (pointer to void, pointer to struct
OCIDefine, unsigned int, pointer to pointer to void, pointer to pointer to
unsigned int, pointer to unsigned char, pointer to pointer to void, pointer
to pointer to unsigned short) returning int". (ptrmismatch)
> 	OCICallbackDefine	ocbfp = ora_getptr_OCICallbackDefine(ST(3),
"ocbfp", "OCICallbackDefine", "OCIDefineDynamic");

Umm, back in the bad old days void* pointer hacks never caused warnings.

> cc: Warning: utility.c, line 132: In this statement, the referenced type
of the pointer value "(void ...)((imp_sth_t ...)imp_xxh)->get_oci_handle" is
"void", which is not compatible with "function (pointer to struct
imp_xxh_st, int, int) returning pointer to void". (ptrmismatch)
> 	hook = (void*)((imp_sth_t*)imp_xxh)->get_oci_handle;
> --------^

Groan. Even an explicit (void*) doesn't silence it. Oh well, I guess
I'll have to do it properly :)

> t/01base............Can't load 'blib/arch/auto/Oracle/OCI/OCI.so' for
module Oracle::OCI: dlopen: blib/arch/auto/Oracle/OCI/OCI.so: symbol
"upioep" unresolved at
/usr/users/foxm/lib/perl5/5.6.0/alpha-dec_osf/DynaLoader.pm line 200.

I'd be grateful if you could follow the procedure in the DBD::Oracle
README file for undefined symbol errors (basically run DBD::Oracle's
Makefile.PL -s "upioep").

And then try to work out why whichever library it refers to wasn't
included in the build of DBD::Oracle.

Thanks!

Tim.
CAUTION

This e-mail and any files transmitted with it are privileged and confidential information intended for the use of the addressee. The confidentiality and/or privilege in this e-mail is not waived, lost or destroyed if it has been transmitted to you in error. If you have received this e-mail in error you must (a) not disseminate, copy or take any action in reliance on it; (b) please notify Australia Post immediately by return e-mail to the sender; and (c) please delete the original e-mail.