Problem compiling Oracle::OCI 0.06 under DBI 1.46

From: Charles Jardine (cj10_at_cam.ac.uk)
Date: 11/19/04


Date: Fri, 19 Nov 2004 16:50:45 +0000
To:  dbi-users@perl.org


I have just tried to compile Oracle::OCI 0.06 under DBI 1.46
and DBD::Oracle 1.16. (Using perl 5.8.5-dor under Solaris 8).
The compilation failed. The first error message was:

"OCI.xs", line 6: cannot find include file: <Oracle.h>

The cause of the problem is a small change in the behaviour of
DBI::DBD::dbd_dbi_arch_dir(). In DBI 1.43, this returned a
string ending with '/DBI', in 1.46 the string ends with '/DBI/'.
The extra '/' confuses the Makefile.PL that is created by
Oracle-OCI-0.06/boot, so that it does not set the include path
correctly for the compilation.

I have attached a patch. I hope this helps someone.

-- 
Charles Jardine - Computing Service, University of Cambridge
cj10@cam.ac.uk    Tel: +44 1223 334506, Fax: +44 1223 334679

diff -u -r Oracle-OCI-0.06/boot Oracle-OCI-0.06.patched/boot
--- Oracle-OCI-0.06/boot Thu Aug 30 16:49:24 2001
+++ Oracle-OCI-0.06.patched/boot Fri Nov 19 16:37:51 2004
@@ -293,7 +293,7 @@
                 use DBI::DBD;
                 my $dbi_dir = dbd_dbi_dir();
                 my $dbi_arch_dir = dbd_dbi_arch_dir();
- (my $ora_arch_dir = $dbi_arch_dir) =~ s!DBI$!DBD/Oracle!;
+ (my $ora_arch_dir = $dbi_arch_dir) =~ s!DBI/?$!DBD/Oracle!;
         }."\n" if $. == 1;
         s!^\);! CONFIGURE => \\&wmf_config,\n);!;
         print $new_mk $_;



Relevant Pages

  • Re: Problem with DBI installation on x86_64-linux
    ... The x68_64 glibc is probably not installed, but I am not sure of that: ... At the moment I just succeeded in installing DBI using a RPM: ... I know that this does not solve my compilation problem, ... Problem with DBI installation on x86_64-linux ...
    (perl.dbi.users)
  • Re: DBD::Oracle installation failed
    ... I am having problem with DBI and DBD when I migrate the OS from AIX ... Compilation will proceed shortly. ... Martin J. Evans ...
    (perl.dbi.users)
  • Re: DBI pure perl version 1.54
    ... I am trying to use PostgreSQL for a database module im writing on hpux. ... But the perl i am using is 5.8.8 & DBI, again the pure perl version 1.54. ... Compilation failed in require at ./temp line 4. ...
    (perl.dbi.users)
  • Re: Segmentation Fault(Core dumped)
    ... I have re compiled DBI 1.601and then DBD::Oracle 1.18a, ... But when I started testing my perl script, ... Compilation failed in require at ./test.pl line 13. ... Oracle Database client you will have to recompile DBD::Oracle. ...
    (perl.dbi.users)
  • Re: DBD::Oracle installation failed
    ... I am having problem with DBI and DBD when I migrate the OS from AIX ... Compilation will proceed shortly. ... John Scholes, if you are reading: I would change all the comments to c ...
    (perl.dbi.users)