Segmentation fault with module DBD::Oracle 1.19 on SuSE Linux EnterpriseServer 10 (IBM Power 64 bit)

Segmentation fault with module DBD::Oracle 1.19 on SuSE Linux EnterpriseServer 10 (IBM Power 64 bit)

am 09.11.2007 15:12:03 von r.zini

Hello everybody.

I'm trying to get the DBD::Oracle 1.19 Perl module working fine under SuSE
Linux Enterprise Server 10 (IBM Power 64bit).

The version of SLES is 10.0 (no SP1 applied yet) and the version of Perl I'm
using is:

=== cut here == 8< ==

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.16, archname=ppc-linux-thread-multi-64int
uname='linux pear 2.6.16 #1 smp mon may 22 14:37:02 utc 2006 ppc ppc ppc
gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl
-Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-O2
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe -Duse64bitint'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement'
ccversion='', gccversion='4.1.0 (SUSE Linux)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /lib64 /usr/lib64 /usr/local/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.4'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int /CORE'
cccdlflags='-fPIC', lddlflags='-shared'


Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_REENTRANT_API
Built under linux
Compiled at Jun 16 2006 12:27:43
@INC:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int
/usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl

=== cut here == 8< ==

GCC is version 4.1.0 (SUSE Linux).

I installed version 10.2.0.2 of the InstanClient Oracle Client for Linux
(Power) both 32bit and 64bit.

When trying to compile with the 32bit module, I have a "Segmentation Fault"
when using a Perl test script (during the DBI->connect phase) where when using
the 64bit version the linker "skips" over the Oracle provided
libclntsh.so.10.1 (it's incompatible but to me it seems fine).

Anyway, here's what I did:

####################
## 32 bit version ##
####################

.. Downloaded:

instantclient-basic-linuxppc32-10.2.0.2-20060327.zip
instantclient-sqlplus-linuxppc32-10.2.0.2-20060327.zip
instantclient-sdk-linuxppc32-10.2.0.2-20060327.zip

.. Checked their checksums against the ones reported on Oracle's website (and
they do match)

.. Used the sqlplus to connect to an existing Oracle database (and it
works fine). Eg:

=== cut here == 8< ==

ORACLE_HOME=/opt/product/instantclient_10_2
LD_LIBRARY_PATH=/opt/product/instantclient_10_2

export ORACLE_HOME LD_LIBRARY_PATH

cd $LD_LIBRARY_PATH
../sqlplus bdn_test@'(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL =
TCP)(HOST = 192.168.230.102)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME =
BDNDR)))'

=== cut here == 8< ==

I'm prompted with the bdn_test password which, once given, get me to the prompt.

.. Expanded the above files under /opt/product/instantclient_10_2

.. Downloaded the DBD-Oracle-1.19 package

.. The version of the DBI package is perl-DBI-1.50-13.2

.. Extracted the DBD-Oracle-1.19 package

.. export ORACLE_HOME=/opt/product/instantclient_10_2
.. export LD_LIBRARY_PATH=/opt/product/instantclient_10_2

.. perl Makefile.PL reports the following:

=== cut here == 8< ==

Multiple copies of Driver.xst found in:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
Makefile.PL line 35
Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int) installed
in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/

Configuring DBD::Oracle for perl 5.008008 on linux (ppc-linux-thread-multi-64int)

Remember to actually *READ* the README file! Especially if you have any problems.

Using Oracle in /opt/product/instantclient_10_2
DEFINE _SQLPLUS_RELEASE = "1002000200" (CHAR)
Oracle version 10.2.0.2 (10.2)
Looks like an Instant Client installation, okay
Your LD_LIBRARY_PATH env var is set to '/opt/product/instantclient_10_2'
Oracle sysliblist:
Found header files in /opt/product/instantclient_10_2/sdk/include.

Checking for functioning wait.ph
Constant subroutine __USE_POSIX undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 8.
Constant subroutine __USE_POSIX2 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 9.
Constant subroutine __USE_POSIX199309 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 10.
Constant subroutine __USE_POSIX199506 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 11.
Constant subroutine __USE_XOPEN undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 12.
Constant subroutine __USE_XOPEN_EXTENDED undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 13.
Constant subroutine __USE_UNIX98 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 14.
Constant subroutine __USE_LARGEFILE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 16.
Constant subroutine __USE_LARGEFILE64 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 17.
Constant subroutine __USE_FILE_OFFSET64 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 18.
Constant subroutine __USE_BSD undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 19.
Constant subroutine __USE_SVID undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 20.
Constant subroutine __USE_MISC undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 21.
Constant subroutine __USE_GNU undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 23.
Constant subroutine __USE_REENTRANT undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 24.
Constant subroutine _POSIX_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 49.
Constant subroutine _POSIX_C_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 51.
Constant subroutine _XOPEN_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 53.
Constant subroutine _XOPEN_SOURCE_EXTENDED undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 55.
Constant subroutine _LARGEFILE64_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 57.
Constant subroutine _LARGEFILE_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line
104.
Constant subroutine __GNU_LIBRARY__ undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line
156.


System: perl5.008008 linux pear 2.6.16 #1 smp mon may 22 14:37:02 utc 2006 ppc
ppc ppc gnulinux
Compiler: cc -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
Linker: /usr/bin/ld
Sysliblist:
Linking with -lclntsh.

Checking if your kit is complete...
Looks good
LD_RUN_PATH=/opt/product/instantclient_10_2
Using DBD::Oracle 1.19.
Using DBD::Oracle 1.19.
Multiple copies of Driver.xst found in:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
Makefile.PL line 1635
Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int) installed
in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
Writing Makefile for DBD::Oracle

*** If you have problems...
read all the log printed above, and the README and README.help.txt files.
(Of course, you have read README by now anyway, haven't you?)

=== cut here == 8< ==

As you can see, there are some undefined but the Makefile gets completed.

.. make

=== cut here == 8< ==

cp Oracle.pm blib/lib/DBD/Oracle.pm
cp mkta.pl blib/lib/DBD/mkta.pl
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g"
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI//Driver.xst
> Oracle.xsi
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc
&& mv Oracle.xsc Oracle.c
cc -c -I/opt/product/instantclient_10_2/sdk/include
-I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
-Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
"-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall -Wno-comment
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" Oracle.c
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
from Oracle.h:13,
from Oracle.xs:1:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
warning: "PERL_UNUSED_DECL" redefined
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
from Oracle.h:13,
from Oracle.xs:1:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1: warning:
this is the location of the previous definition
cc -c -I/opt/product/instantclient_10_2/sdk/include
-I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
-Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
"-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall -Wno-comment
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" dbdimp.c
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
from Oracle.h:13,
from dbdimp.c:20:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
warning: "PERL_UNUSED_DECL" redefined
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
from Oracle.h:13,
from dbdimp.c:20:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1: warning:
this is the location of the previous definition
dbdimp.c: In function ‘dbd_discon_all’:
dbdimp.c:190: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_db_login6’:
dbdimp.c:385: warning: cast to pointer from integer of different size
dbdimp.c:399: warning: cast to pointer from integer of different size
dbdimp.c:409: warning: cast to pointer from integer of different size
dbdimp.c:413: warning: cast to pointer from integer of different size
dbdimp.c:700: warning: value computed is not used
dbdimp.c:312: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_db_disconnect’:
dbdimp.c:760: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_db_destroy’:
dbdimp.c:797: warning: unused variable ‘my_perl’
dbdimp.c: In function ‘dbd_rebind_ph_char’:
dbdimp.c:1110: warning: value computed is not used
dbdimp.c:1169: warning: cast from pointer to integer of different size
dbdimp.c: In function ‘pp_exec_rset’:
dbdimp.c:1254: warning: unused variable ‘my_perl’
dbdimp.c:1269: warning: unused variable ‘my_perl’
dbdimp.c:1276: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_execute’:
dbdimp.c:1655: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_execute_array’:
dbdimp.c:1985: warning: value computed is not used
dbdimp.c:1859: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_finish’:
dbdimp.c:2144: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_destroy’:
dbdimp.c:2237: warning: unused variable ‘my_perl’
cc -c -I/opt/product/instantclient_10_2/sdk/include
-I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
-Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
"-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall -Wno-comment
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" oci8.c
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
from Oracle.h:13,
from oci8.c:11:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
warning: "PERL_UNUSED_DECL" redefined
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
from Oracle.h:13,
from oci8.c:11:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1: warning:
this is the location of the previous definition
oci8.c: In function ‘fetch_cleanup_rset’:
oci8.c:608: warning: unused variable ‘Perl___notused’
oci8.c: In function ‘fetch_func_rset’:
oci8.c:644: warning: unused variable ‘my_perl’
oci8.c:652: warning: value computed is not used
oci8.c:655: warning: unused variable ‘my_perl’
oci8.c:632: warning: unused variable ‘Perl___notused’
oci8.c: In function ‘dbd_rebind_ph_lob’:
oci8.c:748: warning: value computed is not used
oci8.c:779: warning: value computed is not used
oci8.c: In function ‘ora_st_fetch’:
oci8.c:1673: warning: unused variable ‘Perl___notused’
oci8.c:1680: warning: unused variable ‘Perl___notused’
oci8.c: In function ‘post_execute_lobs’:
oci8.c:2246: warning: value computed is not used
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/product/instantclient_10_2" cc -shared Oracle.o dbdimp.o
oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/opt/product/instantclient_10_2 -lclntsh \

chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
/usr/bin/perl "-Iblib/arch" "-Iblib/lib" ora_explain.PL ora_explain
Extracted ora_explain from ora_explain.PL with variable substitutions.
cp ora_explain blib/script/ora_explain
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ora_explain
Manifying blib/man1/ora_explain.1
Manifying blib/man3/DBD::Oracle.3pm
Manifying blib/man3/DBD::Oraperl.3pm

=== cut here == 8< ==

Lots of warnings but the files get compiled

.. make install

=== cut here == 8< ==

Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/dbdimp.h
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/mk.pm
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/Oracle.h
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/Oracle.bs
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/Oracle.so
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/ocitrace.h
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ Oraperl.pm
Installing /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ oraperl.ph
Installing /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ DBD/mkta.pl
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ DBD/Oracle.pm
Installing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ DBD/Oracle/GetInfo.pm
Installing /usr/share/man/man1/ora_explain.1
Installing /usr/share/man/man3/DBD::Oraperl.3pm
Installing /usr/share/man/man3/DBD::Oracle.3pm
Installing /usr/bin/ora_explain
Writing
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/.packlist
Appending installation info to
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/perllocal. po

=== cut here == 8< ==

.. Tried to execute that simple script:

=== cut here == 8< ==

#!/usr/bin/perl
use DBI;
use DBD::Oracle qw(:ora_types);
use CGI qw/:standard/;

$dbi_stringa_connessione = 'dbi:Oracle:(DESCRIPTION = (ADDRESS_LIST =(ADDRESS
(PROTOCOL = TCP)(HOST = 192.168.230.102)(PORT =
1521)))(CONNECT_DATA=(SERVICE_NAME = BDNDR)))';

$dbi_username = 'bdn_test'; $dbi_password = 'bdn_test';

print "Before connect\n";
$dbh = DBI->connect($dbi_stringa_connessione,$dbi_username,$dbi_pas sword);
print "After connect\n";

=== cut here == 8< ==

.. The script bombs out with a "Segmentation fault"

I tried by removing the DBD::Oracle module with a manual unlinking of the
required files and compiling again both with the "-p" and "-nob" option but
things did not change.

I also tried by using version 10.2.0.1 of required Oracle packages but
unsuccessfully.

I also specified the "-m32" option of GCC as to force 32 binaries but again no
dice.

####################
## 64 bit version ##
####################

.. Downloaded the required file from Oracle's website:

instantclient-basic-linuxppc-10.2.0.2-20060327.zip
instantclient-sqlplus-linuxppc-10.2.0.2-20060327.zip
instantclient-sdk-linuxppc-10.2.0.2-20060327.zip

.. Checked the "sqlplus" package with the very same script reported above
(and the connection does work)

.. export LD_LIBRARY_PATH=/opt/product/oraclient64/instantclient_10_2
.. export ORACLE_HOME=/opt/product/oraclient64/instantclient_10_2

.. Remove the DBD::Oracle package

.. make realclean

.. perl Makefile.PL

=== cut here == 8< ==

Multiple copies of Driver.xst found in:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
Makefile.PL line 35
Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int) installed
in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/

Configuring DBD::Oracle for perl 5.008008 on linux (ppc-linux-thread-multi-64int)

Remember to actually *READ* the README file! Especially if you have any problems.

Using Oracle in /opt/product/oraclient64/instantclient_10_2
DEFINE _SQLPLUS_RELEASE = "1002000200" (CHAR)
Oracle version 10.2.0.2 (10.2)
Looks like an Instant Client installation, okay
Your LD_LIBRARY_PATH env var is set to
'/opt/product/oraclient64/instantclient_10_2'
Oracle sysliblist:
Found header files in /opt/product/oraclient64/instantclient_10_2/sdk/include.

Checking for functioning wait.ph
Constant subroutine __USE_POSIX undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 8.
Constant subroutine __USE_POSIX2 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 9.
Constant subroutine __USE_POSIX199309 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 10.
Constant subroutine __USE_POSIX199506 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 11.
Constant subroutine __USE_XOPEN undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 12.
Constant subroutine __USE_XOPEN_EXTENDED undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 13.
Constant subroutine __USE_UNIX98 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 14.
Constant subroutine __USE_LARGEFILE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 16.
Constant subroutine __USE_LARGEFILE64 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 17.
Constant subroutine __USE_FILE_OFFSET64 undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 18.
Constant subroutine __USE_BSD undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 19.
Constant subroutine __USE_SVID undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 20.
Constant subroutine __USE_MISC undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 21.
Constant subroutine __USE_GNU undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 23.
Constant subroutine __USE_REENTRANT undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 24.
Constant subroutine _POSIX_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 49.
Constant subroutine _POSIX_C_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 51.
Constant subroutine _XOPEN_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 53.
Constant subroutine _XOPEN_SOURCE_EXTENDED undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 55.
Constant subroutine _LARGEFILE64_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line 57.
Constant subroutine _LARGEFILE_SOURCE undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line
104.
Constant subroutine __GNU_LIBRARY__ undefined at
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph line
156.


System: perl5.008008 linux pear 2.6.16 #1 smp mon may 22 14:37:02 utc 2006 ppc
ppc ppc gnulinux
Compiler: cc -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
Linker: /usr/bin/ld
Sysliblist:
Linking with -lclntsh.

LD_RUN_PATH=/opt/product/oraclient64/instantclient_10_2
Using DBD::Oracle 1.19.
Using DBD::Oracle 1.19.
Multiple copies of Driver.xst found in:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
Makefile.PL line 1635
Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int) installed
in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
Writing Makefile for DBD::Oracle

=== cut here == 8< ==

.. make

=== cut here == 8< ==

Skip blib/lib/DBD/Oracle.pm (unchanged)
Skip blib/lib/DBD/mkta.pl (unchanged)
Skip blib/lib/oraperl.ph (unchanged)
Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
Skip blib/lib/Oraperl.pm (unchanged)
Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
cc -c -I/opt/product/oraclient64/instantclient_10_2/sdk/include
-I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
-Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
"-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall -Wno-comment
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" Oracle.c
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
from Oracle.h:13,
from Oracle.xs:1:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
warning: "PERL_UNUSED_DECL" redefined
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
from Oracle.h:13,
from Oracle.xs:1:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1: warning:
this is the location of the previous definition
cc -c -I/opt/product/oraclient64/instantclient_10_2/sdk/include
-I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
-Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
"-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall -Wno-comment
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" dbdimp.c
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
from Oracle.h:13,
from dbdimp.c:20:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
warning: "PERL_UNUSED_DECL" redefined
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
from Oracle.h:13,
from dbdimp.c:20:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1: warning:
this is the location of the previous definition
dbdimp.c: In function ‘dbd_discon_all’:
dbdimp.c:190: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_db_login6’:
dbdimp.c:385: warning: cast to pointer from integer of different size
dbdimp.c:399: warning: cast to pointer from integer of different size
dbdimp.c:409: warning: cast to pointer from integer of different size
dbdimp.c:413: warning: cast to pointer from integer of different size
dbdimp.c:700: warning: value computed is not used
dbdimp.c:312: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_db_disconnect’:
dbdimp.c:760: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_db_destroy’:
dbdimp.c:797: warning: unused variable ‘my_perl’
dbdimp.c: In function ‘dbd_rebind_ph_char’:
dbdimp.c:1110: warning: value computed is not used
dbdimp.c:1169: warning: cast from pointer to integer of different size
dbdimp.c: In function ‘pp_exec_rset’:
dbdimp.c:1254: warning: unused variable ‘my_perl’
dbdimp.c:1269: warning: unused variable ‘my_perl’
dbdimp.c:1276: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_execute’:
dbdimp.c:1655: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_execute_array’:
dbdimp.c:1985: warning: value computed is not used
dbdimp.c:1859: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_finish’:
dbdimp.c:2144: warning: unused variable ‘Perl___notused’
dbdimp.c: In function ‘ora_st_destroy’:
dbdimp.c:2237: warning: unused variable ‘my_perl’
cc -c -I/opt/product/oraclient64/instantclient_10_2/sdk/include
-I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
-Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
"-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall -Wno-comment
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" oci8.c
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
from Oracle.h:13,
from oci8.c:11:
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
warning: "PERL_UNUSED_DECL" redefined
In file included from
/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
from Oracle.h:13,
from oci8.c:11:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1: warning:
this is the location of the previous definition
oci8.c: In function ‘fetch_cleanup_rset’:
oci8.c:608: warning: unused variable ‘Perl___notused’
oci8.c: In function ‘fetch_func_rset’:
oci8.c:644: warning: unused variable ‘my_perl’
oci8.c:652: warning: value computed is not used
oci8.c:655: warning: unused variable ‘my_perl’
oci8.c:632: warning: unused variable ‘Perl___notused’
oci8.c: In function ‘dbd_rebind_ph_lob’:
oci8.c:748: warning: value computed is not used
oci8.c:779: warning: value computed is not used
oci8.c: In function ‘ora_st_fetch’:
oci8.c:1673: warning: unused variable ‘Perl___notused’
oci8.c:1680: warning: unused variable ‘Perl___notused’
oci8.c: In function ‘post_execute_lobs’:
oci8.c:2246: warning: value computed is not used
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/product/oraclient64/instantclient_10_2" cc -shared Oracle.o
dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/opt/product/oraclient64/instantclient_10_2 -lclntsh \

/usr/bin/ld: skipping incompatible
/opt/product/oraclient64/instantclient_10_2/libclntsh.so when searching for
-lclntsh
/usr/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1

=== cut here == 8< ==

As you might notice, the
/opt/product/oraclient64/instantclient_10_2/libclntsh.so has been skipped by
"ld" since it's not compatible. Here's the output from the "file" command when
executed against that file:

ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped

I also tried by compiling a "static" version of the library but unsuccessfully.

I'm not a great Oracle/Perl expert but with an Intel 32bit system the above
module does run fine.

Thanks for your help!

Best,
Roberto

--
------------------------------------------------------------ ---------
Roberto Zini - Tech. Support Manager - email: r.zini@strhold.it
Strhold evolution division - Via Cipriani 2 - 42100 Reggio Emilia(IT)
Tel:+39 0522 380411 - Fax:+39 0522 307846 - Cell: 335 7700259
------------------------------------------------------------ ---------

Re: Segmentation fault with module DBD::Oracle 1.19 on SuSE Linux Enterprise Server 10 (IBM Powe

am 09.11.2007 15:48:48 von scoles

I think you have to install the perl-devel package

> Hello everybody.
>
> I'm trying to get the DBD::Oracle 1.19 Perl module working fine under SuSE
> Linux Enterprise Server 10 (IBM Power 64bit).
>
> The version of SLES is 10.0 (no SP1 applied yet) and the version of Perl
> I'm
> using is:
>
> === cut here == 8< ==
>
> Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
> Platform:
> osname=linux, osvers=2.6.16, archname=ppc-linux-thread-multi-64int
> uname='linux pear 2.6.16 #1 smp mon may 22 14:37:02 utc 2006 ppc ppc
> ppc
> gnulinux '
> config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr
> -Dinstallusrbinperl
> -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true
> -Doptimize=-O2
> -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe -Duse64bitint'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=define use5005threads=undef useithreads=define
> usemultiplicity=define
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=define use64bitall=undef uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
> -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall
> -pipe',
> cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
> ccversion='', gccversion='4.1.0 (SUSE Linux)', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
> ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
> Off_t='off_t',
> lseeksize=8
> alignbytes=8, prototype=define
> Linker and Libraries:
> ld='cc', ldflags =''
> libpth=/lib /usr/lib /lib64 /usr/lib64 /usr/local/lib
> libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
> perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
> libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so
> gnulibc_version='2.4'
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
> -Wl,-rpath,/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int /CORE'
> cccdlflags='-fPIC', lddlflags='-shared'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: DEBUGGING MULTIPLICITY PERL_IMPLICIT_CONTEXT
> PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_64_BIT_INT
> USE_ITHREADS USE_LARGE_FILES USE_PERLIO
> USE_REENTRANT_API
> Built under linux
> Compiled at Jun 16 2006 12:27:43
> @INC:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int
> /usr/lib/perl5/5.8.8
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int
> /usr/lib/perl5/site_perl/5.8.8
> /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t
> /usr/lib/perl5/vendor_perl/5.8.8
> /usr/lib/perl5/vendor_perl
>
> === cut here == 8< ==
>
> GCC is version 4.1.0 (SUSE Linux).
>
> I installed version 10.2.0.2 of the InstanClient Oracle Client for Linux
> (Power) both 32bit and 64bit.
>
> When trying to compile with the 32bit module, I have a "Segmentation
> Fault"
> when using a Perl test script (during the DBI->connect phase) where when
> using
> the 64bit version the linker "skips" over the Oracle provided
> libclntsh.so.10.1 (it's incompatible but to me it seems fine).
>
> Anyway, here's what I did:
>
> ####################
> ## 32 bit version ##
> ####################
>
> . Downloaded:
>
> instantclient-basic-linuxppc32-10.2.0.2-20060327.zip
> instantclient-sqlplus-linuxppc32-10.2.0.2-20060327.zip
> instantclient-sdk-linuxppc32-10.2.0.2-20060327.zip
>
> . Checked their checksums against the ones reported on Oracle's website
> (and
> they do match)
>
> . Used the sqlplus to connect to an existing Oracle database (and it
> works fine). Eg:
>
> === cut here == 8< ==
>
> ORACLE_HOME=/opt/product/instantclient_10_2
> LD_LIBRARY_PATH=/opt/product/instantclient_10_2
>
> export ORACLE_HOME LD_LIBRARY_PATH
>
> cd $LD_LIBRARY_PATH
> ./sqlplus bdn_test@'(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL =
> TCP)(HOST = 192.168.230.102)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME =
> BDNDR)))'
>
> === cut here == 8< ==
>
> I'm prompted with the bdn_test password which, once given, get me to the
> prompt.
>
> . Expanded the above files under /opt/product/instantclient_10_2
>
> . Downloaded the DBD-Oracle-1.19 package
>
> . The version of the DBI package is perl-DBI-1.50-13.2
>
> . Extracted the DBD-Oracle-1.19 package
>
> . export ORACLE_HOME=/opt/product/instantclient_10_2
> . export LD_LIBRARY_PATH=/opt/product/instantclient_10_2
>
> . perl Makefile.PL reports the following:
>
> === cut here == 8< ==
>
> Multiple copies of Driver.xst found in:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
> Makefile.PL line 35
> Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int)
> installed
> in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
>
> Configuring DBD::Oracle for perl 5.008008 on linux
> (ppc-linux-thread-multi-64int)
>
> Remember to actually *READ* the README file! Especially if you have any
> problems.
>
> Using Oracle in /opt/product/instantclient_10_2
> DEFINE _SQLPLUS_RELEASE = "1002000200" (CHAR)
> Oracle version 10.2.0.2 (10.2)
> Looks like an Instant Client installation, okay
> Your LD_LIBRARY_PATH env var is set to '/opt/product/instantclient_10_2'
> Oracle sysliblist:
> Found header files in /opt/product/instantclient_10_2/sdk/include.
>
> Checking for functioning wait.ph
> Constant subroutine __USE_POSIX undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 8.
> Constant subroutine __USE_POSIX2 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 9.
> Constant subroutine __USE_POSIX199309 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 10.
> Constant subroutine __USE_POSIX199506 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 11.
> Constant subroutine __USE_XOPEN undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 12.
> Constant subroutine __USE_XOPEN_EXTENDED undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 13.
> Constant subroutine __USE_UNIX98 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 14.
> Constant subroutine __USE_LARGEFILE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 16.
> Constant subroutine __USE_LARGEFILE64 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 17.
> Constant subroutine __USE_FILE_OFFSET64 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 18.
> Constant subroutine __USE_BSD undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 19.
> Constant subroutine __USE_SVID undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 20.
> Constant subroutine __USE_MISC undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 21.
> Constant subroutine __USE_GNU undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 23.
> Constant subroutine __USE_REENTRANT undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 24.
> Constant subroutine _POSIX_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 49.
> Constant subroutine _POSIX_C_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 51.
> Constant subroutine _XOPEN_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 53.
> Constant subroutine _XOPEN_SOURCE_EXTENDED undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 55.
> Constant subroutine _LARGEFILE64_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 57.
> Constant subroutine _LARGEFILE_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line
> 104.
> Constant subroutine __GNU_LIBRARY__ undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line
> 156.
>
>
> System: perl5.008008 linux pear 2.6.16 #1 smp mon may 22 14:37:02 utc 2006
> ppc
> ppc ppc gnulinux
> Compiler: cc -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall
> -pipe
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64
> Linker: /usr/bin/ld
> Sysliblist:
> Linking with -lclntsh.
>
> Checking if your kit is complete...
> Looks good
> LD_RUN_PATH=/opt/product/instantclient_10_2
> Using DBD::Oracle 1.19.
> Using DBD::Oracle 1.19.
> Multiple copies of Driver.xst found in:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
> Makefile.PL line 1635
> Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int)
> installed
> in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
> Writing Makefile for DBD::Oracle
>
> *** If you have problems...
> read all the log printed above, and the README and README.help.txt
> files.
> (Of course, you have read README by now anyway, haven't you?)
>
> === cut here == 8< ==
>
> As you can see, there are some undefined but the Makefile gets completed.
>
> . make
>
> === cut here == 8< ==
>
> cp Oracle.pm blib/lib/DBD/Oracle.pm
> cp mkta.pl blib/lib/DBD/mkta.pl
> cp oraperl.ph blib/lib/oraperl.ph
> cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
> cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
> cp Oraperl.pm blib/lib/Oraperl.pm
> cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
> cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
> cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
> /usr/bin/perl -p -e "s/~DRIVER~/Oracle/g"
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI//Driver.xst
>> Oracle.xsi
> /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap
> /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Oracle.xs >
> Oracle.xsc
> && mv Oracle.xsc Oracle.c
> cc -c -I/opt/product/instantclient_10_2/sdk/include
> -I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
> -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
> "-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall
> -Wno-comment
> -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" Oracle.c
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
> from Oracle.h:13,
> from Oracle.xs:1:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
> warning: "PERL_UNUSED_DECL" redefined
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from Oracle.xs:1:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1:
> warning:
> this is the location of the previous definition
> cc -c -I/opt/product/instantclient_10_2/sdk/include
> -I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
> -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
> "-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall
> -Wno-comment
> -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" dbdimp.c
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
> from Oracle.h:13,
> from dbdimp.c:20:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
> warning: "PERL_UNUSED_DECL" redefined
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from dbdimp.c:20:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1:
> warning:
> this is the location of the previous definition
> dbdimp.c: In function ‘dbd_discon_all’:
> dbdimp.c:190: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_db_login6’:
> dbdimp.c:385: warning: cast to pointer from integer of different size
> dbdimp.c:399: warning: cast to pointer from integer of different size
> dbdimp.c:409: warning: cast to pointer from integer of different size
> dbdimp.c:413: warning: cast to pointer from integer of different size
> dbdimp.c:700: warning: value computed is not used
> dbdimp.c:312: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_db_disconnect’:
> dbdimp.c:760: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_db_destroy’:
> dbdimp.c:797: warning: unused variable ‘my_perl’
> dbdimp.c: In function ‘dbd_rebind_ph_char’:
> dbdimp.c:1110: warning: value computed is not used
> dbdimp.c:1169: warning: cast from pointer to integer of different size
> dbdimp.c: In function ‘pp_exec_rset’:
> dbdimp.c:1254: warning: unused variable ‘my_perl’
> dbdimp.c:1269: warning: unused variable ‘my_perl’
> dbdimp.c:1276: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_execute’:
> dbdimp.c:1655: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_execute_array’:
> dbdimp.c:1985: warning: value computed is not used
> dbdimp.c:1859: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_finish’:
> dbdimp.c:2144: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_destroy’:
> dbdimp.c:2237: warning: unused variable ‘my_perl’
> cc -c -I/opt/product/instantclient_10_2/sdk/include
> -I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
> -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
> "-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall
> -Wno-comment
> -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" oci8.c
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
> from Oracle.h:13,
> from oci8.c:11:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
> warning: "PERL_UNUSED_DECL" redefined
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from oci8.c:11:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1:
> warning:
> this is the location of the previous definition
> oci8.c: In function ‘fetch_cleanup_rset’:
> oci8.c:608: warning: unused variable ‘Perl___notused’
> oci8.c: In function ‘fetch_func_rset’:
> oci8.c:644: warning: unused variable ‘my_perl’
> oci8.c:652: warning: value computed is not used
> oci8.c:655: warning: unused variable ‘my_perl’
> oci8.c:632: warning: unused variable ‘Perl___notused’
> oci8.c: In function ‘dbd_rebind_ph_lob’:
> oci8.c:748: warning: value computed is not used
> oci8.c:779: warning: value computed is not used
> oci8.c: In function ‘ora_st_fetch’:
> oci8.c:1673: warning: unused variable ‘Perl___notused’
> oci8.c:1680: warning: unused variable ‘Perl___notused’
> oci8.c: In function ‘post_execute_lobs’:
> oci8.c:2246: warning: value computed is not used
> Running Mkbootstrap for DBD::Oracle ()
> chmod 644 Oracle.bs
> rm -f blib/arch/auto/DBD/Oracle/Oracle.so
> LD_RUN_PATH="/opt/product/instantclient_10_2" cc -shared Oracle.o
> dbdimp.o
> oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
> -L/opt/product/instantclient_10_2 -lclntsh \
>
> chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
> cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
> chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
> /usr/bin/perl "-Iblib/arch" "-Iblib/lib" ora_explain.PL ora_explain
> Extracted ora_explain from ora_explain.PL with variable substitutions.
> cp ora_explain blib/script/ora_explain
> /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)"
> blib/script/ora_explain
> Manifying blib/man1/ora_explain.1
> Manifying blib/man3/DBD::Oracle.3pm
> Manifying blib/man3/DBD::Oraperl.3pm
>
> === cut here == 8< ==
>
> Lots of warnings but the files get compiled
>
> . make install
>
> === cut here == 8< ==
>
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/dbdimp.h
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/mk.pm
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/Oracle.h
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/Oracle.bs
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/Oracle.so
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/ocitrace.h
> Files found in blib/arch: installing files in blib/lib into architecture
> dependent library tree
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ Oraperl.pm
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ oraperl.ph
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ DBD/mkta.pl
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ DBD/Oracle.pm
> Installing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ DBD/Oracle/GetInfo.pm
> Installing /usr/share/man/man1/ora_explain.1
> Installing /usr/share/man/man3/DBD::Oraperl.3pm
> Installing /usr/share/man/man3/DBD::Oracle.3pm
> Installing /usr/bin/ora_explain
> Writing
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBD/Oracle/.packlist
> Appending installation info to
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/perllocal. po
>
> === cut here == 8< ==
>
> . Tried to execute that simple script:
>
> === cut here == 8< ==
>
> #!/usr/bin/perl
> use DBI;
> use DBD::Oracle qw(:ora_types);
> use CGI qw/:standard/;
>
> $dbi_stringa_connessione = 'dbi:Oracle:(DESCRIPTION = (ADDRESS_LIST
> =(ADDRESS
> (PROTOCOL = TCP)(HOST = 192.168.230.102)(PORT =
> 1521)))(CONNECT_DATA=(SERVICE_NAME = BDNDR)))';
>
> $dbi_username = 'bdn_test'; $dbi_password = 'bdn_test';
>
> print "Before connect\n";
> $dbh = DBI->connect($dbi_stringa_connessione,$dbi_username,$dbi_pas sword);
> print "After connect\n";
>
> === cut here == 8< ==
>
> . The script bombs out with a "Segmentation fault"
>
> I tried by removing the DBD::Oracle module with a manual unlinking of the
> required files and compiling again both with the "-p" and "-nob" option
> but
> things did not change.
>
> I also tried by using version 10.2.0.1 of required Oracle packages but
> unsuccessfully.
>
> I also specified the "-m32" option of GCC as to force 32 binaries but
> again no
> dice.
>
> ####################
> ## 64 bit version ##
> ####################
>
> . Downloaded the required file from Oracle's website:
>
> instantclient-basic-linuxppc-10.2.0.2-20060327.zip
> instantclient-sqlplus-linuxppc-10.2.0.2-20060327.zip
> instantclient-sdk-linuxppc-10.2.0.2-20060327.zip
>
> . Checked the "sqlplus" package with the very same script reported above
> (and the connection does work)
>
> . export LD_LIBRARY_PATH=/opt/product/oraclient64/instantclient_10_2
> . export ORACLE_HOME=/opt/product/oraclient64/instantclient_10_2
>
> . Remove the DBD::Oracle package
>
> . make realclean
>
> . perl Makefile.PL
>
> === cut here == 8< ==
>
> Multiple copies of Driver.xst found in:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
> Makefile.PL line 35
> Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int)
> installed
> in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
>
> Configuring DBD::Oracle for perl 5.008008 on linux
> (ppc-linux-thread-multi-64int)
>
> Remember to actually *READ* the README file! Especially if you have any
> problems.
>
> Using Oracle in /opt/product/oraclient64/instantclient_10_2
> DEFINE _SQLPLUS_RELEASE = "1002000200" (CHAR)
> Oracle version 10.2.0.2 (10.2)
> Looks like an Instant Client installation, okay
> Your LD_LIBRARY_PATH env var is set to
> '/opt/product/oraclient64/instantclient_10_2'
> Oracle sysliblist:
> Found header files in
> /opt/product/oraclient64/instantclient_10_2/sdk/include.
>
> Checking for functioning wait.ph
> Constant subroutine __USE_POSIX undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 8.
> Constant subroutine __USE_POSIX2 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 9.
> Constant subroutine __USE_POSIX199309 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 10.
> Constant subroutine __USE_POSIX199506 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 11.
> Constant subroutine __USE_XOPEN undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 12.
> Constant subroutine __USE_XOPEN_EXTENDED undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 13.
> Constant subroutine __USE_UNIX98 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 14.
> Constant subroutine __USE_LARGEFILE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 16.
> Constant subroutine __USE_LARGEFILE64 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 17.
> Constant subroutine __USE_FILE_OFFSET64 undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 18.
> Constant subroutine __USE_BSD undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 19.
> Constant subroutine __USE_SVID undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 20.
> Constant subroutine __USE_MISC undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 21.
> Constant subroutine __USE_GNU undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 23.
> Constant subroutine __USE_REENTRANT undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 24.
> Constant subroutine _POSIX_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 49.
> Constant subroutine _POSIX_C_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 51.
> Constant subroutine _XOPEN_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 53.
> Constant subroutine _XOPEN_SOURCE_EXTENDED undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 55.
> Constant subroutine _LARGEFILE64_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line 57.
> Constant subroutine _LARGEFILE_SOURCE undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line
> 104.
> Constant subroutine __GNU_LIBRARY__ undefined at
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/features.ph
> line
> 156.
>
>
> System: perl5.008008 linux pear 2.6.16 #1 smp mon may 22 14:37:02 utc 2006
> ppc
> ppc ppc gnulinux
> Compiler: cc -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall
> -pipe
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64
> Linker: /usr/bin/ld
> Sysliblist:
> Linking with -lclntsh.
>
> LD_RUN_PATH=/opt/product/oraclient64/instantclient_10_2
> Using DBD::Oracle 1.19.
> Using DBD::Oracle 1.19.
> Multiple copies of Driver.xst found in:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
> /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/ at
> Makefile.PL line 1635
> Using DBI 1.50 (for perl 5.008008 on ppc-linux-thread-multi-64int)
> installed
> in /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/
> Writing Makefile for DBD::Oracle
>
> === cut here == 8< ==
>
> . make
>
> === cut here == 8< ==
>
> Skip blib/lib/DBD/Oracle.pm (unchanged)
> Skip blib/lib/DBD/mkta.pl (unchanged)
> Skip blib/lib/oraperl.ph (unchanged)
> Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
> Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
> Skip blib/lib/Oraperl.pm (unchanged)
> Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
> cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
> Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
> cc -c -I/opt/product/oraclient64/instantclient_10_2/sdk/include
> -I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
> -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
> "-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall
> -Wno-comment
> -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" Oracle.c
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
> from Oracle.h:13,
> from Oracle.xs:1:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
> warning: "PERL_UNUSED_DECL" redefined
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from Oracle.xs:1:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1:
> warning:
> this is the location of the previous definition
> cc -c -I/opt/product/oraclient64/instantclient_10_2/sdk/include
> -I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
> -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
> "-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall
> -Wno-comment
> -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" dbdimp.c
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
> from Oracle.h:13,
> from dbdimp.c:20:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
> warning: "PERL_UNUSED_DECL" redefined
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from dbdimp.c:20:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1:
> warning:
> this is the location of the previous definition
> dbdimp.c: In function ‘dbd_discon_all’:
> dbdimp.c:190: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_db_login6’:
> dbdimp.c:385: warning: cast to pointer from integer of different size
> dbdimp.c:399: warning: cast to pointer from integer of different size
> dbdimp.c:409: warning: cast to pointer from integer of different size
> dbdimp.c:413: warning: cast to pointer from integer of different size
> dbdimp.c:700: warning: value computed is not used
> dbdimp.c:312: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_db_disconnect’:
> dbdimp.c:760: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_db_destroy’:
> dbdimp.c:797: warning: unused variable ‘my_perl’
> dbdimp.c: In function ‘dbd_rebind_ph_char’:
> dbdimp.c:1110: warning: value computed is not used
> dbdimp.c:1169: warning: cast from pointer to integer of different size
> dbdimp.c: In function ‘pp_exec_rset’:
> dbdimp.c:1254: warning: unused variable ‘my_perl’
> dbdimp.c:1269: warning: unused variable ‘my_perl’
> dbdimp.c:1276: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_execute’:
> dbdimp.c:1655: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_execute_array’:
> dbdimp.c:1985: warning: value computed is not used
> dbdimp.c:1859: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_finish’:
> dbdimp.c:2144: warning: unused variable ‘Perl___notused’
> dbdimp.c: In function ‘ora_st_destroy’:
> dbdimp.c:2237: warning: unused variable ‘my_perl’
> cc -c -I/opt/product/oraclient64/instantclient_10_2/sdk/include
> -I/usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64in t/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g
> -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC
> "-I/usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE" -Wall
> -Wno-comment
> -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.2\" oci8.c
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:31,
> from Oracle.h:13,
> from oci8.c:11:
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/dbipport.h:227:1:
> warning: "PERL_UNUSED_DECL" redefined
> In file included from
> /usr/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi-64int/ auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from oci8.c:11:
> /usr/lib/perl5/5.8.8/ppc-linux-thread-multi-64int/CORE/perl. h:163:1:
> warning:
> this is the location of the previous definition
> oci8.c: In function ‘fetch_cleanup_rset’:
> oci8.c:608: warning: unused variable ‘Perl___notused’
> oci8.c: In function ‘fetch_func_rset’:
> oci8.c:644: warning: unused variable ‘my_perl’
> oci8.c:652: warning: value computed is not used
> oci8.c:655: warning: unused variable ‘my_perl’
> oci8.c:632: warning: unused variable ‘Perl___notused’
> oci8.c: In function ‘dbd_rebind_ph_lob’:
> oci8.c:748: warning: value computed is not used
> oci8.c:779: warning: value computed is not used
> oci8.c: In function ‘ora_st_fetch’:
> oci8.c:1673: warning: unused variable ‘Perl___notused’
> oci8.c:1680: warning: unused variable ‘Perl___notused’
> oci8.c: In function ‘post_execute_lobs’:
> oci8.c:2246: warning: value computed is not used
> Running Mkbootstrap for DBD::Oracle ()
> chmod 644 Oracle.bs
> rm -f blib/arch/auto/DBD/Oracle/Oracle.so
> LD_RUN_PATH="/opt/product/oraclient64/instantclient_10_2" cc -shared
> Oracle.o
> dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
> -L/opt/product/oraclient64/instantclient_10_2 -lclntsh \
>
> /usr/bin/ld: skipping incompatible
> /opt/product/oraclient64/instantclient_10_2/libclntsh.so when searching
> for
> -lclntsh
> /usr/bin/ld: cannot find -lclntsh
> collect2: ld returned 1 exit status
> make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
>
> === cut here == 8< ==
>
> As you might notice, the
> /opt/product/oraclient64/instantclient_10_2/libclntsh.so has been skipped
> by
> "ld" since it's not compatible. Here's the output from the "file" command
> when
> executed against that file:
>
> ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped
>
> I also tried by compiling a "static" version of the library but
> unsuccessfully.
>
> I'm not a great Oracle/Perl expert but with an Intel 32bit system the
> above
> module does run fine.
>
> Thanks for your help!
>
> Best,
> Roberto
>
> --
> ------------------------------------------------------------ ---------
> Roberto Zini - Tech. Support Manager - email: r.zini@strhold.it
> Strhold evolution division - Via Cipriani 2 - 42100 Reggio Emilia(IT)
> Tel:+39 0522 380411 - Fax:+39 0522 307846 - Cell: 335 7700259
> ------------------------------------------------------------ ---------
>

Re: Segmentation fault with module DBD::Oracle 1.19 on SuSE Linux Enterprise Server 10 (IBM Powe

am 09.11.2007 16:19:33 von r.zini

scoles@pythian.com wrote:
> I think you have to install the perl-devel package

OK.

Thanks for the input.

I'll download the SDK package (which holds the perl-devel) and let you.

Thanks,
Roberto

--
------------------------------------------------------------ ---------
Roberto Zini - Tech. Support Manager - email: r.zini@strhold.it
Strhold evolution division - Via Cipriani 2 - 42100 Reggio Emilia(IT)
Tel:+39 0522 380411 - Fax:+39 0522 307846 - Cell: 335 7700259
------------------------------------------------------------ ---------

Re: Segmentation fault with module DBD::Oracle 1.19 on SuSE Linux Enterprise Server 10 (IBM Powe

am 09.11.2007 16:31:34 von r.zini

Roberto Zini wrote:
> scoles@pythian.com wrote:
>> I think you have to install the perl-devel package
>
> OK.
>
> Thanks for the input.
>
> I'll download the SDK package (which holds the perl-devel) and let you.
>
> Thanks,
> Roberto
>

Uhm... not sure about that.

I just tried to get it to work with SuSE Linux Enterprise Desktop 10+SP1 which
*does* not have the perl-devel installed and, despite a lot of warnings, I was
able to run the test script without getting the "segmentation fault".

Do you really think the perl-devel is required?

Thanks again,
Roberto

--
------------------------------------------------------------ ---------
Roberto Zini - Tech. Support Manager - email: r.zini@strhold.it
Strhold evolution division - Via Cipriani 2 - 42100 Reggio Emilia(IT)
Tel:+39 0522 380411 - Fax:+39 0522 307846 - Cell: 335 7700259
------------------------------------------------------------ ---------

Re: Segmentation fault with module DBD::Oracle 1.19 on SuSE Linux Enterprise Server 10 (IBM Power 64

am 09.11.2007 16:32:35 von hjp

--DIOMP1UsTsWJauNi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2007-11-09 15:12:03 +0100, Roberto Zini wrote:
> Hello everybody.
>=20
> I'm trying to get the DBD::Oracle 1.19 Perl module working fine under SuSE
> Linux Enterprise Server 10 (IBM Power 64bit).

I don't know about the Power architecture specifically, but on most
platforms you cannot link 64 and 32 bit code together. So if your perl
is a 64-bit executable, your Oracle libraries need to be 64 bit, too;
and if your perl executable is 32 bits, you need the 32-bit Oracle
libraries.

file `which perl` should tell you for sure, but we can guess from the
output of perl -V:


> The version of SLES is 10.0 (no SP1 applied yet) and the version of Perl =
I'm
> using is:
>=20
> ===3D cut here == 8< ==
>=20
> Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
> Platform:
> osname=3Dlinux, osvers=3D2.6.16, archname=3Dppc-linux-thread-multi-64=
int

"64int" sounds like 64 bit, but ...

> intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D8=
7654321

longsize=3D4 and ptrsize=3D4 are strong hints that it's really a 32-bit
executable.

> When trying to compile with the 32bit module, I have a "Segmentation Faul=
t"
> when using a Perl test script (during the DBI->connect phase) where when =
using
> the 64bit version the linker "skips" over the Oracle provided
> libclntsh.so.10.1 (it's incompatible but to me it seems fine).

A 64-bit library is indeed incompatible with a 32-bit executable, so
that's to be expected. I cannot explain the segfault, though. I did
notice that you didn't include any output from "make test". Did you run
it? If so, did it also crash with a segfault?

hp

--=20
_ | Peter J. Holzer | If I wanted to be "academically correct",
|_|_) | Sysadmin WSR | I'd be programming in Java.
| | | hjp@wsr.ac.at | I don't, and I'm not.
__/ | http://www.hjp.at/ | -- Jesse Erlbaum on dbi-users

--DIOMP1UsTsWJauNi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHNH2TMdFfQa64PCwRAh3gAKCBM+HzaBioE9Urt5/hKyXlEI/GJgCf d/Ac
t+WptqGtayCU9NOHFHPWok4=
=q4Tr
-----END PGP SIGNATURE-----

--DIOMP1UsTsWJauNi--