cx_Oracle on cygwin
Andy Todd
andy47 at halfcooked.com
Tue Feb 5 21:55:40 EST 2002
Has anyone successfully compiled cx_Oracle (2.4) under cygwin again
Oracle 8.1.7 running on Windows 2000?
I've grabbed the source package from Anthony's web site and am running
into a few 'opportunities'. To save me from removing what little hair
I've got left I wondered if anyone else has successfully done this before
me?
My problem is (I believe) that I need to tweak the setup.py but I have
absolutely no knowledge of make and its falling over trying to find the
right libraries.
Out of the box 'python setup.py build' doesn't work because it assumes I
am on Unix and looks for the Unix specific Oracle client library clntsh.
To get round this hiccup I've changed the setup.py so that it uses the
same arguments for cygwin as it does for Windows. To do this I changed
line 13 from;
if sys.platform == "win32":
to;
if sys.platform == "win32" or sys.plaform == "cygwin":
Now everything is fine until we reach this stage;
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.3.9-i686-
2.2/cx_Oracle.o -L/Tools/Lib -L/usr/lib/python2.2/config -loci -
lpython2.2 -o build/lib.cygwin-1.3.9-i686-2.2/cx_Oracle.dll -s
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-
cygwin/bin/ld: cannot find -loci
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Reading 'man' for gcc this *seems* to be a problem because the linker is
looking for a file called liboci.a which, naturally, doesn't exist under
windows. I think I should be linking to oci.dll, but I don't know enough
to be sure.
Any suggestions, pointers or re-education would be most welcome.
Andy
--
Contents free posts a speciality
More information about the Python-list
mailing list