%S[%m]%s %~ %# python setup.py build
building 'cx_Oracle' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/oracle/11.2/client -I/usr/include/python2.4 -c cx_Oracle.c -o build/temp.linux-x86_64-2.4-11g/cx_Oracle.o -DBUILD_VERSION=5.0.3
cx_Oracle.c:6:20: error: Python.h: No such file or directory
cx_Oracle.c:7:22: error: datetime.h: No such file or directory
cx_Oracle.c:8:26: error: structmember.h: No such file or directory
In file included from cx_Oracle.c:97:
StringUtils.c:62: error: expected declaration specifiers or ... before PyObject
StringUtils.c: In function StringBuffer_FromUnicode:
StringUtils.c:64: error: obj undeclared (first use in this function)
StringUtils.c:64: error: (Each undeclared identifier is reported only once
StringUtils.c:64: error: for each function it appears in.)
StringUtils.c:76: warning: cast to pointer from integer of different size
StringUtils.c: At top level:
Yes, that's easy. You need the Python development files to successfully compile cx_Oracle (it's asking for Python.h). In Ubuntu its name is python-dev but I don't really know the name for that same package in your distro of choice.
I have to agree with cj to start looking on that side first (23 vs 64 bits). I have that kind of problems (missing ld libraries, nothing that a few symlinks couldn't solve) with instant client but with an standard client it has always been straightforward.
As an additional help check out the setup.py file from cx_Oracle. It tells you exactly where it is looking for the oracle home or ld library path (it uses the os.environ but sometimes it appens an extra path).