ok, so i finally figured out the solution. here's what i had to do to get perl's dbd::oracle module working on an amd64 with gentoo and oracle's 10g instant client.
mkdir /opt/oracle
cd /opt/oracle
unzip /var/downloads/instantclient-basic-linux-x86-64-10.1.0.3.zip
unzip /var/downloads/instantclient-sdk-linux-x86-64-10.1.0.3.zip
unzip /var/downloads/instantclient-sqlplus-linux-x86-64-10.1.0.3.zip
cd instantclient10_1/
ln -s . lib
ln -s libclntsh.so.10.1 libclntsh.so
ln -s libocci.so.10.1 libocci.so
2) set environment variables:
export ORACLE_HOME="/opt/oracle/instantclient10_1"
export LD_LIBRARY_PATH="$ORACLE_HOME:$LD_LIBRARY_PATH"
3) modify Makefile.PL per Satoshi's instructions (http://www.nntp.perl.org/group/perl.dbi.users/25638) to bypass the find_headers() routine and to pass a correct -I flag to cc; mine is kept in .cpan/build/DBD-Oracle-1.16/:
comment out the lines:
my @h_dirs = find_headers();
push @h_dirs, 'network/public';
and replace this line:
my $inc = join " ", map { "-I$OH/$_" } @h_dirs;
with this line:
my $inc = "-I/opt/oracle/instantclient10_1/sdk/include";
4) build the module
perl Makefile.PL -l
make
# make test generates lots of errors
make test
make install
5) setup the shared library
create the file /etc/env.d/50oracle
with these lines:
ORACLE_HOME=/opt/oracle/instantclient10_1
LDPATH=/opt/oracle/instantclient10_1
C_INCLUDE_PATH=/opt/oracle/instantclient10_1/sdk/include
and then execute:
env-update
(15)
]
