On Wed, Dec 28, 2005 at 11:11:31PM +0000, Tim Bunce wrote:
>   http://www.data-plan.com/public/DBD-Oracle-1.17.tar.gz
> 
> =head1 Changes in DBD-Oracle 1.17 (svn rev 2334)

[...]

> Any and all testing would be greatly appreciated, but especially
> testing of building against Oracle Instant Client and Oracle XE
> on a range of platforms.

Hello Tim,

I have Fedora Core 4 (plus some rawhide updates to FC5) machine with
Oracle XE installed from .rpm

        oracle-xe-10.2.0.1-0.1

Using ORACLE_HOME of the .rpm installation

        /usr/lib/oracle/xe/app/oracle/product/10.2.0/server

the perl Makefile.PL and make work, but make test fails with

t/01base................Failed to load Oracle extension and/or shared 
libraries:install_driver(Oracle) failed: Can't load 
'/tmp/DBD-Oracle-1.17/blib/arch/auto/DBD/Oracle/Oracle.so' for module 
DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or 
directory at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/DynaLoader.pm line 
230.
 at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at t/01base.t line 19

This is easily fixed by using

        LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib

when running that make test, and better yet, by using

        LD_RUN_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib

(or equivalent) when making the library.

Since the oracle-xe .rpm provided by Oracle does not come with
/etc/ld.so.conf.d/oracle* file which would include the library
directory via the ld.so.cache mechanism, I think using LD_RUN_PATH
while making DBD::Oracle with Oracle XE (but the same holds for
other situations) would be nice.

Alternatively, would setting

        $ENV{'LD_LIBRARY_PATH'} ||= "$ORACLE_HOME/lib"

in Oracle.pm in the runtime be a way to go?

This and the .rpm Instant Client email I sent a while ago got me
thinking -- now that Oracle provides Oracle database server and
Oracle client libraries as well-defined packages (for Linux in the
form of .rpms), would it make sense to detect these cases early in
Makefile.PL and run Makefile.XE.PL / Makefile.IC.PL instead, simple
Makefile.PLs tailored for these situations? The DBD::Oracle has a lot
of code that deals with various versions back to Oracle 7 and with
various OSes and installations. Having simple Makefile.PLs for those
"simple" well-known cases of 10g Oracle might make compilation and
installation of DBD::Oracle as easy to install as Oracle itself got
lately.

Yours,

-- 
------------------------------------------------------------------------
 Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
 .project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ...
                Only self-confident people can be simple.

Reply via email to