Re: Installing cx_Oracle on AIX without using "xlc_r"

Ivanelson Nunes <[email protected]>
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <CAARDrhPj7K7hVNCByyqj1O0D3sWvC7C8QZp9wqq0bn5vjsEV3Q@mail.gmail.com>
I did a test on another server with AIX as well. Python-2.7.6.tgz
downloaded a version compiled and manual.

./configure --prefix=/usr/lib/Python-2.7.6
> make
> make install
> chmod -R 777 /opt/local/


Python it works:

bash-4.2$ /usr/lib/Python-2.7.3/bin/python
> Python 2.7.6 (default, Nov 27 2013, 09:49:44)
> [GCC 4.2.3] on aix6
> Type "help", "copyright", "credits" or "license" for more information.
> >>>


But installing cx_Oracle continues on failure:

bash-4.2$ /usr/lib/Python-2.7.3/bin/python setup.py install
> running install
> running build
> running build_ext
> building 'cx_Oracle' extension
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYSV -D_AIX
> -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61
> -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include
> -I/u1/oratez/app/oracle/product/11.2.0/dbhome_1/rdbms/demo
> -I/u1/oratez/app/oracle/product/11.2.0/dbhome_1/rdbms/public
> -I/usr/lib/Python-2.7.3/include/python2.7 -c cx_Oracle.c -o
> build/temp.aix-6.1-2.7-10g/cx_Oracle.o -DBUILD_VERSION=5.1.2
> In file included from
> /u1/oratez/app/oracle/product/11.2.0/dbhome_1/rdbms/public/oci.h:3024,
>                  from cx_Oracle.c:10:
> /u1/oratez/app/oracle/product/11.2.0/dbhome_1/rdbms/public/ociap.h:10788:
> warning: function declaration isn't a prototype
> /u1/oratez/app/oracle/product/11.2.0/dbhome_1/rdbms/public/ociap.h:10794:
> warning: function declaration isn't a prototype
> ./Modules/ld_so_aix gcc -pthread -bI:./Modules/python.exp
> -L/opt/freeware/lib64 -L/opt/freeware/lib
> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> -Wl,-bmaxdata:0x80000000 -L/opt/freeware/lib64 -L/opt/freeware/lib
> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> -Wl,-bmaxdata:0x80000000 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51
> -D_AIX52 -D_AIX53 -D_AIX61 -D_ALL_SOURCE -DFUNCPROTO=15 -O
> -I/opt/freeware/include build/temp.aix-6.1-2.7-10g/cx_Oracle.o
> -L/u1/oratez/app/oracle/product/11.2.0/dbhome_1/lib -lclntsh -o
> build/lib.aix-6.1-2.7-10g/cx_Oracle.so
> unable to execute ./Modules/ld_so_aix: No such file or directory
> error: command './Modules/ld_so_aix' failed with exit status 1



@ivanelson
[]s


2013/11/27 Kristian Berg <[email protected]>

>  On 27.11.2013 12:13, Ivanelson Nunes wrote:
>
> My only way out is to buy the xlc? If someone to build and compiled in the
> format aix_ppc cx_Oracle?
>
>
> No, you can compile cx_Oracle with gcc, but you have to use a Python binary compiled with gcc to achieve that. When Python is built on aix, it also creates a wrapper for compiling C modules that can be called from Python. This is the ld_so_aix program. If you compile python with xlc, the wrapper will be created with xlc as the compiler and linker. If you compile python with gcc, it will create a wrapper using gcc. You can't use a xlc-compiled python to create gcc-compiled modules. So you either have to rebuild python with gcc and then compile cx_oracle or you have to get xlc to compile cx_oracle. Now, you can get a free trial of xlc for aix on ibm's website. Maybe that's sufficient to create a rpm you can reuse, but make sure to check the licensing terms of the trial before doing so.
>
> --
> [Kristian Berg]
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> cx-oracle-users mailing list
> cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.