[Zope] Problems with SybaseDA

A J Wilson ajwilson@ezy.net.au
Sat, 10 Jun 2000 05:44:44 +1000


This is a multi-part message in MIME format.

------=_NextPart_000_000B_01BFD29E.FB153500
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have experimented some more and I think I have isolated the problem by =
importing the module into python and playing with the code that uses it =
(eg db.py and DA.py).

Firstly I found that I had to change some of the environment variables =
in the Makefile.pre.in to point to where Makdrake 7 stores python (ie =
/usr rather than /usr/local). Then I made sure that SYBASE and =
LD_LIBRARY_PATH were set in my shell before compiling the code.

Next I imported sy_occ into python and started playing it (I made sure =
SYBASE and LD_LIBRARY_PATH were set correctly by inspecting os.environ). =
I found that in db.py there is a line of code =
"_context=3Dsy_occ.cs_ctx_alloc()" which when called causes a =
segmentation fault and a core dump.  When this line is commented out =
Zope can start successfully and thinks that the SybaseDA is correctly =
installed but obviously it doesn't actually work.

I am using Jeff Rush's rpm version of Zope and have set SYBASE and =
LD_LIBRARY_PATH through .bashrc in user zope's home directory.  Does =
this sound like the right way to do it?

Can anybody help me.

Thanks
Austin

>Date: Thu, 08 Jun 2000 01:09:21 -0600
>From: Bill Anderson <bill@libc.org>
>To: zope@zope.org
>Subject: Re: [Zope] Problems with SybaseDA

>> A J Wilson wrote:
>>=20
>> Hi
>>=20
>> I have installed Zope-2.1.6 on my PC (Pentium running Mandrake 7) and
>> it seems to work fine.  However, I have tried installing the SybaseDA
>> and am having trouble.  I have downloaded and installed the common
>> Sybase libraries, set the SYBASE path, complied it without errors and
>> moved the sy_occ.so up one directory.  However, when I restart Zope =
it
>> fails and produces a core dump.  There are no errors generated so I =
am
>> having trouble diagnosing what is wrong.  I can import the sy_occ.so
>> into python without error, but if I try to import db.py and DA.py I
>> get errors.  These two scripts reference modules such as DateTime,
>> zLOG, Missing, Globals, Shared.DC.ZRDB.TM, and
>> Shared.DC.ZRDB.Connection - none of I can find.
>>=20
>> Can anybody please help?

> Search the archives for Sybase. It is probable that while you have teh
> variable set in your shell, it is not set in the process Zope runs. =
This
> should be in the docs on SybaseDA, IMO.



------=_NextPart_000_000B_01BFD29E.FB153500
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have experimented some more and I =
think I have=20
isolated the problem by importing the module into python and playing =
with the=20
code that uses it (eg db.py and DA.py).</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Firstly I found that I had to change =
some of the=20
environment variables in the Makefile.pre.in to point to where Makdrake =
7 stores=20
python (ie /usr rather than /usr/local). Then I made sure that SYBASE =
and=20
LD_LIBRARY_PATH were set in my shell before compiling the =
code.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Next I imported sy_occ into python and =
started=20
playing it (I made sure SYBASE and LD_LIBRARY_PATH were set correctly by =

inspecting os.environ).&nbsp;I found that in db.py there is a line of =
code=20
"_context=3Dsy_occ.cs_ctx_alloc()" which when called causes a =
segmentation fault=20
and a core dump.&nbsp; When this line is commented out Zope can start=20
successfully and thinks that the SybaseDA is correctly installed but =
obviously=20
it doesn't actually work.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am using Jeff Rush's rpm version of =
Zope and have=20
set SYBASE and LD_LIBRARY_PATH through .bashrc in user zope's home=20
directory.&nbsp; Does this sound like the right way to do =
it?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can anybody help me.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Austin</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&gt;Date: Thu, 08 Jun 2000 01:09:21=20
-0600<BR>&gt;From: Bill Anderson &lt;<A=20
href=3D"mailto:bill@libc.org">bill@libc.org</A>&gt;<BR>&gt;To: <A=20
href=3D"mailto:zope@zope.org">zope@zope.org</A><BR>&gt;Subject: Re: =
[Zope]=20
Problems with SybaseDA<BR><BR>&gt;&gt; A J Wilson wrote:<BR>&gt;&gt;=20
<BR>&gt;&gt; Hi<BR>&gt;&gt; <BR>&gt;&gt; I have installed Zope-2.1.6 on =
my PC=20
(Pentium running Mandrake 7) and<BR>&gt;&gt; it seems to work =
fine.&nbsp;=20
However, I have tried installing the SybaseDA<BR>&gt;&gt; and am having=20
trouble.&nbsp; I have downloaded and installed the common<BR>&gt;&gt; =
Sybase=20
libraries, set the SYBASE path, complied it without errors =
and<BR>&gt;&gt; moved=20
the sy_occ.so up one directory.&nbsp; However, when I restart Zope=20
it<BR>&gt;&gt; fails and produces a core dump.&nbsp; There are no errors =

generated so I am<BR>&gt;&gt; having trouble diagnosing what is =
wrong.&nbsp; I=20
can import the sy_occ.so<BR>&gt;&gt; into python without error, but if I =
try to=20
import db.py and DA.py I<BR>&gt;&gt; get errors.&nbsp; These two scripts =

reference modules such as DateTime,<BR>&gt;&gt; zLOG, Missing, Globals,=20
Shared.DC.ZRDB.TM, and<BR>&gt;&gt; Shared.DC.ZRDB.Connection - none of I =
can=20
find.<BR>&gt;&gt; <BR>&gt;&gt; Can anybody please help?<BR><BR>&gt; =
Search the=20
archives for Sybase. It is probable that while you have teh<BR>&gt; =
variable set=20
in your shell, it is not set in the process Zope runs. This<BR>&gt; =
should be in=20
the docs on SybaseDA, IMO.<BR><BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_000B_01BFD29E.FB153500--