Does anyone have a WORKING recipe for building DBD::Oracle against
Instant client? I have followed the recipes:
http://groups.google.com/group/perl.dbi.users/browse_thread/thread/c166e7d297d388fc/2770a60133842123?q=instant+client&rnum=3&hl=en#2770a60133842123
http://groups.google.com/group/perl.dbi.users/browse_thread/thread/fd220908b204a0c5/2a251348deb5e7e7?q=instant+client&rnum=4&hl=en#2a251348deb5e7e7
But neither of those worked for me. Here is what I've done:
cd /usr/local/src
unzip /home/jstrauss/instantclient-basic-linux32-10.2.0.1-20050713.zip
unzip /home/jstrauss/instantclient-sdk-linux32-10.2.0.1-20050713.zip
unzip /home/jstrauss/instantclient-sqlplus-linux32-10.2.0.1-20050713.zip
cd instantclient_10_2/
mkdir -p bin lib java network/admin
mv lib* lib
mv *.jar java
mv sqlplus bin
mv glogin.sql bin
mv sdk/demo .
mv sdk/include .
mv sdk/ott bin
mv sdk/ottclasses.zip java
rmdir sdk
ln -s libclntsh.so.10.1 lib/libclntsh.so
export ORACLE_HOME=/usr/local/src/instantclient_10_2
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export SQLPATH=$ORACLE_HOME/bin
cpan get DBD::Oracle
cd .cpan/build/DBD-Oracle-1.16/
root@ubuntu:~/.cpan/build/DBD-Oracle-1.16 # perl Makefile.PL -m
/usr/local/src/instantclient_10_2/demo/demo.mk
Using DBI 1.48 (for perl 5.008004 on i386-linux-thread-multi) installed
in /usr/local/lib/perl/5.8.4/auto/DBI/
Configuring DBD::Oracle ...
>>> Remember to actually *READ* the README file!
Especially if you have any problems.
Using Oracle in /usr/local/src/instantclient_10_2
DEFINE _SQLPLUS_RELEASE = "1002000100" (CHAR)
Oracle version 10.2.0.1 (10.2)
Found /usr/local/src/instantclient_10_2/demo/demo.mk
Using /usr/local/src/instantclient_10_2/demo/demo.mk
Reading /usr/local/src/instantclient_10_2/demo/demo.mk
ERROR parsing /usr/local/src/instantclient_10_2/demo/demo.mk: Unable to
determine what to link with.
Please send me copies of these files (one per mail message):
/usr/local/src/instantclient_10_2/demo/demo.mk
I'm doing this on linux
thanks
Jay
> Hi,
>
>Does anyone have a WORKING recipe for building DBD::Oracle against
>Instant client? I have followed the recipes:
...
>>
>I'm doing this on linux
>>
>thanks
>Jay
>
Hate replying to my own message. You must edit the Makefile.pl to point
at YOUR OWN header files. In my case it looks like:
--- Makefile.PL.orig 2005-09-03 22:02:49.723726592 -0500
+++ Makefile.PL 2005-09-03 22:08:34.581300272 -0500
@@ -276,7 +276,7 @@
print "Oracle sysliblist: $syslibs\n";
my $libdir = ora_libdir();
$opts{dynamic_lib} = { OTHERLDFLAGS ="$::opt_g" };
- my @h_dirs = find_headers();
+ my @h_dirs;
if ($client_version_full =~ /^8.0.6/ && $os eq 'hpux') {
$linkwith_msg = "-lextp -l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
@@ -286,7 +286,7 @@
$linkwith_msg = "-l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
}
- my $inc = join " ", map { "-I$OH/$_" } @h_dirs;
+ my $inc = "-I//usr/local/src/instantclient_10_2/include";
$opts{INC} = "$inc -I$dbi_arch_dir";
}
else { # --- trawl the guts of Oracle's make files looking the how it
wants to link
Jay