DBD-Oracle - Re: DBD and Oracle Instantclient 10

Posted on Fri Apr 28 21:11:15 2006 by flexx in response to 2210 (See the whole thread of 18)
Re: DBD and Oracle Instantclient 10

Well, althought I don't actually have the time I dug in anyway and found the following snipplet in the original makefile:

die qq{ The $ORACLE_ENV environment variable value ($OH) is not valid. It must be set to hold the path to an Oracle installation directory on this machine (or a machine with a compatible architecture). For an Instant Client install, the directory should include an sdk subdirectory. See the README.clients.txt file for more information. ABORTED! } unless (-d $OH and $os eq 'VMS') or -d "$OH/sdk/." # Instant Client with SDK or -d "$OH/lib/." # normal Oracle installation or glob("$OH/libclntsh.$so*") # pre-sdk instant client or rpm or -e "$OH/oci.dll"; # Windows Instant Client print "Using Oracle in $OH\n";

So that explains why setting $ORACLE_HOME to $REAL_ORACLE_HOME/lib works on gentoo, since gentoo copies the actual content from the basic packages' root to .../lib, where Makemaker.PL then indeed finds a libclntsh.so.10.1, thus assuming it has found a pre-sdk instant client, wich is incorrect.

Furthermore, as a $ORACLE_HOME/lib exists in gentoo, if you set $ORACLE_HOME to the "actually correct" directory, the installation is mistakenly assumed to be a normal Oracle installation.

The above snipplet merely checks the existence of a usable installation, and not more, but I guess the comments given by the coder show the assumtions made later in the process:

# --- special case for Oracle 10g instant client (note lack of ../lib/...) elsif (my @libclntsh = glob("$OH/libclntsh.$so*")) { print "Looks like an Instant Client installation, okay\n";

So the problem here is, that a lot of assumtions are made on how your $ORACLE_HOME is structured, and if a distro doesn't follow the default structure (like many) then DBD::Oracle won't build out of the box.

Cheers,
Flexx

flexx "at" chello.at

Write a response