[DB-SIG] Building DCOracle-1.3.2 on AIX 4.3.2 with Oracle 734

Tom Bryan tbryan@starship.python.net
Sat, 4 Nov 2000 15:46:42 -0800 (PST)

On Sat, 4 Nov 2000, Gerhard Gonter wrote:

> On Fri, 3 Nov 2000, Turney, James wrote:
> > I am trying to build the DCOracle-1.3.2 package on AIX 4.3.2 using the AIX
> > compiler and Oracle 7.3.4.  Has anyone got this to work. 
> > It seems to be having trouble linking (lots of what looks like python
> > related unresolved symbol)
> I sucessfully compiled DCOoracle 1.3.0 on AIX 4.2.1 with Oracle 8.0.5
> in a brute force attack, that is, I used a Perl script (sorry, I'm not
> fluent enough with Python) that tried different combinations of library
> arrangements for a whole night.  The shared object is now in daily use,
> so it seems to work.  If someone is interested in that script, drop me
> a line.

I think I sent a notice to petrilli last year, but the README for
DCOracle's build says

  Debugging Setup files

    Linking Oracle programs requires linking against many libraries
    and libraries must often be linked multiple times.  The libraries
    that must be linked and their order varies from one revision of
    Oracle to another and from platform to platform.

I redid my division's makefiles at work (we were changing compilers and
upgrading to Oracle 8i) last year.  I found (after hours of tracing 
through Oracle's make macros and hours of digging through Oracle's
website) that the link flags for Oracle can be reduced to 


Basically, they took all of the object files used to build all of those
libraries that have to be linked multiple times and linked them into a
single shared libclntsh.so.  I think that the library lives in
$ORACLE_HOME/lib, and you'll have to make sure that it's in your
LD_LIBRARY_PATH.  Since DCOracle is designed for use as a shared object, I
strongly recommend using the -lclntsh flag.  It really simplifies life.  I
still don't understand why Oracle doesn't "advertise" the libclntsh.so
method of linking.  See, for example,

By the way, you'll probably need to add a few extra OS libraries that
-lclntsh might need.  For example, at work we use the following link line
for Pro*C/C++ programs on Compaq's Tru64 UNIX:

-lclntsh -lexc -lmld -lrt -laio_raw -lm -lpthread

Resolving unfound symbols in /usr/lib is much easier than doing it in
Oracle's library directories.  When I get to work on Monday, I can
doublecheck the setup file that I used for DCOracle, but it used something
like the above link line.

It's incredible what you can get away with if you have enough market
share. :)