> From: john...@pharmacy.arizona.edu
> Subject: Trouble installing DBD::Oracle in OS X 10.8 ; Oracle 32 bit drivers
> the issue?
> Date: Mon, 17 Dec 2012 10:15:04 -0700
> To: dbi-users@perl.org
>
> So I think I've found the bad news part of my recent update 10 OS X 10.8…
>
> DBI installed just fine, went to install DBD::Oracle and at first it failed
> entirely because it couldn't ID the Pracle version; then I discovered that
> the 64-bit Instant Client does not work in 10.7 or 10.8 :
>
> <https://forums.oracle.com/forums/thread.jspa?threadID=2318019&start=30&tstart=4>
>
>
> Switch to 32-bit client, sqlplus runs ok, and the install of DBD::Oracle
> starts auspiciously:
>
> CPAN.pm: Going to build P/PY/PYTHIAN/DBD-Oracle-1.52.tar.gz
>
> Using DBI 1.622 (for perl 5.012004 on darwin-thread-multi-2level) installed
> in /opt/local/lib/perl5/site_perl/5.12.4/darwin-thread-multi-2level/auto/DBI/
>
> Configuring DBD::Oracle for perl 5.012004 on darwin
> (darwin-thread-multi-2level)
>
> Remember to actually *READ* the README file! Especially if you have any
> problems.
>
> Installing on a darwin, Ver#12.2
> Using Oracle in /oracle32
> DEFINE _SQLPLUS_RELEASE = "1002000400" (CHAR)
> Oracle version 10.2.0.4 (10.2)
> Looks like an Instant Client installation, okay
> Your DYLD_LIBRARY_PATH env var is set to '/oracle32'
> Oracle sysliblist:
> Found header files in /oracle32/sdk/include.
>
> client_version=10.2
>
>
> DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"10.2.0.4\"
> -DORA_OCI_102
>
>
> Checking for functioning wait.ph
>
>
> System: perl5.012004 darwin dbdev2.pharmacy.arizona.edu 12.2.0 darwin kernel
> version 12.2.0: sat aug 25 00:48:52 pdt 2012;
> root:xnu-2050.18.24~1release_x86_64 x86_64
> Compiler: /usr/bin/clang -O3 -O2 -fno-common -DPERL_DARWIN
> -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -pipe
> -fstack-protector -I/opt/local/include
> Linker: /usr/bin/ld
> Sysliblist:
> Linking with -lclntsh.
>
> Checking if your kit is complete...
> Looks good
> LD_RUN_PATH=/oracle32
> Using DBD::Oracle 1.52.
> Using DBD::Oracle 1.52.
> Using DBI 1.622 (for perl 5.012004 on darwin-thread-multi-2level) installed
> in /opt/local/lib/perl5/site_perl/5.12.4/darwin-thread-multi-2level/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?)
>
>
> Then comes an endless line of errors like:
>
> /opt/local/lib/perl5/site_perl/5.12.4/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:31:6:
> warning:
> explicitly assigning a variable of type 'void *' to itself
> [-Wself-assign]
> xxx = xxx; /* avoid unused var warning */
> ~~~ ^ ~~~
> ./Oracle.xsi:626:15: warning: explicitly assigning a variable of type 'I32'
> (aka 'int') to itself [-Wself-assign]
> if (0) ix = ix; /* avoid unused variable warning */
> ~~ ^ ~~
> ./Oracle.xsi:647:19: warning: explicitly assigning a variable of type 'I32'
> (aka 'int') to itself [-Wself-assign]
> if (0) ix = ix; /* avoid unused variable warning */
> ~~ ^ ~~
> ./Oracle.xsi:734:15: warning: explicitly assigning a variable of type 'I32'
> (aka 'int') to itself [-Wself-assign]
> if (0) ix = ix; /* avoid unused variable warning */
> ~~ ^ ~~
> Oracle.xs:311:150: warning: expression result unused [-Wunused-value]
> ...OCIAttrSet_log_stat(imp_dbh, (dvoid*)admhp, (ub4)OCI_HTYPE_ADMIN,
> (dvoid*)str, (ub4)svp_len, (ub4)OCI_ATTR_ADMIN_PFILE,
> (OCIError*)imp_dbh->errhp, status)...
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> ./ocitrace.h:325:26: note: expanded from macro 'OCIAttrSet_log_stat'
> oci_status_name(stat)),stat : stat
> ^
> Oracle.xs:313:85: warning: expression result unused [-Wunused-value]
> ...OCIDBStartup_log_stat(imp_dbh, imp_dbh->svchp, imp_dbh->errhp, admhp,
> mode, flags, status)...
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> ./ocitrace.h:587:26: note: expanded from macro 'OCIDBStartup_log_stat'
> oci_status_name(stat)),stat : stat
>
>
> Then
>
> t/00versions.t ............ Can't load
> '/Users/johnson/.cpan/build/DBD-Oracle-1.52-1xhbkg/blib/arch/auto/DBD/Oracle/Oracle.bundle'
> for module DBD::Oracle:
> dlopen(/Users/johnson/.cpan/build/DBD-Oracle-1.52-1xhbkg/blib/arch/auto/DBD/Oracle/Oracle.bundle,
> 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1
> Referenced from:
> /Users/johnson/.cpan/build/DBD-Oracle-1.52-1xhbkg/blib/arch/auto/DBD/Oracle/Oracle.bundle
> Reason: no suitable image found. Did find:
> /oracle32/libclntsh.dylib.10.1: mach-o, but wrong architecture at
> /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/DynaLoader.pm line 204.
> at t/00versions.t line 10
> Compilation failed in require at t/00versions.t line 10.
> BEGIN failed--compilation aborted at t/00versions.t line 10.
> # Looks like your test exited with 2 before it could output anything.
> t/00versions.t ............ Dubious, test returned 2 (wstat 512, 0x200)
> Failed 2/2 subtests
> t/01base.t ................ 1/6
> # Failed test 'install_driver'
> # at t/01base.t line 24.
> # got: 'install_driver(Oracle) failed: Can't load
> '/Users/johnson/.cpan/build/DBD-Oracle-1.52-1xhbkg/blib/arch/auto/DBD/Oracle/Oracle.bundle'
> for module DBD::Oracle:
> dlopen(/Users/johnson/.cpan/build/DBD-Oracle-1.52-1xhbkg/blib/arch/auto/DBD/Oracle/Oracle.bundle,
> 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1
> # Referenced from:
> /Users/johnson/.cpan/build/DBD-Oracle-1.52-1xhbkg/blib/arch/auto/DBD/Oracle/Oracle.bundle
> # Reason: no suitable image found. Did find:
> # /oracle32/libclntsh.dylib.10.1: mach-o, but wrong architecture at
> /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/DynaLoader.pm line 204.
> # at (eval 9) line 3
>
>
> Is this because my perl is 64-bit and I'm using the 32-bit Oracle drivers?
>
> In a word Yes. I have gotten DBD::Oracle on 64big Mac once a while ago. I
> have to re-compile the perl and DBD::Oracle on the same compiler and it
> worked also had a full 64 bit client for Oracle as well. hope this helps
>
> --
> Bruce Johnson
> University of Arizona
> College of Pharmacy
> Information Technology Group
>
> Institutions do not have opinions, merely customs
>
>