Tim Bunce wrote:
http://www.google.com/search?q=+%22ocidfn.h%3A+No+such+file+or+directory%22+DBD%3A%3AOracle

i re-installed the Oracle9i client, installed 9.2.0.3.0 patch set and DBI v1.42 but none of this seems to help. i still run into the same problem, now with DBD::Oracle v1.15 - here's the output from 'make' (full typescript attached):


...
gcc -c -I. -I/opt/oracle9i/u01/app/oracle/product/9.2.0/precomp/public -I/opt/oracle9i/u01/app/oracle/product/9.2.0/rdbms/public -I/opt/oracle9i/u01/app/oracle/product/9.2.0/rdbms/demo -I/opt/oracle9i/u01/app/oracle/product/9.2.0/plsql/public -I/opt/oracle9i/u01/app/oracle/product/9.2.0/network/public -I/opt/oracle9i/u01/app/oracle/product/9.2.0/rdbms/demo -I/opt/oracle9i/u01/app/oracle/product/9.2.0/rdbms/demo -I/opt/kronodoc/perl/kb10dr1/lib/site_perl/5.8.3/sun4-solaris-64/auto/DBI -mcpu=v9 -m64 -Wa,-xarch=v9 -DUSE_HAS_SEED_EXPLICIT -fno-strict-aliasing -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" -fPIC "-I/opt/kronodoc/perl/kb10dr1/lib/5.8.3/sun4-solaris-64/CORE" -DUTF8_SUPPORT Oracle.c
In file included from Oracle.h:20,
from Oracle.xs:1:
dbdimp.h:44:20: ocidfn.h: No such file or directory
dbdimp.h:57:21: ociapr.h: No such file or directory
In file included from Oracle.h:20,
from Oracle.xs:1:
dbdimp.h:111: parse error before "Lda_Def"
dbdimp.h:111: warning: no semicolon at end of struct or union
dbdimp.h:112: warning: data definition has no type or storage class
dbdimp.h:120: parse error before '}' token
dbdimp.h:144: parse error before "Cda_Def"
dbdimp.h:144: warning: no semicolon at end of struct or union
dbdimp.h:145: warning: data definition has no type or storage class
...



the Oracle9i client was installed with the following product components (custom installation):
Oracle Network Utilities
Oracle Database Utilities
SQL*Plus
Oracle Programmer
Oracle Universal Installer


i'm using Perl 5.8.3 built with 64-bit support. Oracle libraries are also 64-bit versions.


best regards, aspa
diff -ru DBD-Oracle-1.15.dist/Makefile.PL DBD-Oracle-1.15-3/Makefile.PL
--- DBD-Oracle-1.15.dist/Makefile.PL    2004-01-28 01:45:15.000000000 +0200
+++ DBD-Oracle-1.15-3/Makefile.PL       2004-03-20 19:05:11.000000000 +0200
@@ -12,6 +12,7 @@
 use Config;
 use Cwd;
 use File::Find;
+use IO::File;
 use strict;
 
 # This DBI must be installed before we can build a DBD.
@@ -67,6 +68,7 @@
 my(@MK, %MK, $MK_TEXT, %MK_expanding); # parsed macros from Oracle's makefiles
 my %mk_target_deps;
 my %mk_target_rules;
+my $oraenv = {};
 
 # Options (rarely needed)
 # to turn off an option prefix with 'no', ie 'perl Makefile.PL -nob'
@@ -170,6 +172,7 @@
     ($inspdver{rdbms_ver} = $inspdver{RDBMS}) =~ s/^(\d+\.\d+)\.(\d+).*/${1}0$2/;
 
     print "Oracle version $inspdver{RDBMS} ($inspdver{rdbms_ver})\n" if 
$inspdver{RDBMS};
+    $oraenv->{'ORACLE_CLIENT_VERSION'}= $inspdver{rdbms_ver} || 0;
 
     if (!DBI::looks_like_number($inspdver{rdbms_ver}) || $inspdver{rdbms_ver} < 7 || 
$inspdver{rdbms_ver} > 10) {
         print qq{
@@ -701,6 +704,17 @@
 print "\n";
 WriteMakefile( dbd_edit_mm_attribs(\%opts) );
 
+# save settings
+use Data::Dumper;
+my $oraenvfn = "oraenv.pm";
+my $oraenvfh = new IO::File(">oraenv.pm");
+if($oraenvfh) {
+  $oraenvfh->print(Data::Dumper->Dump([$oraenv]));
+  $oraenvfh->close();
+} else {
+  print STDERR "Warning: failed to open $oraenvfn for writing: $!\n";
+}
+
 check_security() unless $os eq 'VMS' or $os eq 'MSWin32' or $os =~ /cygwin/i;
 
 print "\n";
diff -ru DBD-Oracle-1.15.dist/t/long.t DBD-Oracle-1.15-3/t/long.t
--- DBD-Oracle-1.15.dist/t/long.t       2004-01-28 01:45:18.000000000 +0200
+++ DBD-Oracle-1.15-3/t/long.t  2004-03-20 19:03:00.000000000 +0200
@@ -54,6 +54,26 @@
     die "RETURNING array: $@";
 }
 
+sub getoraenv {
+  use IO::File;
+  my $oraenvfn = "oraenv.pm";
+  my $oraenvfh = new IO::File($oraenvfn);
+  my $oraenv = {};
+  if($oraenvfh) {
+    my $fsize = -s $oraenvfn;
+    my ($oraenvbuf, $VAR1);
+    $oraenvfh->read($oraenvbuf, $fsize);
+    $oraenvfh->close();
+    eval "$oraenvbuf";
+    $oraenv = $VAR1;
+  }
+  return $oraenv;
+}
+
+my $oraenv = getoraenv();
+my $oracliversion = $oraenv->{ORACLE_CLIENT_VERSION} || 0;
+
+
 my @test_sets;
 push @test_sets, [ "BLOB",     ORA_BLOB,       0 ] if ORA_OCI >= 8;
 push @test_sets, [ "CLOB",     ORA_CLOB,       0 ] if ORA_OCI >= 8;
@@ -152,13 +172,22 @@
 ok(0, $sth = $dbh->prepare("select * from $table order by idx"), 1);
 ok(0, $sth->execute, 1);
 ok(0, $tmp = $sth->fetchall_arrayref, 1);
-ok(0, @$tmp == 4);
-ok(0, $tmp->[0][1] eq substr($long_data0,0,$out_len),
-       cdif($tmp->[0][1], substr($long_data0,0,$out_len), "Len 
".length($tmp->[0][1])) );
-ok(0, $tmp->[1][1] eq substr($long_data1,0,$out_len),
-       cdif($tmp->[1][1], substr($long_data1,0,$out_len), "Len 
".length($tmp->[1][1])) );
-ok(0, $tmp->[2][1] eq substr($long_data2,0,$out_len),
-       cdif($tmp->[2][1], substr($long_data2,0,$out_len), "Len 
".length($tmp->[2][1])) );
+if($oracliversion>8.1 && $oracliversion<9) {
+  my $rs = "Tests skipped on Oracle8i";
+  skip($rs);
+  skip($rs);
+  skip($rs);
+  skip($rs);
+} else {
+  ok(0, @$tmp == 4);
+  ok(0, $tmp->[0][1] eq substr($long_data0,0,$out_len),
+     cdif($tmp->[0][1], substr($long_data0,0,$out_len), "Len ".length($tmp->[0][1])) 
);
+  ok(0, $tmp->[1][1] eq substr($long_data1,0,$out_len),
+     cdif($tmp->[1][1], substr($long_data1,0,$out_len), "Len ".length($tmp->[1][1])) 
);
+  ok(0, $tmp->[2][1] eq substr($long_data2,0,$out_len),
+     cdif($tmp->[2][1], substr($long_data2,0,$out_len), "Len ".length($tmp->[2][1])) 
);
+}
+
 #use Data::Dumper; print Dumper($tmp->[3]);
 ok(0, !defined $tmp->[3][1], 1); # NULL # known bug in DBD::Oracle <= 1.13
 
@@ -447,6 +476,11 @@
     return "(cdif error $l1/$l2/$i)";
 }
 
+sub skip ($) {
+  my($msg) = @_;
+  $t++;
+  print "ok $t # skip $msg\n";
+}
 
 sub ok ($$;$) {
     my($n, $ok, $warn) = @_;

Reply via email to