Thread: [cx-oracle-users] cx_Oracle 4.1, Oracle 10.2 in Solaris
Brought to you by:
atuining
From: Mikel L. <mla...@co...> - 2005-12-16 10:48:04
|
Hi: I'm trying to build cx_Oracle 4.1 from source in a sun solaris computer using GCC 3.4.2 and Python 2.3.5 but I receive an error regarding "-lclntsh". I reproduce the error below. My environment variables look like these: bash-2.03$ uname -a SunOS arqfotos 5.8 Generic_117350-27 sun4u sparc SUNW,Sun-Fire-280R bash-2.03$ echo $ORACLE_HOME /home1/programas/oracle/oracle/product/10.2.0/db_1 bash-2.03$ echo $LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/local/lib/sparcv9:/home1/programas/oracle/oracle/product/10.2.0/db_1/lib But when building I get this error. bash-2.03$ /home1/zope/python/235/bin/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.3 gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/demo -I/home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public -I/home1/programas/oracle/oracle/product/10.2.0/db_1/network/public -I/home1/zope/python/235/include/python2.3 -c cx_Oracle.c -o build/temp.solaris-2.8-sun4u-2.3/cx_Oracle.o -DBUILD_TIME="December 16, 2005 10:56:13" In file included from /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci.h:2651, from cx_Oracle.c:9: /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci1.h:148: warning: function declaration isn't a prototype In file included from /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/ociap.h:225, from /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci.h:2675, from cx_Oracle.c:9: /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:676: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2667: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2676: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2686: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2695: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2704: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2713: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2721: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2731: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2738: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:2746: warning: function declaration isn't a prototype In file included from /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci.h:2675, from cx_Oracle.c:9: /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/ociap.h:10068: warning: function declaration isn't a prototype /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/ociap.h:10074: warning: function declaration isn't a prototype creating build/lib.solaris-2.8-sun4u-2.3 gcc -shared build/temp.solaris-2.8-sun4u-2.3/cx_Oracle.o -L/home1/programas/oracle/oracle/product/10.2.0/db_1/lib -lclntsh -o build/lib.solaris-2.8-sun4u-2.3/cx_Oracle.so -s /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../../sparc-sun-solaris2.8/bin/ld: skipping incompatible /home1/programas/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so when searching for -lclntsh /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../../sparc-sun-solaris2.8/bin/ld: cannot find -lclntsh collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 bash-2.03$ Any idea of what can happen? Thank you in advance, Mikel -- Mikel Larreategi mla...@co... CodeSyntax Azitaingo Industrialdea 3 K E-20600 Eibar Tel: (+34) 943 82 17 80 |
From: Anthony T. <ant...@gm...> - 2005-12-16 14:39:30
|
You'll need to find that library. Its normally located in $ORACLE_HOME/lib but if you are using the Oracle instant client that can be found elsewhere. I have patches to setup.py that deal with some of these issues but they are quite simple for you to make as well. Locate the shared library and change the line that specifies "libDirs =3D " and then run setup.py again. The alternative is to simply copy the command line that failed and modify it to include the -L directive. Hope that helps. On 12/16/05, Mikel Larreategi <mla...@co...> wrote: > Hi: > > I'm trying to build cx_Oracle 4.1 from source in a sun solaris computer > using GCC 3.4.2 and Python 2.3.5 but I receive an error regarding > "-lclntsh". I reproduce the error below. > > My environment variables look like these: > > bash-2.03$ uname -a > SunOS arqfotos 5.8 Generic_117350-27 sun4u sparc SUNW,Sun-Fire-280R > > bash-2.03$ echo $ORACLE_HOME > /home1/programas/oracle/oracle/product/10.2.0/db_1 > > bash-2.03$ echo $LD_LIBRARY_PATH > /usr/lib:/usr/local/lib:/usr/local/lib/sparcv9:/home1/programas/oracle/or= acle/product/10.2.0/db_1/lib > > But when building I get this error. > > bash-2.03$ /home1/zope/python/235/bin/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.3 > gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -I/home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/demo > -I/home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public > -I/home1/programas/oracle/oracle/product/10.2.0/db_1/network/public > -I/home1/zope/python/235/include/python2.3 -c cx_Oracle.c -o > build/temp.solaris-2.8-sun4u-2.3/cx_Oracle.o -DBUILD_TIME=3D"December 16, > 2005 10:56:13" > In file included from > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci.h:265= 1, > from cx_Oracle.c:9: > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci1.h:14= 8: > warning: function declaration isn't a prototype > In file included from > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/ociap.h:2= 25, > > from > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci.h:267= 5, > from cx_Oracle.c:9: > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:676= : > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:266= 7: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:267= 6: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:268= 6: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:269= 5: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:270= 4: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:271= 3: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:272= 1: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:273= 1: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:273= 8: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/nzt.h:274= 6: > warning: function declaration isn't a prototype > In file included from > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/oci.h:267= 5, > from cx_Oracle.c:9: > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/ociap.h:1= 0068: > warning: function declaration isn't a prototype > /home1/programas/oracle/oracle/product/10.2.0/db_1/rdbms/public/ociap.h:1= 0074: > warning: function declaration isn't a prototype > creating build/lib.solaris-2.8-sun4u-2.3 > gcc -shared build/temp.solaris-2.8-sun4u-2.3/cx_Oracle.o > -L/home1/programas/oracle/oracle/product/10.2.0/db_1/lib -lclntsh -o > build/lib.solaris-2.8-sun4u-2.3/cx_Oracle.so -s > /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../../sparc-sun-solar= is2.8/bin/ld: > skipping incompatible > /home1/programas/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so when > searching for -lclntsh > /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../../sparc-sun-solar= is2.8/bin/ld: > cannot find -lclntsh > collect2: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > bash-2.03$ > > > Any idea of what can happen? > > Thank you in advance, > > Mikel > > > -- > Mikel Larreategi > mla...@co... > > CodeSyntax > Azitaingo Industrialdea 3 K > E-20600 Eibar > Tel: (+34) 943 82 17 80 > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mikel L. <mla...@co...> - 2005-12-16 15:15:15
|
Anthony Tuininga wrote: > You'll need to find that library. Its normally located in > $ORACLE_HOME/lib but if you are using the Oracle instant client that > can be found elsewhere. I have patches to setup.py that deal with some > of these issues but they are quite simple for you to make as well. > Locate the shared library and change the line that specifies "libDirs > = " and then run setup.py again. The alternative is to simply copy the > command line that failed and modify it to include the -L directive. > Hope that helps. Well, the library is indeed at $ORACLE_HOME/lib although it's a symlink to libclntsh.so.10.1 I've found another libclntsh.so at $ORACLE_HOME/lib32 and pointing libDirs to it, cx_Oracle was built correctly and after putting it in the LD_LIBRARY_PATH works correctly form Python. Thank you for your help -- Mikel Larreategi mla...@co... CodeSyntax Azitaingo Industrialdea 3 K E-20600 Eibar Tel: (+34) 943 82 17 80 |
From: Anthony T. <ant...@gm...> - 2005-12-16 16:32:19
|
Glad to be of help. The symlink should not be an issue so it would appear that you are running 32-bit Python and the default Oracle install is 64-bit. On 12/16/05, Mikel Larreategi <mla...@co...> wrote: > Anthony Tuininga wrote: > > You'll need to find that library. Its normally located in > > $ORACLE_HOME/lib but if you are using the Oracle instant client that > > can be found elsewhere. I have patches to setup.py that deal with some > > of these issues but they are quite simple for you to make as well. > > Locate the shared library and change the line that specifies "libDirs > > =3D " and then run setup.py again. The alternative is to simply copy th= e > > command line that failed and modify it to include the -L directive. > > Hope that helps. > > Well, the library is indeed at $ORACLE_HOME/lib although it's a symlink > to libclntsh.so.10.1 > > I've found another libclntsh.so at $ORACLE_HOME/lib32 and pointing > libDirs to it, cx_Oracle was built correctly and after putting it in the > LD_LIBRARY_PATH works correctly form Python. > > Thank you for your help > > -- > Mikel Larreategi > mla...@co... > > CodeSyntax > Azitaingo Industrialdea 3 K > E-20600 Eibar > Tel: (+34) 943 82 17 80 > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |