import cx_Oracle fails!

D

Daniel

Hello from Brazil :)

I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11
(suckz) and Oracle 10.1.0 64bits without success

I've already tryied the suggestions from Bernard Delmée and Martin v.
Löwis (topic "Python 2.3b1 + cx_oracle 3.0 on HP-UX"), but it didn't
work, even when I recompiled Python with the "-lc -lpthread" options.
The result was:
/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Failed to load
/usr/local/lib/python2.4/site-packages/cx_Oracle.sl
Any other suggestion?

Thank you all in advance!
 
P

Paul D. Lusk

Hello from Brazil :)

I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11
(suckz) and Oracle 10.1.0 64bits without success

I've already tryied the suggestions from Bernard Delmée and Martin v.
Löwis (topic "Python 2.3b1 + cx_oracle 3.0 on HP-UX"), but it didn't
work, even when I recompiled Python with the "-lc -lpthread" options.
The result was:

/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Failed to load
/usr/local/lib/python2.4/site-packages/cx_Oracle.sl

Any other suggestion?

Thank you all in advance!

I got similar errors when first trying to use DCOracle2 on HPUX.

The solution that worked here is:

./configure --with-libs='-lcl'

Try that, if you haven't already.
 
D

Daniel

And, completing my answer, I'm sending you all how I finally got the
Python 2.4.1 and cx_Oracle-4.1 running on my HP-UX (sukz) box:

Box: HP-UX B.11.11

Compiling Python 2.4.1 with gcc 3.4.3
=====================================

../configure --with-libs='-lcl'

Added Makefile options:
CC= gcc -lc -lpthread

Changes on pyconfig.h:
Turn "#define _POSIX_THREADS" on


Compiling cx_Oracle-4.1:
=======================

Make sure to setup Oracle variables:

setenv ORACLE_HOME /oracle10/product/10.1.0
setenv ORACLE_BASE /oracle10
setenv TMPDIR /var/tmp
setenv PATH ${PATH}:$ORACLE_HOME/bin
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib32
setenv SHLIB_PATH $ORACLE_HOME/lib32
setenv TNS_ADMIN $ORACLE_HOME/network/admin

Changes on setup.py:
from: libPath = os.path.join(oracleHome, "lib")
to: libPath = os.path.join(oracleHome, "lib32")


And finally:

$ python
Python 2.4.1 (#20, May 18 2005, 20:33:21)
[GCC 3.4.3] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.['BINARY', 'BLOB', 'CLOB', 'CURSOR', 'Connection', 'Cursor',
'DATETIME', 'DataError', 'DatabaseError', 'Date', 'DateFromTicks',
'Error', 'FIXED_CHAR', 'FNCODE_BINDBYNAME', 'FNCODE_BINDBYPOS',
'FNCODE_DEFINEBYPOS', 'FNCODE_STMTEXECUTE', 'FNCODE_STMTFETCH',
'FNCODE_STMTPREPARE', 'IntegrityError', 'InterfaceError',
'InternalError', 'LOB', 'LONG_BINARY', 'LONG_STRING', 'NUMBER',
'NotSupportedError', 'OperationalError', 'ProgrammingError', 'ROWID',
'STRING', 'SYSDBA', 'SYSOPER', 'SessionPool', 'TIMESTAMP', 'Time',
'TimeFromTicks', 'Timestamp', 'TimestampFromTicks', 'UCBTYPE_ENTRY',
'UCBTYPE_EXIT', 'UCBTYPE_REPLACE', 'Warning', '__doc__', '__file__',
'__name__', 'apilevel', 'buildtime', 'connect', 'makedsn',
'paramstyle', 'threadsafety', 'version']
 
?

=?ISO-8859-1?Q?Bernard_Delm=E9e?=

Hi Daniel,

is your processor Itanium or PA? I am having a hard time
getting cx_oracle (4.1) and python (2.3.5) to cooperate on
an HP-UX 11.23 server (I see you're running 11.11).

I can compile both packages with gcc 3.4.3 either in 32-bit
(apparently the default) or 64-bit (-mlp64 gcc flag) but python
refuses to load the cx_oracle.sl shared lib...

Bernard.
 
D

Daniel

Hi Bernard

My system is a PA 8K series with 4096 MB and 2 processors, running 64
bit mode OS.

I only created the recipe above after 1 week of mistakes :), but I
don't know if it will work with your branch of patches @ 11.23 version.


I really hate HP-UX >-(, god bless BSD!!! :-D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,332
Latest member
LeesaButts

Latest Threads

Top