On Mon, Nov 14, 2005 at 02:49:02AM +0530, Anup Singh wrote:
> Hello,
> 
> Tried installing DBD::Oracle on Linux with Oracle 10G XE but it failed.

I've implemented support for XE in the next release. Can't say when
that'll be, but here's a patch that may work for you...
(Might need to be applied by hand to your Makefile.PL)

Please (everyone) let me know if this works for you, or not.
Thanks.

Tim.

--- dbd-oracle/branches/pythian/Makefile.PL     (original)
+++ dbd-oracle/branches/pythian/Makefile.PL     Sun Nov 20 14:54:09 2005
@@ -327,6 +327,31 @@ elsif ($::opt_l and # use -l to enable t
     my $inc = join " ", map { "-I$OH/$_" } @h_dirs;
     $opts{INC}  = "$inc -I$dbi_arch_dir";
 }
+
+elsif (-e "$OH/rdbms/demo/demo_xe.mk") {       # Oracle XE
+
+    print "Looks like Oracle XE\n";
+
+    fetch_oci_macros("$OH/rdbms/demo/demo_xe.mk");
+    $MK{CCINCLUDES} = '-I$(ICINCHOME)'; # undo odd refinition in demo_xe.mk
+
+    # From linux Oracle XE (10.2.0):
+    #  ICINCHOME=$(ORACLE_HOME)/rdbms/public/
+    #  ICLIBHOME=$(ORACLE_HOME)/lib/
+    #  ICLIBPATH=-L$(ICLIBHOME)
+    #  THREADLIBS=-lpthread    [initially -lthread then redefined]
+    #  CCLIB=$(ICLIBPATH) -lclntsh $(THREADLIBS)
+    #  CCINCLUDES = -I$(ICINCHOME)   [see above]
+    #   CCFLAGS=$(CCINCLUDES) -DLINUX -D_GNU_SOURCE -D_REENTRANT -g [initially 
without -DLINUX -D_GNU_SOURCE]
+    my $cclib   = expand_mkvars($MK{CCLIB}, 0, 1);
+    my $ccflags = expand_mkvars($MK{CCFLAGS}, 0, 1);
+
+    $linkwith_msg = "$cclib";
+    $opts{LIBS} = [ $cclib ];
+    $opts{INC}  = "-I$dbi_arch_dir $ccflags";
+    $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
+}
+
 # --- special case for Oracle 10g instant client
 
 elsif (-e "$OH/libclntsh.so.10.1") {

Reply via email to