DKCarlo has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm trying to install DBD::Oracle 1.49.

I'm on a solaris 10:

SunOS <ServerName> 5.10 Generic_144488-14 sun4v sparc SUNW,T5240

I have installed perl:

Summary of my perl5 (revision 5 version 16 subversion 0) configuration:
Platform: osname=solaris, osvers=2.10, archname=sun4-solaris-thread-multi uname='sunos <ServerName> 5.10 generic_144488-14 sun4v sparc sunw, +t5240 ' config_args='-des -Dprefix=/<system>/perl -Dcc=gcc -Acflags=-fPID +-DPIC -m64 -Dusethreads' hint=previous, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -fno-strict-aliasing -pipe -I/usr +/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_ +SAFE_PUTENV -DPERL_USE_SAFE_PUTENV', optimize='-O', cppflags='-D_REENTRANT -fno-strict-aliasing -pipe -I/usr/local/inc +lude -D_REENTRANT -fno-strict-aliasing -pipe -I/usr/local/include -D_ +LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -DPERL +_USE_SAFE_PUTENV' ccversion='', gccversion='2.95.3 20010315 (release)', gccosandvers +='solaris2.8' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lpthread -lc perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E' cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV USE_ITHREADS USE_LARGE_FI +LES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under solaris Compiled at Aug 21 2012 15:22:36 %ENV: PERL5LIB="/<system>/development//bin:/<system>/perl/oss/lib:" @INC: /<system>/development//bin /<system>/perl/oss/lib /<system>/perl/lib/site_perl/5.16.0/sun4-solaris-thread-multi /<system>/perl/lib/site_perl/5.16.0 /<system>/perl/lib/5.16.0/sun4-solaris-thread-multi /<system>/perl/lib/5.16.0

Used GCC:

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/ +specs gcc version 2.95.3 20010315 (release)

I have all ready installed:

DBI-1.622

When I'm trying to install:

perl Makefile.PL:

<system>@<ServerName>:~/install/DBD-Oracle-1.46$ perl Makefile.PL Using DBI 1.622 (for perl 5.016000 on sun4-solaris-thread-multi) insta +lled in /<system>/perl/lib/site_perl/5.16.0/sun4-solaris-thread-multi +/auto/DBI/ Configuring DBD::Oracle for perl 5.016000 on solaris (sun4-solaris-thr +ead-multi) Remember to actually *READ* the README file! Especially if you have an +y problems. Installing on a solaris, Ver#2.10 Using Oracle in /oracle/app/oracle/product/11.2/client_1 DEFINE _SQLPLUS_RELEASE = "1102000200" (CHAR) Oracle version 11.2.0.2 (11.2) Found /oracle/app/oracle/product/11.2/client_1/rdbms/demo/demo_rdbms.m +k Found /oracle/app/oracle/product/11.2/client_1/rdbms/lib/ins_rdbms.mk Using /oracle/app/oracle/product/11.2/client_1/rdbms/demo/demo_rdbms.m +k Your LD_LIBRARY_PATH env var is set to ':/usr/lib:/<system>/perl/lib:/ +usr/lib:/usr/X/lib:/oracle/app/oracle/product/11.2/client_1/lib:/<sys +tem>/development//lib:/usr/ccs/lib:/<system>/perl/oss/lib:/<system>/r +elease/infinys/home/sunos5.8-64-prd/lib' Reading /oracle/app/oracle/product/11.2/client_1/rdbms/demo/demo_rdbms +.mk Reading /oracle/app/oracle/product/11.2/client_1/rdbms/lib/env_rdbms.m +k Attempting to discover Oracle OCI build rules gcc -c DBD_ORA_OBJ.c by executing: [make -f /oracle/app/oracle/product/11.2/client_1/rdbms/ +demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo gencln +tsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o] Oracle oci build command: [true -m64 -L/oracle/app/oracle/product/11.2/client_1/lib/ -L +/oracle/app/oracle/product/11.2/client_1/rdbms/lib/ -o DBD_ORA_EXE DB +D_ORA_OBJ.o -lclntsh `cat /oracle/app/oracle/product/11.2/client_1/ +lib/sysliblist` -lm -lthread -lpthread] Found header files in /oracle/app/oracle/product/11.2/client_1/rdbms/p +ublic. client_version=11.2 DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2 +\" -DORA_OCI_102 -DORA_OCI_112 Checking for functioning wait.ph System: perl5.016000 sunos <ServerName> 5.10 generic_144488-14 sun4v s +parc sunw,t5240 Compiler: gcc -O -D_REENTRANT -fno-strict-aliasing -pipe -I/usr/loca +l/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_ +PUTENV -DPERL_USE_SAFE_PUTENV Linker: /usr/lib/ld Sysliblist: -lkstat -lnsl -lsocket -lresolv -lgen -ldl -lsched -lrt -l +c -laio -lposix4 Oracle makefiles would have used these definitions but we override the +m: CC: cc CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\ $(SHARED_CFLAG) $(USRFLAGS) [$(GFLAG) -xO3 $(CDEBUG) -Xa $(PROFILE) -xstrconst -dalign +$(ILPATH) $(XS) $(MR) -xildoff -errtags=yes -v -m64 -xchip=ultra3 -W2 +,-AKNR_S -Wd,-xsafe=unboundsym -Wc,-Qiselect-funcalign=32 -Wc,-Qgsche +d-trace_late=1 -Wc,-Qgsched-T5 -xalias_level=any -D_REENTRANT -DSS_64 +BIT_SERVER -DBIT64 -DMACHINE64 -xcode=pic32 -I/oracle/app/oracle/prod +uct/11.2/client_1/rdbms/demo -I/oracle/app/oracle/product/11.2/client +_1/rdbms/public -I/oracle/app/oracle/product/11.2/client_1/plsql/publ +ic -I/oracle/app/oracle/product/11.2/client_1/network/public -DSLMXMX +_ENABLE -DSLTS_ENABLE -D_REENTRANT -DLDAP_CM $(LPFLAGS) $(PLSQLNCGFLA +GS) $(USRFLAGS)] LDFLAGS: -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) [-o $@ -L/oracle/app/oracle/product/11.2/client_1/rdbms/lib +/ -L$(LIBHOME)] Linking with OTHERLDFLAGS = -m64 -L/oracle/app/oracle/product/11.2/cli +ent_1/lib/ -L/oracle/app/oracle/product/11.2/client_1/rdbms/lib/ -l +clntsh `cat /oracle/app/oracle/product/11.2/client_1/lib/sysliblist +` -lm -lthread -lpthread [from 'build' rule] Checking if your kit is complete... Looks good Ignoring LD_RUN_PATH=':/usr/lib:/<system>/perl/lib:/usr/lib:/usr/X/lib +:/oracle/app/oracle/product/11.2/client_1/lib:/<system>/development// +lib:/usr/ccs/lib:/<system>/perl/oss/lib:/<system>/release/infinys/hom +e/sunos5.8-64-prd/lib' in environment LD_RUN_PATH=/oracle/app/oracle/product/11.2/client_1/lib:/oracle/app/o +racle/product/11.2/client_1/rdbms/lib Using DBD::Oracle 1.46. Using DBD::Oracle 1.46. Using DBI 1.622 (for perl 5.016000 on sun4-solaris-thread-multi) insta +lled in /<system>/perl/lib/site_perl/5.16.0/sun4-solaris-thread-multi +/auto/DBI/ Writing Makefile for DBD::Oracle Writing MYMETA.yml and MYMETA.json *** If you have problems... read all the log printed above, and the README and README.help.tx +t files. (Of course, you have read README by now anyway, haven't you?)

Then Make:

<system>@<ServerName>:~/install/DBD-Oracle-1.46$ make cp lib/DBD/Oracle.pm blib/lib/DBD/Oracle.pm 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 lib/DBD/Oracle/Troubleshooting.pm blib/lib/DBD/Oracle/Troubleshooti +ng.pm cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm /<system>/perl/bin/perl -p -e "s/~DRIVER~/Oracle/g" /<system>/perl/lib +/site_perl/5.16.0/sun4-solaris-thread-multi/auto/DBI/Driver.xst > Ora +cle.xsi /<system>/perl/bin/perl /<system>/perl/lib/5.16.0/ExtUtils/xsubpp -ty +pemap /<system>/perl/lib/5.16.0/ExtUtils/typemap -typemap typemap Or +acle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c gcc -c -I/oracle/app/oracle/product/11.2/client_1/rdbms/public -I/ora +cle/app/oracle/product/11.2/client_1/rdbms/demo -I/oracle/app/oracle/ +product/11.2/client_1/rdbms/public -I/oracle/app/oracle/product/11.2/ +client_1/plsql/public -I/oracle/app/oracle/product/11.2/client_1/netw +ork/public -I/<system>/perl/lib/site_perl/5.16.0/sun4-solaris-thread- +multi/auto/DBI -D_REENTRANT -fno-strict-aliasing -pipe -I/usr/local/ +include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PU +TENV -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"1.46\" -DXS_VERSION=\" +1.46\" -fPIC "-I/<system>/perl/lib/5.16.0/sun4-solaris-thread-multi/C +ORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2\ +" -DORA_OCI_102 -DORA_OCI_112 Oracle.c gcc -c -I/oracle/app/oracle/product/11.2/client_1/rdbms/public -I/ora +cle/app/oracle/product/11.2/client_1/rdbms/demo -I/oracle/app/oracle/ +product/11.2/client_1/rdbms/public -I/oracle/app/oracle/product/11.2/ +client_1/plsql/public -I/oracle/app/oracle/product/11.2/client_1/netw +ork/public -I/<system>/perl/lib/site_perl/5.16.0/sun4-solaris-thread- +multi/auto/DBI -D_REENTRANT -fno-strict-aliasing -pipe -I/usr/local/ +include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PU +TENV -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"1.46\" -DXS_VERSION=\" +1.46\" -fPIC "-I/<system>/perl/lib/5.16.0/sun4-solaris-thread-multi/C +ORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2\ +" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c dbdimp.c: In function `dbd_rebind_ph_number_table': dbdimp.c:2324: warning: use of `l' length character with `f' type char +acter dbdimp.c:2360: warning: use of `l' length character with `f' type char +acter dbdimp.c: In function `dbd_phs_number_table_post_exe': dbdimp.c:2517: warning: use of `l' length character with `f' type char +acter dbdimp.c:2545: warning: use of `l' length character with `f' type char +acter gcc -c -I/oracle/app/oracle/product/11.2/client_1/rdbms/public -I/ora +cle/app/oracle/product/11.2/client_1/rdbms/demo -I/oracle/app/oracle/ +product/11.2/client_1/rdbms/public -I/oracle/app/oracle/product/11.2/ +client_1/plsql/public -I/oracle/app/oracle/product/11.2/client_1/netw +ork/public -I/<system>/perl/lib/site_perl/5.16.0/sun4-solaris-thread- +multi/auto/DBI -D_REENTRANT -fno-strict-aliasing -pipe -I/usr/local/ +include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PU +TENV -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"1.46\" -DXS_VERSION=\" +1.46\" -fPIC "-I/<system>/perl/lib/5.16.0/sun4-solaris-thread-multi/C +ORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2\ +" -DORA_OCI_102 -DORA_OCI_112 oci8.c oci8.c: In function `ora_blob_read_mb_piece': oci8.c:1849: warning: long unsigned int format, ub4 arg (arg 6) Running Mkbootstrap for DBD::Oracle () chmod 644 Oracle.bs rm -f blib/arch/auto/DBD/Oracle/Oracle.so LD_RUN_PATH="/oracle/app/oracle/product/11.2/client_1/lib:/oracle/app/ +oracle/product/11.2/client_1/rdbms/lib" gcc -Wl,-E -G -L/usr/local/l +ib Oracle.o dbdimp.o oci8.o -m64 -L/oracle/app/oracle/product/11.2/ +client_1/lib/ -L/oracle/app/oracle/product/11.2/client_1/rdbms/lib/ + -lclntsh `cat /oracle/app/oracle/product/11.2/client_1/lib/syslibl +ist` -lm -lthread -lpthread -o blib/arch/auto/DBD/Oracle/Oracle.so + \ \ /usr/local/sparc-sun-solaris2.8/bin/ld: skipping incompatible /oracle/ +app/oracle/product/11.2/client_1/lib//libclntsh.so when searching for + -lclntsh /usr/local/sparc-sun-solaris2.8/bin/ld: cannot find -lclntsh collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracl +e/Oracle.so'

I have tried a lot of google things, and I couldn't find anything helping.

And it's not because I can't see the file:

ls -l /oracle/app/oracle/product/11.2/client_1/lib//libclntsh.so lrwxrwxrwx 1 oracle dba 62 Jun 28 2011 /oracle/app/orac +le/product/11.2/client_1/lib//libclntsh.so -> /oracle/app/oracle/prod +uct/11.2/client_1/lib/libclntsh.so.11.1
ls -l /oracle/app/oracle/product/11.2/client_1/lib/libclntsh.so.11.1 -rwxr-xr-x 1 oracle dba 48248856 Jun 28 2011 /oracle/app/ora +cle/product/11.2/client_1/lib/libclntsh.so.11.1
env | grep -i oracle LD_LIBRARY_PATH=:/usr/lib:/<system>/perl/lib:/usr/lib:/usr/X/lib:/orac +le/app/oracle/product/11.2/client_1/lib:/<system>/development//lib:/u +sr/ccs/lib:/<system>/perl/oss/lib:/<system>/release/infinys/home/suno +s5.8-64-prd/lib LD_LIBRARY_PATH_64=:/usr/lib/sparcv9:/<system>/perl/lib:/usr/lib:/usr/ +X/lib:/oracle/app/oracle/product/11.2/client_1/lib:/<system>/developm +ent//lib:/usr/ccs/lib:/<system>/perl/oss/lib:/<system>/release/infiny +s/home/sunos5.8-64-prd/lib PATH=.:/<system>/perl/bin:/usr/bin:/usr/sbin:/<system>/perl/oss/bin:/o +racle/app/oracle/product/11.2/client_1/bin:/<system>/development//bin +:/usr/lib:/usr/ccs/bin:/usr/openwin/bin:/usr/local/bin:/opt/csw/bin LD_RUN_PATH=:/usr/lib:/<system>/perl/lib:/usr/lib:/usr/X/lib:/oracle/a +pp/oracle/product/11.2/client_1/lib:/<system>/development//lib:/usr/c +cs/lib:/<system>/perl/oss/lib:/<system>/release/infinys/home/sunos5.8 +-64-prd/lib PWD=/home/<system>/install/DBD-Oracle-1.46 JAVA_HOME=/oracle/app/oracle/product/11.2/client_1/JRE DBI_DRIVER=Oracle ORACLE_HOME=/oracle/app/oracle/product/11.2/client_1

And it's a 64Bit client:

file /oracle/app/oracle/product/11.2/client_1/bin/orabase /oracle/app/oracle/product/11.2/client_1/bin/orabase: ELF 64-bit MSB + executable SPARCV9 Version 1, dynamically linked, not stripped

And since it's a SPARC it's 64Bit:

isainfo -v 64-bit sparcv9 applications asi_blk_init vis2 vis popc 32-bit sparc applications asi_blk_init vis2 vis popc v8plus div32 mul32

Anyone having any good ideas, what to do now?

Replies are listed 'Best First'.
Re: DBD::oracle Install
by marto (Cardinal) on Aug 28, 2012 at 09:12 UTC

    On a very similar but not identical setup I have to do perl Makefile.PL -r=build64 to get this module to install correctly.

      Tried with:

      perl Makefile.PL -r=build64 PREFIX=/geneva/perl/

      and

      perl Makefile.PL PREFIX=/geneva/perl/ -r=build64

      Just now, and it did not work.

        Same error

Re: DBD::oracle Install
by Neighbour (Friar) on Aug 28, 2012 at 12:52 UTC
    What does
    file /oracle/ +app/oracle/product/11.2/client_1/lib/libclntsh.so
    tell you? Because make is complaining this is an incompatible library.

      It tells me:

      file /oracle/app/oracle/product/11.2/client_1/lib/libclntsh.so /oracle/app/oracle/product/11.2/client_1/lib/libclntsh.so: ELF 64 +-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not strip +ped

      so for me, it looks okay.