Re: Python and Oracle

From: Paul Boddie <pboddie_at_aisws7.cern.ch>
Date: 1998/04/29
Message-ID: <6i73se$qfd$1_at_sunnews.cern.ch>#1/1


Howard S. Modell (howard.s.modell_at_boeing.com) wrote:
: Is there a truly current Oracle UI from python? I've fetched and looked
: at both "oramod" and "oracledb 0.1.3" from the CONTRIBs area of the
: ftp site, and neither one is "current".
 

: Oracledb comes close, although it was last built against Solaris Oracle 7.2.2.3
: and I have 7.2.3. However, it was also last built against python 1.4.

I have successfully managed to build oracledb-0.1.3 with Python 1.5.1 and the Oracle 7.3.3 libraries.

: When I try to build it, following the instructions in the README, I get
: a whole slew of unresolveds, most from python, even though I pointed it
: carefully at my 1.5.1 installation.

Firstly, it was advised (not so long ago) to use the Makefile.pre.in method to generate a Makefile. Someone (possibly Jim Fulton) posted some Makefile.pre.in and Setup files which worked for me, but I won't post them here and incur the wrath of people who don't want to "download" them, so if you want these files then please don't hesitate to ask. Perhaps they could be included in the distribution if they aren't there already.

: here's a small sample from the start of the "unresolved's list":
: $ make oracledb
: cc oracledb.o -o oracledb
: Undefined first referenced
: symbol in file
: PySequence_GetItem oracledb.o

[...]

: Can someone advise me here on how to get this to build?
: [I can supply the makefile on request]

It looks as if you are rather light on compilation/linking options. Again, if you get hold of Makefile.pre.in, then I think that the Python libraries will be found for you. However, you will still need to tune the Oracle-specific compilation/linking options. I found that the Setup file needed to mention a few libraries and paths, but you can be thankful that for Oracle 7.3.3 at least the process has become a lot easier than for 7.1. You'll need something like this mentioned in the Setup file (under Solaris 2.5.x).

-L$(ORACLE_HOME)/lib -R$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/network/lib \

        /usr/lib/libm.a $(ORACLE_HOME)/lib/osntab.o -lclntsh -lsunmath

--
Paul Boddie			Paul.Boddie_at_cern.ch
| http://assuwww.cern.ch/~pboddie
| Any views expressed above are personal and not necessarily
| shared by my employer or my associates.
Received on Wed Apr 29 1998 - 00:00:00 CEST

Original text of this message