On Wed, Jan 18, 2006 at 11:29:10AM +0000, Tim Bunce wrote:
> Here's a hopefully-final-stake-in-the-ground:
> 
>     http://www.data-plan.com/public/DBD-Oracle-1.17-RC5.tar.gz
> 
> As usual I'd be grateful for more, and wider, testing.

[...]

>   Changes to Makefile.PL:
>     Instant Client support thanks to Hilmar Lapp, John Scoles and others.

The Instant Client compilation still seems broken on FC4, where
Instant Client is installed via (provided by Oracle) .rpm. I have

        $ rpm -qa | grep instantclient
        oracle-instantclient-basic-10.2.0.1-1
        oracle-instantclient-sqlplus-10.2.0.1-1
        oracle-instantclient-devel-10.2.0.1-1

which puts header files to /usr/include/oracle/10.2.0.1/client, while
having .so's in /usr/lib/oracle/10.2.0.1/client/lib.

As this Instant Client does not have ORACLE_HOME in the proper sense
of that name, I use ORACLE_HOME pointing to the client/lib
subdirectory. The Instant Client is correctly detected

        $ ORACLE_HOME=/usr/lib/oracle/10.2.0.1/client/lib perl Makefile.PL

        Using Oracle in /usr/lib/oracle/10.2.0.1/client/lib
        DEFINE _SQLPLUS_RELEASE = "1002000100" (CHAR)
        Oracle version 10.2.0.1 (10.2)
        Looks like an Instant Client installation, okay
        Your LD_LIBRARY_PATH env var is set to ''
        Your LD_LIBRARY_PATH env var doesn't include 
'/usr/lib/oracle/10.2.0.1/client/lib' but probably needs to.
        Oracle sysliblist:
        Your Instant Client installation doesn't have the SDK component 
installed

but the find_headers is not called in this path, so that "find include
directory for Instant Client code" is never used.

I propose the following patch. Note that with the .rpm intallation,
the sdk/include directory is never there, so it does not make sense to
put it into $opts{INC}, running find_headers instead makes the
compilation and make test fly.

--- Makefile.PL.orig    2006-01-19 11:45:08.000000000 +0100
+++ Makefile.PL 2006-01-19 11:49:09.000000000 +0100
@@ -330,9 +330,14 @@
     $opts{LIBS} = [ "-L$OH -l$lib $syslibs" ];

     my $inc = "$OH/sdk/include";
-    warn "Your Instant Client installation doesn't have the SDK
component installed\n"
-        unless -d $inc;
-    $opts{INC}  = "-I$inc -I$dbi_arch_dir";
+    if (-d $inc) {
+        $opts{INC}  = "-I$inc -I$dbi_arch_dir";
+    } else {
+        warn "Your Instant Client installation doesn't have the SDK
component installed\n";
+        my @h_dirs = find_headers();
+        my $inc = join " ", map { "-I$_" } @h_dirs;
+        $opts{INC}  = "$inc -I$dbi_arch_dir";
+    }

 }

-- 
------------------------------------------------------------------------
 Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
 .project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ...
                Only self-confident people can be simple.

Reply via email to