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

AIX compilation without xlc_r #333

Closed pnkjsurya closed 5 years ago

pnkjsurya commented 5 years ago

205 # For general questions:

This is for AIX version 7.2 environment , can we install cx_oracle without using xlc_r? which other c compiler we can use ?

  1. What is your version of Python? Is it 32-bit or 64-bit? Python 3.7 64 bit

  2. What is your cx_Oracle version? 7.2

  3. What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as? Command = python -m pip install cx_Oracle login as SUDO user.

  4. What error(s) you are seeing? Building wheels for collected packages: cx-Oracle Building wheel for cx-Oracle (setup.py) ... 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-j00f7yyf/cx-Oracle/setup.py'"'"'; file='"'"'/tmp/pi p-install-j00f7yyf/cx-Oracle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', o pen)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exe c(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2rew81 75 --python-tag cp37 cwd: /tmp/pip-install-j00f7yyf/cx-Oracle/ Complete output (12 lines): running bdist_wheel running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.aix-7.2-3.7 creating build/temp.aix-7.2-3.7/src creating build/temp.aix-7.2-3.7/odpi creating build/temp.aix-7.2-3.7/odpi/src xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/inclu de -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -DCXO_BUILD_VERSION=7.2.0 -Iodpi/include -Io dpi/src -I/opt/include/python3.7m -c src/cxoBuffer.c -o build/temp.aix-7.2-3.7/s rc/cxoBuffer.o unable to execute 'xlc_r': No such file or directory error: command 'xlc_r' failed with exit status 1

    ERROR: Failed building wheel for cx-Oracle Running setup.py clean for cx-Oracle Failed to build cx-Oracle 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-j00f7yyf/cx-Oracle/setup.py'"'"'; file='"'"'/tmp/ pip-install-j00f7yyf/cx-Oracle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();e xec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-o nqsvmbe/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-j00f7yyf/cx-Oracle/ Complete output (12 lines): running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.aix-7.2-3.7 creating build/temp.aix-7.2-3.7/src creating build/temp.aix-7.2-3.7/odpi creating build/temp.aix-7.2-3.7/odpi/src xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/inc lude -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -DCXO_BUILD_VERSION=7.2.0 -Iodpi/include - Iodpi/src -I/opt/include/python3.7m -c src/cxoBuffer.c -o build/temp.aix-7.2-3.7 /src/cxoBuffer.o unable to execute 'xlc_r': No such file or directory error: command 'xlc_r' failed with exit status 1

    ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys , setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j00f7yyf/cx-Oracle/s etup.py'"'"'; file='"'"'/tmp/pip-install-j00f7yyf/cx-Oracle/setup.py'"'"';f= getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\ n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' i nstall --record /tmp/pip-record-onqsvmbe/install-record.txt --single-version-ext ernally-managed --compile Check the logs for full command output.

  5. What OS (and version) is Python executing on? AIX 7.2

  6. What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where is it installed? full Oracle client 12.2

  7. What is your Oracle Database version? 12.2

  8. What is the PATH environment variable (on Windows) or LD_LIBRARY_PATH (on Linux) set to? On macOS, what is in ~/lib? /app/u01/app/oracle/product/12.2.0/client_1/lib

  9. What Oracle environment variables did you set? How exactly did you set them? ORACLE_HOME,LD_LIBRARY_PATH both are part of .profile

  10. Do you have a small, single Python script that immediately runs to show us the problem? no

anthony-tuininga commented 5 years ago

You can use the gcc compiler if you do not have the xlc_r compiler available. I have only infrequently used AIX over the last 25+ years so cannot help more than that!

pnkjsurya commented 5 years ago

Thanks, Tried that, unfortunately my AIX admin does not allow use of gcc compiler. and installed trail version of xlc_r compiler for us.