Re: DBI/DBD with Oracle (on Linux) - Setting up client software?

From: David T. Bath (NRE) <"David>
Date: Sat, 04 Jul 1998 04:52:31 +0000
Message-ID: <359DB50F.1136EF56_at_nre.vic.gov.au>


John D Groenveld wrote:
>
> Georg Rehfeld's original article indicated that you'll need the SCO
> compiler tools. http://www.pauck.de/marco/misc/oracle_on_linux.html
>
> When you find the answer, please help save the world and send your
> cookbook additions to the maintainer of
> http://sunsite.unc.edu/LDP/HOWTO/Oracle-HOWTO.html
> John
> groenveld_at_acm.org

Just as DBI and DBD-Oracle modules can be got precompiled for Win32, there is a good case for a Linux distribution of the DBD-Oracle. OK, so it will be perl version and DBI version specific, but a little perl script that post-hacks the distributed Makefile, touches the objects so they are not recompiled, should make it relatively OK. Perhaps CPAN would be the natural repository.

Problems with getting DBD-Oracle on Linux are my only bitch with the Oracle/Linux combination. DBD-Oracle everywhere else is a lifesaver, and Oracle/Linux is a lifesaver. Difficulties with OraTclTk don't bug me as much - though it would be nice to get orawish up and running. (Is the wish that Oracle supply extended to include Oracle calls? It does not seem to be! But I cannot think of any but D2000 marketing reasons why not!)

The problem is caused by Linux stuff being all ELF format, but the SCO Oracle being all COFF format. Compilation of mixed-mode binaries is NON-TRIVIAL. (Probably lots of extra LDFLAGS stuff I do not know enough about).

Got somewhere - not the whole way by
mkdir $ORACLE_HOME/libelf $ORACLE_HOME/rdbms/libelf cp $ORACLE_HOME/lib/* $ORACLE_HOME/libelf cp $ORACLE_HOME/rdbms/lib/* $ORACLE_HOME/libelf/*

Then in the libelf directories
Use objcopy -I coff-i386 -O elf32-i386 xyz.o type commands for each object file. Unpack all *.a, objcopy the .o, re-ar. Hack sysliblist.

Then hack to Makefile from DBD-Oracle to use libelf directories rather than lib.

Needs more effort, but then at least you are dealing with ELF rather than COFF (which makes my gcc do the same!)

DBD-Oracle gets made, but coredumps during login.

One of these days I'll be brave and
mv lib libCOFF
mv libelf lib
And recompile the lot as ELF binaries.

p.s. other directories under $ORACLE_HOME have *.a, *.o in lib dirs, these would need moving to.

pps. You must recompile your GNU binutils with the --targets=all option. The standard distributions don't have COFF-grokking in things like nm, objcopy, etc.

-- 
David T. Bath (from home) david.bath_at_nre.vic.gov.au
Phone: +613 9500 0894    Mobile: 015 824 171 (not always on)
Office: Global Consulting Ph:+613 9347 7511    Fax:+613 9347 0182
#include <std_disclaim.h>
Received on Sat Jul 04 1998 - 06:52:31 CEST

Original text of this message