[cx-oracle-users] Symbol reference error: OCIHandleFree - REPOST
Brought to you by:
atuining
From: Chimezie O. <chi...@gm...> - 2005-10-27 20:58:38
|
I appologize for the repost, but I realized my original subject line was incorrectly specified (OCI-22054 error using cx_Oracle) and probably would have the email show up under a defunct thread and not at the top level: I've been struggling for some time to find an easy (non-convoluted) way to connect to Oracle 8,9, and 10g databases consistently from a Solaris 8 MP box. For some time I had been using DataDirects Oracle Wire Protocol drivers with UNIX ODBC and egenix's mxODBC. However, DataDirect's drivers (which do not require an Oracle Client install - which is the most attractive thing about them) have since exceeded my evaluation period, so I'm giving cx_Oracle a shot. Following directions from this thread (http://sourceforge.net/mailarchive/forum.php?thread_id=3D8719369&forum_id= =3D34464), I've installed the the Oracle Instant Client, installed the SDK package, modified the setup.py of cx_Oracle and was able to run python setup.py install w/out any errors: bash-2.03$ python setup.py install running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.solaris-2.8-sun4u-2.4 gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/OracleClient/rdbms/demo -I/usr/local/OracleClient/rdbms/public -I/usr/local/OracleClient/network/public -I/usr/local/OracleClient/sdk/include -I/usr/local/include/python2.4 -c cx_Oracle.c -o build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -DBUILD_TIME=3D"October 27, 2005 10:01:17" In file included from /usr/local/OracleClient/sdk/include/oci.h:2327, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/oci1.h:148: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/ociap.h:206, from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/nzt.h:674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2665: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2684: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2693: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2702: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2711: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2719: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2729: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2736: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2744: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/ociap.h:9952: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/ociap.h:9958: warning: function declaration isn't a prototype In file included from Variable.c:93, from Cursor.c:211, from Connection.c:303, from SessionPool.c:132, from cx_Oracle.c:73: DateTimeVar.c: In function `DateTimeVar_SetValue': DateTimeVar.c:81: warning: unused variable `status' creating build/lib.solaris-2.8-sun4u-2.4 gcc -shared build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -L/usr/local/OracleClient/lib -L/usr/local/OracleClient -lclntsh -o build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -s running install_lib copying build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -> /usr/local/lib/python2.4/site-packages However, when I try to run any of the tests (or just try to import the newly installed cx_Oracle) I get the following symbol reference error: bash-2.03$ python test/test.py Traceback (most recent call last): File "test/test.py", line 3, in ? import cx_Oracle ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/lib/python2.4/site-packages/cx_Oracle.so: symbol OCIHandleFree: referenced symbol not found I wouldn't expect the build process to complete if there were symbol reference issues, but I have the Instant Client binaries installed in /usr/local/OracleClient , the sdk package installed in /usr/local/OracleClient/sdk, my ORACLE_HOME variable points to /usr/local/OracleClient, and LD_LIBRARY_PATH includes /usr/local/OracleClient: bash-2.03$ env | grep LD_LIBRARY_PATH LD_LIBRARY_PATH=3D/programs/lsf/6.0/sparc-sol7-64/lib:/usr/dt/lib:/vol/orac= le/product/7.3.2/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/= lib:/usr/local/mysql/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pg= sql/lib:/usr/local/OracleClient bash-2.03$ env | grep ORACLE_HOME ORACLE_HOME=3D/usr/local/OracleClient I'm not sure why it's unable to resolve the symbol. Any help would be greatly appreciated Chimezie |