problems compiling DBD-Oracle-1.15

From: Mark Juszczec (juszczec_at_hotmail.com)
Date: 06/24/04


Date: 24 Jun 2004 09:58:56 -0700

Hi folks

One of our Unix admins is having problems compiling DBD-Oracle-1.15
for me. He's asking me what is wrong and I have no clue, hence this
post.

The particulars:

> uname -a
SunOS workhost 5.9 Generic_112233-11 sun4u sparc SUNW,Sun-Fire-880

Oracle v9.2.0.5.0

using DBI-1.42

> ./perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 1)
configuration:
  Platform:
    osname=solaris, osvers=2.9, archname=sun4-solaris-64
    uname='sunos build9 5.9 generic_112233-08 sun4u sparc sunw,ultra-4
'
    config_args='-Dprefix=/opt/perl/5.8.1 -Dcc=gcc -Accflags=-mcpu=v9
-m64 -Aldflags=-mcpu=v9 -m64 -Alddlflags=-mcpu=v9 -m64 -Duse64bitall'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-mcpu=v9 -m64 -Wa,-xarch=v9 -mcpu=v9 -m64
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-mcpu=v9 -m64 -Wa,-xarch=v9 -mcpu=v9 -m64
-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3.2', gccosandvers='solaris2.9'
    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, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -mcpu=v9 -m64 -L/usr/lib/sparcv9
-L/usr/local/lib '
    libpth=/usr/lib/sparcv9 /usr/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false,
libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -z
ignore -z lazyload -z combreloc'
    cccdlflags='-fPIC', lddlflags=' -mcpu=v9 -m64 -G -z ignore -z
lazyload -z combreloc -L/usr/lib/sparcv9 -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
  Built under solaris
  Compiled at Oct 27 2003 16:50:15
  @INC:
    /opt/perl/5.8.1/lib/5.8.1/sun4-solaris-64
    /opt/perl/5.8.1/lib/5.8.1
    /opt/perl/5.8.1/lib/site_perl/5.8.1/sun4-solaris-64
    /opt/perl/5.8.1/lib/site_perl/5.8.1
    /opt/perl/5.8.1/lib/site_perl

Now the commands, results and questions. He started with:

> perl -I/opt/perl-modules/5.8.1/DBI-1.42 Makefile.PL \
         INSTALLSITELIB=/opt/perl-modules/5.8.1/DBD-Oracle-1.15/ \
         INSTALLMAN3DIR=/opt/perl-modules/5.8.1/DBD-Oracle-1.15/ \
         PREFIX=/opt/perl-modules/5.8.1/DBD-Oracle-1.15
Using DBI 1.42 (for perl 5.008001 on sun4-solaris-64) installed in
/opt/perl-modules/5.8.1/DBI-1.42/auto/DBI

and was told:

WARNING: could not decode oracle version from
/u01/app/oracle/product/9205/orainst/inspdver, or
/u01/app/oracle/product/9205/install/unix.rgs
or from ORACLE_HOME path /u01/app/oracle/product/9205.
Oracle version based logic in Makefile.PL may produce erroneous
results.

I've been searching the net all morning and have seen this mentioned.
Can this be the cause of the following problems?

A little later, we got:

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.
Deleting ORA_NLS33 = $(ORACLE_HOME)/ocommon/nls/admin/data/
  because it is not already set in the environment
  and it can cause ORA-01019 errors.

Should I care?

Ultimately, the command completes and generates a Makefile which make
runs without error.

However:

>make test

gives me:

t/long.......ok 145/372# failed test 146 at line 308.
# failed test 147 at line 309.
Use of uninitialized value in length at t/long.t line 311.

t/long.......NOK 146# failed test 148 at line 311.
Use of uninitialized value in substr at t/long.t line 315.
# failed test 149 at line 315.

t/long.......NOK 149# failed test 150 at line 319.

t/long.......NOK 150Use of uninitialized value in numeric eq (==) at
t/long.t line 320.
# failed test 151 at line 320.

t/long.......NOK 151# failed test 152 at line 324.

t/long.......NOK 152# failed test 153 at line 328.

t/long.......NOK 153# failed test 154 at line 308.
# failed test 155 at line 309.
Use of uninitialized value in length at t/long.t line 311.
# failed test 156 at line 311.

t/long.......NOK 154Use of uninitialized value in substr at t/long.t
line 315.
# failed test 157 at line 315.

t/long.......NOK 155# failed test 158 at line 319.
Use of uninitialized value in numeric eq (==) at t/long.t line 320.
# failed test 159 at line 320.

t/long.......NOK 156# failed test 160 at line 324.

t/long.......NOK 160# failed test 161 at line 328.

t/long.......NOK 161# failed test 162 at line 308.
# failed test 163 at line 309.
Use of uninitialized value in length at t/long.t line 311.
# failed test 164 at line 311.

t/long.......NOK 162Use of uninitialized value in substr at t/long.t
line 315.
# failed test 165 at line 315.
# failed test 166 at line 319.

t/long.......NOK 163Use of uninitialized value in numeric eq (==) at
t/long.t line 320.
# failed test 167 at line 320.
# failed test 168 at line 324.

t/long.......ok 179/372# failed test 181 at line 348.

t/long.......NOK 181# failed test 183 at line 348.

t/long.......dubious
        Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 146-169, 181, 183, 187-372
        Failed 212/372 tests, 43.01% okay

t/ph_type....ok 11/19 Placeholder behaviour for ora_type=1 (the
default) varies with Oracle version.
 Oracle 7 didn't strip trailing spaces, Oracle 8 did, until 9.2.x
 Your system doesn't. If that seems odd, let us know.

t/reauth.....skipped
        all skipped: no reason given
t/select.....Unexpectedly had to drop old test table
'dbd_ora__drop_me'

Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/long.t 0 11 372 398 106.99% 146-169 181 183 187-372
1 test skipped.
Failed 1/9 test scripts, 88.89% okay. 212/1535 subtests failed, 86.19%
okay.
*** Error code 255
make: Fatal error: Command failed for target `test_dynamic'

Pushing bravely onward, we did:

>perl -Mblib t/long.t

which got around to giving us:

40 locator: OCILobLocatorPtr=SCALAR(0x1002e1de0)
# failed test 146 at line 308.
not ok 146
error: ORA-01403: no data found (DBD NEED_DATA: OCILobRead)
# failed test 147 at line 309.
not ok 147
40 content: undef
Use of uninitialized value in length at t/long.t line 311.
# failed test 148 at line 311.
not ok 148
Use of uninitialized value in substr at t/long.t line 315.
# failed test 149 at line 315.
not ok 149
# failed test 150 at line 319.
not ok 150
error: ORA-24812: character set conversion to or from UCS2 failed (DBD
ERROR: OCILobTrim)
Use of uninitialized value in numeric eq (==) at t/long.t line 320.
# failed test 151 at line 320.
not ok 151
# failed test 152 at line 324.
not ok 152
error: ORA-24812: character set conversion to or from UCS2 failed (DBD
ERROR: OCILobTrim)
# failed test 153 at line 328.
not ok 153
error: ORA-24812: character set conversion to or from UCS2 failed (DBD
ERROR: OCILobTrim)
41 locator: OCILobLocatorPtr=SCALAR(0x100251650)
# failed test 154 at line 308.
not ok 154
error: ORA-24812: character set conversion to or from UCS2 failed (DBD
NEED_DATA: OCILobRead)
# failed test 155 at line 309.
not ok 155
41 content: undef
Use of uninitialized value in length at t/long.t line 311.
# failed test 156 at line 311.
not ok 156
Use of uninitialized value in substr at t/long.t line 315.
# failed test 157 at line 315.
not ok 157
# failed test 158 at line 319.
not ok 158
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD ERROR: OCILobTrim)
Use of uninitialized value in numeric eq (==) at t/long.t line 320.
# failed test 159 at line 320.
not ok 159
# failed test 160 at line 324.
not ok 160
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD ERROR: OCILobTrim)
# failed test 161 at line 328.
not ok 161
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD ERROR: OCILobTrim)
42 locator: OCILobLocatorPtr=SCALAR(0x1002e1de0)
# failed test 162 at line 308.
not ok 162
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD NEED_DATA: OCILobRead)
# failed test 163 at line 309.
not ok 163
42 content: undef
Use of uninitialized value in length at t/long.t line 311.
# failed test 164 at line 311.
not ok 164
Use of uninitialized value in substr at t/long.t line 315.
# failed test 165 at line 315.
not ok 165
# failed test 166 at line 319.
not ok 166
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD ERROR: OCILobTrim)
Use of uninitialized value in numeric eq (==) at t/long.t line 320.
# failed test 167 at line 320.
not ok 167
# failed test 168 at line 324.
not ok 168
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD ERROR: OCILobTrim)
# failed test 169 at line 328.
not ok 169
error: ORA-03130: the buffer for the next piece to be fetched is
required (DBD ERROR: OCILobTrim)
43 locator: undef

# failed test 181 at line 348.
not ok 181

# failed test 183 at line 348.

ok 186
Segmentation Fault

not ok 183

Where is the best place to being trying to figure out why this didn't
work?

Thanks

Mark