python / cpython

The Python programming language
https://www.python.org
Other
63.37k stars 30.33k forks source link

Python module cx_Oracle ld installation issue on Solaris11U3 SPARC: fatal: file /oracle/database/lib/libclntsh.so: wrong ELF class: ELFCLASS64 error #74639

Closed 2b3878b5-053c-472c-8a28-71adbe60c1b6 closed 7 years ago

2b3878b5-053c-472c-8a28-71adbe60c1b6 commented 7 years ago
BPO 30454
Nosy @berkerpeksag

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = created_at = labels = ['build', 'expert-installation'] title = 'Python module cx_Oracle ld installation issue on Solaris11U3 SPARC: fatal: file /oracle/database/lib/libclntsh.so: wrong ELF class: ELFCLASS64 error' updated_at = user = 'https://bugs.python.org/sameernatekar' ``` bugs.python.org fields: ```python activity = actor = 'berker.peksag' assignee = 'none' closed = True closed_date = closer = 'berker.peksag' components = ['Installation'] creation = creator = 'sameernatekar' dependencies = [] files = [] hgrepos = [] issue_num = 30454 keywords = [] message_count = 2.0 messages = ['294344', '298922'] nosy_count = 2.0 nosy_names = ['berker.peksag', 'sameernatekar'] pr_nums = [] priority = 'normal' resolution = 'third party' stage = 'resolved' status = 'closed' superseder = None type = 'compile error' url = 'https://bugs.python.org/issue30454' versions = ['Python 2.7'] ```

2b3878b5-053c-472c-8a28-71adbe60c1b6 commented 7 years ago

Trying to install cx_Oracle on Solaris11U3 but getting ld: fatal: file /oracle/database/lib/libclntsh.so: wrong ELF class: ELFCLASS64 error

# python setup.py build running build running build_ext building 'cx_Oracle' extension cc -DNDEBUG -KPIC -DPIC -I/oracle/database/rdbms/demo -I/oracle/database/rdbms/public -I/usr/include/python2.7 -c cx_Oracle.c -o build/temp.solaris-2.11-sun4v.32bit-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.2.1 "SessionPool.c", line 202: warning: integer overflow detected: op "\<\<" cc -G build/temp.solaris-2.11-sun4v.32bit-2.7-11g/cx_Oracle.o -L/oracle/database/lib -L/usr/lib -lclntsh -lpython2.7 -o build/lib.solaris-2.11-sun4v.32bit-2.7-11g/cx_Oracle.so ld: fatal: file /oracle/database/lib/libclntsh.so: wrong ELF class: ELFCLASS64 error: command 'cc' failed with exit status 2

Tried all available information on the internet: Installed gcc Installed solarisstudio12.4 Installed instantclient-basic-solaris.sparc64-12.2.0.1.0, instantclient-odbc-solaris.sparc64-12.2.0.1.0 Set LD_LIBRARY_PATH to oracle home directory:instantclient_12_2/

Same issue seen while installing DBD:Oracle perl module.

berkerpeksag commented 7 years ago

cx_Oracle is not part of the Python standard library and according to https://community.oracle.com/thread/4048639 the solution is to install it from Solaris' package repository.