[Zope] Installing DCOracle2 in AIX 5.1

Debojit Hazarika debojit.hazarika at db.com
Fri Nov 19 05:27:47 EST 2004



The libclntsh.a file does exist in $ORACLE_HOME/lib.

The problem here is when i try to build the "dco2.so" pointing $ORACLE_HOME to an oracle 8 installation with the below command it builds the "dco2.so" file successfully.

/myapp/python/lib/python2.1/ld_so_aix gcc -bI:/myapp/python/lib/python2.1/python.exp build/temp.aix-5.1-2.1/dco2.o -L$ORACLE_HOME/lib -lclntsh -o build/lib.aix-5.1-2.1/dco2.so

But when i try to build th"e dco2.so" pointing $ORACLE_HOME to an oracle 9 installation i end up getting the following errors:

/myapp/python/lib/python2.1/ld_so_aix gcc -bI:/myapp/python/lib/python2.1/python.exp build/temp.aix-5.1-2.1/dco2.o -L$ORACLE_HOME/lib -lclntsh -o build/lib.aix-5.1-2.1/dco2.so
ld: 0711-317 ERROR: Undefined symbol: .OCIErrorGet
ld: 0711-317 ERROR: Undefined symbol: .OCIEnvCreate
ld: 0711-317 ERROR: Undefined symbol: .OCIHandleAlloc
ld: 0711-317 ERROR: Undefined symbol: .OCIServerAttach
...............................................
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status

Any idea why i am getting this error?

However i don't have the "libclntsh.so" file in $ORACLE_HOME/lib,     is that the reason???
If so how to get this "libclntsh.so" file?

Can anyone please suggest some hints on this.

Many thanks,

Regards
Deb



                                                                                                                                                   
                      Taewook Kang                                                                                                                 
                      <twkang at gmail.com        To:       Debojit Hazarika/Zentrale/DeuBaExt at Zentrale                                               
                      >                        cc:                                                                                                 
                                               Subject:  Re: [Zope] Installing DCOracle2 in AIX 5.1                                                
                      19/11/04 13:40                                                                                                               
                      Please respond to                                                                                                            
                      Taewook Kang                                                                                                                 
                                                                                                                                                   
                                                                                                                                                   




How about checking existence of libclntsh.a in $ORACLE_HOME/lib?
or if You have 64bit oracle, and 32 bit python compiled by gcc,
it might be matters.

Anyway, those not-found symbols are in libclntsh.a,
and you need that file for linking. :)

Good luck

On Fri, 19 Nov 2004 12:43:30 +0530, Debojit Hazarika
<debojit.hazarika at db.com> wrote:
>
> Hello Taewook,
>
> Following your suggestion i tried compiling DCOracle2 for Oracle 8i and it was successfull.
> But unfortunately i was not able to do the same for Oracle9i (*which is my actual requirement*)
> I failed with the following errors:
>
> *******************************************************************************************************************
> /myapp/python/lib/python2.1/ld_so_aix gcc -bI:/myapp/python/lib/python2.1/python.exp build/temp.aix-4.3-2.1/dco2.o -L/applications/oracle/products/9.2.0.5/lib -lclntsh -o build/lib.aix-4.3-2.1/dco2.so
> ld: 0711-317 ERROR: Undefined symbol: .OCIErrorGet
> ld: 0711-317 ERROR: Undefined symbol: .OCIEnvCreate
> ld: 0711-317 ERROR: Undefined symbol: .OCIHandleAlloc
> ld: 0711-317 ERROR: Undefined symbol: .OCIServerAttach
> ld: 0711-317 ERROR: Undefined symbol: .OCIAttrSet
> ld: 0711-317 ERROR: Undefined symbol: .OCISessionBegin
> ld: 0711-317 ERROR: Undefined symbol: .OCISessionEnd
> ld: 0711-317 ERROR: Undefined symbol: .OCIServerDetach
> ld: 0711-317 ERROR: Undefined symbol: .OCIHandleFree
> ld: 0711-317 ERROR: Undefined symbol: .OCITransCommit
> ld: 0711-317 ERROR: Undefined symbol: .OCITransPrepare
> ld: 0711-317 ERROR: Undefined symbol: .OCITransRollback
> ld: 0711-317 ERROR: Undefined symbol: .OCIAttrGet
> ld: 0711-317 ERROR: Undefined symbol: .OCIParamGet
> ld: 0711-317 ERROR: Undefined symbol: .OCIDescribeAny
> ld: 0711-317 ERROR: Undefined symbol: .OCIStmtPrepare
> ld: 0711-317 ERROR: Undefined symbol: .OCIBindByPos
> ld: 0711-317 ERROR: Undefined symbol: .OCIBindByName
> ld: 0711-317 ERROR: Undefined symbol: .OCIBindDynamic
> ld: 0711-317 ERROR: Undefined symbol: .OCIBindArrayOfStruct
> ld: 0711-317 ERROR: Undefined symbol: .OCIStmtExecute
> ld: 0711-317 ERROR: Undefined symbol: .OCIDefineByPos
> ld: 0711-317 ERROR: Undefined symbol: .OCIDefineDynamic
> ld: 0711-317 ERROR: Undefined symbol: .OCIStmtFetch
> ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorAlloc
> ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorFree
> ld: 0711-317 ERROR: Undefined symbol: .OCILobIsTemporary
> ld: 0711-317 ERROR: Undefined symbol: .OCILobFreeTemporary
> ld: 0711-317 ERROR: Undefined symbol: .OCILobGetLength
> ld: 0711-317 ERROR: Undefined symbol: .OCILobRead
> ld: 0711-317 ERROR: Undefined symbol: .OCILobCreateTemporary
> ld: 0711-317 ERROR: Undefined symbol: .OCILobWrite
> ld: 0711-317 ERROR: Undefined symbol: .OCILobTrim
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
> collect2: ld returned 8 exit status
> *******************************************************************************************************************
>
> Any idea why it is failing for Oracle9i, how will i be able to fix this "Undefined symbol" error.
>
> Many thanks,
>
> regards
> Deb
>
>                       Taewook Kang
>                       <twkang at gmail.com        To:       Debojit Hazarika/Zentrale/DeuBaExt at Zentrale
>                       >                        cc:       zope at zope.org
>                                                Subject:  Re: [Zope] Installing DCOracle2 in AIX 5.1
>                       19/11/04 11:55
>
>
>                       Please respond to
>                       Taewook Kang
>
> I only use Oracle 8, and DCOracle2, so I can't help you.
> But previously I had compiled DCOracle with Oracle 8 and Python 2.3,
> and it worked.
> If you compiled DCOracle in your box without problem,
> I think it should work.
>
> Regards.
>
> On Fri, 19 Nov 2004 11:00:33 +0530, Debojit Hazarika
> <debojit.hazarika at db.com> wrote:
> >
> >
> > Hello Taewook,
> >
> > I have another question on the same topic, can you please fetch me and answer.
> >
> > Can i use DCOracle ( *not DCOracle2* ) with Oracle 9i.
> >
> > I got the following error while trying to use DCOracle with Oracle 9i
> >
> > *********************************************************************************************************
> > >>> import DCOracle
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File "/myapp/python/lib/python2.1/site-packages/DCOracle/__init__.py", line 66, in ?
> >     from ocidb import Connect, error
> >   File "/myapp/python/lib/python2.1/site-packages/DCOracle/ocidb.py", line 50, in ?
> >     import oci_, ociCurs, ociProc
> > ImportError: from module /myapp/python/lib/python2.1/site-packages/oci_.so Exec format error
> > can't load library:  /myapp/python/lib/python2.1/site-packages/oci_.so
> >  /myapp/oracle/products/9.2.0.5/lib/libclntsh.a shr.o
> >  /myapp/oracle/products/9.2.0.5/lib/libclntsh.a shr.o
> > can't load library: /myapp/oracle/products/9.2.0.5/lib/libclntsh.a
> >  /myapp/oracle/products/9.2.0.5/lib/libclntsh.a
> > *********************************************************************************************************
> >
> > Is there a way out (maybe some patch) to make DCOracle work with Oracle 9i?
> >
> >
> >
> > Many thanks in advance.
> >
> > Regards
> > Deb
> >
> >                       Taewook Kang
> >                       <twkang at gmail.com        To:       Debojit Hazarika/Zentrale/DeuBaExt at Zentrale
> >                       >                        cc:
> >                                                Subject:  Re: [Zope] Installing DCOracle2 in AIX 5.1
> >                       19/11/04 06:37
> >                       Please respond to
> >                       Taewook Kang
> >
> > You must manually edit setup.py to make it work in AIX.
> > Modify CFLAGS, LFLAGS as
> > CFLAGS = ["-DNDEBUG", "-DORACLE9i", "-DUSEOBJECT", "-D_REENTRENT"]
> > LFLAGS = []
> > and remove following lines - AIX doesn't have 'ldd' command. but you
> > must be sure
> > python compiled with thread support. -
> >
> > <code>
> > st,outp=commands.getstatusoutput('ldd %s' % sys.executable)
> > if string.find(outp,'libpth.so')!=-1:
> >     raise exceptions.RuntimeError,'Python interpreter is linked
> > against -lpth. But Python must be linked against -lpthread'
> >
> > st,outp=commands.getstatusoutput('ldd %s' % sys.executable)
> > if string.find(outp,'libpthread')==-1:
> >     raise exceptions.RuntimeError,'Python must be linked against -lpthread'
> > </code>
> >
> > Now, you can do 'python setup.py install'
> > Good luck.
> >
> > On Thu, 18 Nov 2004 17:36:20 +0530, Debojit Hazarika
> > <debojit.hazarika at db.com> wrote:
> > > Hello,
> > >
> > > I am trying to install DCOracle2 (DCOracle2-1.2.tar) in an AIX 5.1 box.
> > >
> > > I have tried various options but it does not seem to work.
> > >
> > > When i try to *make*  i get the below error
> > >
> > > *********************************************************************************************************
> > > >make
> > >         (cd src;  ./testora python)
> > > -n Checking ORACLE_HOME...
> > > passed.
> > > -n Checking for Oracle version...
> > > failed.
> > > /u01/app/oracle/product/9.2.0/lib/libclntsh.so not readable; unable to
> > > determine your oracle version.
> > > make: 1254-004 The error code from the last command is 2.
> > >
> > > Stop.
> > > *********************************************************************************************************
> > >
> > > Later i tried to follow the instructions in the below link to install it.
> > >
> > > http://mail.zope.org/pipermail/zope/2002-June/116009.html
> > >
> > > But this time i got a different error message as mentioned below
> > >
> > > **********************************************************************************************************
> > > >python setup.py install
> > > Traceback (most recent call last):
> > >   File "setup.py", line 36, in ?
> > >     raise exceptions.RuntimeError,'Python must be linked against -lpthread'
> > > RuntimeError: Python must be linked against -lpthread
> > > **********************************************************************************************************
> > >
> > > Can someone please provide me some suggestion to make this right and get
> > > DCOracle2 installed for Oracle 9i.
> > >
> > > Many thanks in advance,
> > >
> > > Regards
> > > Deb
> > >
> > > --
> > >
> > > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
> > >
> > > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
> > >
> > > _______________________________________________
> > > Zope maillist  -  Zope at zope.org
> > > http://mail.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://mail.zope.org/mailman/listinfo/zope-announce
> > >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >  >
> >
> > --
> >
> > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
> >
> > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
> >
>  >
>
> --
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>
 >





--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.




More information about the Zope mailing list