build error on RHEL3 (ES)

Ames Andreas Andreas.Ames at comergo.com
Tue Jul 26 13:12:59 CEST 2005


Hi,

shishkin alexey wrote:

> gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC
> -DLDAPMODULE_VERSION=2.0.8 -IModules -I/usr/local/include
> -I/usr/local/include/sasl -I/usr/include -I/usr/lib/include
> -I/usr/include/python2.2 -c Modules/ldapcontrol.c -o
> build/temp.linux-i686-2.2/ldapcontrol.o
> Modules/ldapcontrol.c:204: syntax error before string constant

[...]

> Packets installed:
>
> python-2.2.3-5

I guess, this is the problem.  I use the PyDoc_STRVAR macro which is
apparently only available from python 2.3 and up (although I haven't
checked, I know it is a relatively recent addition to python).

Are you able to switch to a more recent version of python?  Given that
you seem to use sort of an "enterprise" linux, this is probably not an
option.

In this case you might try to replace the offending line by:

static char encode_rfc2696__doc__[] = "encode_page_control(blabla)";

But please be aware that this is untested and that I'm not sure that this
is my only 2.3ism.  Please also note that PyDoc_STRVAR is used twice within 
the module.


HTH,

aa

-- 
Andreas Ames | Programmer | Comergo GmbH | 
Voice:  +49 69 7505 3213 | andreas . ames AT comergo . com





More information about the python-ldap mailing list