Error Building PyPgSQL

Gerhard Häring gerhard.nospam at bigfoot.de
Mon Jul 9 19:49:39 EDT 2001


>"Gerhard Häring":
>> On Mon, 9 Jul 2001 09:13:36 -0400, Rod MacNeil wrote:
>> >Hello,
>> >
>> >I'm trying to build PyPgSQL on a RH7 box with Python 1.5 and postgres 7.0
>> >and gcc-2.96-54.  I left the Setup.in file as it shipped because it looked
>> >correct to me.  I get the following when I run make.
>> >
>> >gcc -fPIC -I/usr/local/pgsql/include -g -02 -
>> >I/usr/include/python1.5 -I/usr/include/python1.5 -
>> >DHAVE_CONFIG_H -c ./libpqmodule.c
>> >./libpqmodule.c: In function `PgConnection_New':
>> >./libpqmodule.c:196: parse error before `PgConnection'
>> >
>> >[other compiler errors]
> >
>> >This looks like a compiler error to me but I'm not a C programmer.  The
>> >four lines of code appear to be using the same syntax, is this a syntax
>> >error or possibly a compiler version issue?
>> >
>> >Has anyone else had this problem or know of a solution?
>>
>> The latest release uses distutils and it works fine. I think you should use
>> this one (edit paths in setup.py, then "python setup.py build" then
>> "python setup.py install").

On Mon, 9 Jul 2001 16:06:00 -0400, Rod MacNeil wrote:
>I have version 1.2 from sourceforge, it doesn't mention using distutils or
>have a setup.py script.  Have I got the latest?  I'm new to distutils, am I
>missing something basic?

Sorry for spreading misinformation. I was using the CVS version. 1.2 didn't use
distutils, yet.

I was testing the 1.2 version and it works fine with on my machine.

I think the problem is that this module isn't designed to work with Python
1.5.2 anymore. The first offending line contains a call to PyObject_New. And
the changelog says the author has recently changed all instances of
PyObject_NEW to PyObject_New. I didn't find the _New in the Python 1.5.2
headers. You might try to undo this change. Or install Python 2.1 and build
with that.

Strange that Redhat *still* ships 1.5.2.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://highqualdev.com              public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list