oracle / python-cx_Oracle

Python interface to Oracle Database now superseded by python-oracledb
https://oracle.github.io/python-cx_Oracle
Other
888 stars 361 forks source link

Installing cx_Oracle 64-bit on AIX #381

Closed ngutha closed 4 years ago

ngutha commented 4 years ago

We are getting the below error while installing cx_Oracle using Python pip.

Note: Python, cx_Oracle, Oracle client and AIX ($OBJECT_MODE) are all 64-bit here.

Collecting cx_Oracle
Downloading https://files.pythonhosted.org/packages/...3.0.tar.gz (307kB)
|################################| 317kB 18.1MB/s
Installing collected packages: cx-Oracle
Running setup.py install for cx-Oracle ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dc8n4c28/cx-Oracle/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dc8n4c28/cx-Oracle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ktlmej97/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-dc8n4c28/cx-Oracle/
Complete output (71 lines):
running install
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.AIX.7203.1845.64-3.8
creating build/temp.AIX.7203.1845.64-3.8/src
creating build/temp.AIX.7203.1845.64-3.8/odpi
creating build/temp.AIX.7203.1845.64-3.8/odpi/src
xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -DCXO_BUILD_VERSION=7.3.0 -Iodpi/include -Iodpi/src -I/opt/include/python3.8 -c src/cxoBuffer.c -o build/temp.AIX.7203.1845.64-3.8/src/cxoBuffer.o
.
.
.
xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -DCXO_BUILD_VERSION=7.3.0 -Iodpi/include -Iodpi/src -I/opt/include/python3.8 -c odpi/src/dpiGlobal.c -o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiGlobal.o
"odpi/src/dpiGlobal.c", line 203.1: 1506-943 (W) Attribute "constructor" is not supported on the target platform and is ignored.
xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -DCXO_BUILD_VERSION=7.3.0 -Iodpi/include -Iodpi/src -I/opt/include/python3.8 -c odpi/src/dpiHandleList.c -o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiHandleList.o
.
.
.
xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -DCXO_BUILD_VERSION=7.3.0 -Iodpi/include -Iodpi/src -I/opt/include/python3.8 -c odpi/src/dpiVar.c -o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiVar.o
creating build/lib.AIX.7203.1845.64-3.8
/opt/lib/python3.8/config-3.8/ld_so_aix xlc_r -bI:/opt/lib/python3.8/config-3.8/python.exp build/temp.AIX.7203.1845.64-3.8/src/cxoBuffer.o build/temp.AIX.7203.1845.64-3.8/src/cxoConnection.o build/temp.AIX.7203.1845.64-3.8/src/cxoCursor.o build/temp.AIX.7203.1845.64-3.8/src/cxoDeqOptions.o build/temp.AIX.7203.1845.64-3.8/src/cxoEnqOptions.o build/temp.AIX.7203.1845.64-3.8/src/cxoError.o build/temp.AIX.7203.1845.64-3.8/src/cxoFuture.o build/temp.AIX.7203.1845.64-3.8/src/cxoLob.o build/temp.AIX.7203.1845.64-3.8/src/cxoModule.o build/temp.AIX.7203.1845.64-3.8/src/cxoMsgProps.o build/temp.AIX.7203.1845.64-3.8/src/cxoObject.o build/temp.AIX.7203.1845.64-3.8/src/cxoObjectAttr.o build/temp.AIX.7203.1845.64-3.8/src/cxoObjectType.o build/temp.AIX.7203.1845.64-3.8/src/cxoQueue.o build/temp.AIX.7203.1845.64-3.8/src/cxoSessionPool.o build/temp.AIX.7203.1845.64-3.8/src/cxoSodaCollection.o build/temp.AIX.7203.1845.64-3.8/src/cxoSodaDatabase.o build/temp.AIX.7203.1845.64-3.8/src/cxoSodaDoc.o build/temp.AIX.7203.1845.64-3.8/src/cxoSodaDocCursor.o build/temp.AIX.7203.1845.64-3.8/src/cxoSodaOperation.o build/temp.AIX.7203.1845.64-3.8/src/cxoSubscr.o build/temp.AIX.7203.1845.64-3.8/src/cxoTransform.o build/temp.AIX.7203.1845.64-3.8/src/cxoUtils.o build/temp.AIX.7203.1845.64-3.8/src/cxoVar.o build/temp.AIX.7203.1845.64-3.8/src/cxoVarType.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiConn.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiContext.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiData.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiDebug.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiDeqOptions.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiEnqOptions.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiEnv.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiError.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiGen.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiGlobal.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiHandleList.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiHandlePool.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiLob.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiMsgProps.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiObject.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiObjectAttr.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiObjectType.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiOci.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiOracleType.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiPool.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiQueue.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiRowid.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiSodaColl.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiSodaCollCursor.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiSodaDb.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiSodaDoc.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiSodaDocCursor.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiStmt.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiSubscr.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiUtils.o build/temp.AIX.7203.1845.64-3.8/odpi/src/dpiVar.o -o build/lib.AIX.7203.1845.64-3.8/cx_Oracle.so
ld: 0711-736 ERROR: Input file build/temp.AIX.7203.1845.64-3.8/src/cxoBuffer.o:
XCOFF64 object files are not allowed in 32-bit mode.
error: command '/opt/lib/python3.8/config-3.8/ld_so_aix' failed with exit status 8
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dc8n4c28/cx-Oracle/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dc8n4c28/cx-Oracle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ktlmej97/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Not sure where the version incompatibility issues are arising

anthony-tuininga commented 4 years ago

Does ld_so_aix require the -q64 flag to be passed as well? If you take the command and attempt to add that argument, does it work for you?

ngutha commented 4 years ago

Does ld_so_aix require the -q64 flag to be passed as well? If you take the command and attempt to add that argument, does it work for you?

That has worked. Thanks.

edwardekstrom commented 4 years ago

Does ld_so_aix require the -q64 flag to be passed as well? If you take the command and attempt to add that argument, does it work for you?

Where do you add the -q64 flag?