After a day of forehead-bashing I got DBD::Oracle to compile with the
Instant Client on Red Hat Enterprise Linux 4 - though I suspect it will
work with most other flavors.  Here are my notes for the good of the
next person (and me next time I go looking):

To simplify/standardize the layout of the files I used the RPMs Oracle
provides.  They scatter the files into /usr/lib/oracle,
/usr/include/oracle, and /usr/share/oracle, so I had to make an
adjustment in the Makefile.PL to find the .h files.

I used the pythian branch from the subversion repository (announced at
http://www.cpanforum.com/threads/1130).  Here's the output of svn diff -
I don't have credentials to commit the change (nor do I want them!)

$ svn diff Makefile.PL
Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 2309)
+++ Makefile.PL (working copy)
@@ -18,6 +18,12 @@
 ##  Changes made
 ##  Adding in a few changes suggested by Andy Hassall
<[EMAIL PROTECTED]>
 ##  that will enable the compile to work for Windows version of the IC
+##
+##  Nathan.Vonnahme at banner health dot com
+##  Dec 14 2005
+##  tweak to find Oracle Instant Client 10.2.0.1 on Linux when
installed via Oracle's RPMs,
+##    which scatter the instant client files into /usr/lib/oracle,
/usr/include/oracle, and
+##    /usr/share/oracle

 # vim: ts=8:sw=4

@@ -382,6 +388,7 @@
     $linkwith_msg = "-l$lib.";
     $opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs"];
     my $inc = "-I$OH\/sdk/include";
+    $inc .= " -I/usr/include/oracle/$client_version_full/client"; #
where Oracle's rpms put the .h files
     $opts{INC}  = "$inc -I$dbi_arch_dir";

 }


I also had trouble with the environment variables; this is what finally
worked:
ORACLE_HOME=/usr/lib/oracle/10.2.0.1/client/lib
LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.1/client/lib


after those two changes, I could run `perl Makefile.PL` with no args and
get a working makefile.


--
nathan vonnahme, system engineer at fairbanks memorial hospital
   1650 cowles street, fairbanks alaska 99701.  907-458-5464

Reply via email to