[Zope-DB] DCOracle2 and Oracle 9i (9.2.0.3) makefile hack

Christian Long clong at info-advan.com
Fri Aug 20 18:09:19 EDT 2004


DCOracle2 upgrade to Oracle 9i (9.2.0.3)
HP-UX B.11.00 U 9000/861/D270
Python 2.2.2

Oracle 8 installs 32-bit libraries in $ORACLE_HOME/lib and 64-bit libraries
in $ORACLE_HOME/lib64
Oracle 9i installs 64-bit libraries in $ORACLE_HOME/lib and 32-bit libraries
in $ORACLE_HOME/lib32
(At least, that was the way the DBA set it up on my box when he did the
upgrade)

This caused DCOracle2 to fail, since it was connecting to the 64-bit version
of libclntsh.sl instead of the 32-bit. libclntsh.sl is the Oracle client
library. On HP-UX, shared libraries have the sl extension. On other
platforms the file is called libclntsh.so

$ORACLE_HOME/lib/libclntsh.sl: Mismatched ABI. 64-bit PA shared library
found in 32-bit link.

I changed the Makefiles & etc. to point to the lib32 folder, and got it to
work.




Here are the steps I used to get DCOracle2 working with Oracle 9i and HP-UX
11.

I used the latest version as of 8/19/04, which is available from Zope CVS
here: http://cvs.zope.org/Products/DCOracle2/DCOracle2.tar.gz?tarball=1.
Note that I am not using Zope. I'm just using DCOracle2 to connect my
application (written in Python) to Oracle 9i

Starting with the downloaded gzipped tarball, which I put in a directory
called /tmp/mra_depots

# Unpack and expand
gunzip DCOracle.tar.gz
tar -xvf DCOracle2.tar
cd DCOracle2

# Find and replace occurences of .so with .sl to match HP-UX
# naming conventions.  See README-HP-UX file included
# in the distribution.  Also, replace references to
#  $ORACLE_HOME/lib with  $ORACLE_HOME/lib32
vi Makefile
:%s/\.so/.sl/gc
:wq
vi src/testora
:%s/\.so/.sl/gc
:%s/\$ORACLE_HOME\/lib/$ORACLE_HOME\/lib32/gc
:wq
vi src/Setup.in.dco
:%s/\/lib/\/lib32/gc
:wq
vi proof/Makefile
:%s/\/lib/\/lib32/gc
:wq
vi setup.py
:%s/"lib"/"lib32"/gc
:wq

# Now, build the DCOracle adapter and move it to the Python
# folder.    NOTE: After the build, the
# original DCOracle2 folder contains another DCOracle2 folder.
# MOVE THE INNERMOST DCOracle2 folder, NOT THE OUTER ONE!
make
rm  -r /usr/local/lib/python2.2/DCOracle2
mv /tmp/mra_depots/DCOracle2/DCOracle2 /usr/local/lib/python2.2


Success!




More information about the Zope-DB mailing list