Hi, I'm also having trouble getting 2.3.10 to compile on RHEL 5. I tried
applying the patches supplied in this thread (I just joined this email list,
btw):


http://sourceforge.net/mailarchive/forum.php?thread_name=4AF1B687.9040501%40stroeder.com&forum_name=python-ldap-dev

but that didn't work.

I noticed that some work related to this has been going on in the trunk:


http://python-ldap.cvs.sourceforge.net/viewvc/python-ldap/python-ldap/CHANGES?revision=1.217&view=markup

I downloaded that version and tried to build it. It failed, with:

$ python ./setup.py build
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
running build_ext
building '_ldap' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10
-IModules -I/usr/local/openldap-2.3/include -I/usr/include/sasl
-I/usr/include/python2.4 -c Modules/LDAPObject.c -o
build/temp.linux-x86_64-2.4/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:4:
Modules/common.h:10:20: error: Python.h: No such file or directory
In file included from Modules/LDAPObject.c:4:
Modules/common.h:35: error: expected ‘)’ before ‘*’ token
Modules/LDAPObject.c:5:24: error: patchlevel.h: No such file or directory
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
Modules/errors.h:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
Modules/errors.h:13: error: expected ‘)’ before ‘*’ token
Modules/errors.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
In file included from Modules/LDAPObject.c:10:
Modules/constants.h:8: error: expected ‘)’ before ‘*’ token
Modules/constants.h:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
In file included from Modules/LDAPObject.c:11:
Modules/LDAPObject.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.h:22: error: expected specifier-qualifier-list before
‘PyObject_HEAD’
Modules/LDAPObject.h:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘LDAP_Type’
In file included from Modules/LDAPObject.c:12:
Modules/ldapcontrol.h:10: error: expected ‘)’ before ‘*’ token
Modules/ldapcontrol.h:12: error: expected ‘)’ before ‘*’ token
Modules/ldapcontrol.h:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
In file included from Modules/LDAPObject.c:13:
Modules/message.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
In file included from Modules/LDAPObject.c:14:
Modules/berval.h:10: error: expected ‘)’ before ‘*’ token
Modules/berval.h:11: error: expected ‘)’ before ‘*’ token
Modules/berval.h:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
In file included from Modules/LDAPObject.c:15:
Modules/options.h:5: error: expected declaration specifiers or ‘...’ before
‘PyObject’
Modules/options.h:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
Modules/LDAPObject.c: In function ‘newLDAPObject’:
Modules/LDAPObject.c:28: warning: implicit declaration of function
‘PyObject_NEW’
Modules/LDAPObject.c:28: error: expected expression before ‘LDAPObject’
Modules/LDAPObject.c:28: warning: cast to pointer from integer of different
size
Modules/LDAPObject.c:31: error: ‘LDAPObject’ has no member named ‘ldap’
Modules/LDAPObject.c:32: error: ‘LDAPObject’ has no member named ‘_save’
Modules/LDAPObject.c:33: error: ‘LDAPObject’ has no member named ‘valid’
Modules/LDAPObject.c: In function ‘dealloc’:
Modules/LDAPObject.c:42: error: ‘LDAPObject’ has no member named ‘ldap’
Modules/LDAPObject.c:43: error: ‘LDAPObject’ has no member named ‘valid’
Modules/LDAPObject.c:44: error: ‘LDAPObject’ has no member named ‘_save’
Modules/LDAPObject.c:44: warning: implicit declaration of function
‘Py_FatalError’
Modules/LDAPObject.c:44: error: ‘LDAPObject’ has no member named ‘_save’
Modules/LDAPObject.c:44: warning: implicit declaration of function
‘PyEval_SaveThread’
Modules/LDAPObject.c:45: error: ‘LDAPObject’ has no member named ‘ldap’
Modules/LDAPObject.c:46: error: ‘_threadstate’ undeclared (first use in this
function)
Modules/LDAPObject.c:46: error: (Each undeclared identifier is reported only
once
Modules/LDAPObject.c:46: error: for each function it appears in.)
Modules/LDAPObject.c:46: error: expected ‘;’ before ‘_save’
Modules/LDAPObject.c:46: error: ‘LDAPObject’ has no member named ‘_save’
Modules/LDAPObject.c:46: warning: implicit declaration of function
‘PyEval_RestoreThread’
Modules/LDAPObject.c:46: error: ‘_save’ undeclared (first use in this
function)
Modules/LDAPObject.c:47: error: ‘LDAPObject’ has no member named ‘valid’
Modules/LDAPObject.c:49: error: ‘LDAPObject’ has no member named ‘ldap’
Modules/LDAPObject.c:51: warning: implicit declaration of function
‘PyObject_DEL’
Modules/LDAPObject.c: In function ‘not_valid’:
Modules/LDAPObject.c:65: error: ‘LDAPObject’ has no member named ‘valid’
Modules/LDAPObject.c:68: warning: implicit declaration of function
‘PyErr_SetString’
Modules/LDAPObject.c:68: error: ‘LDAPexception_class’ undeclared (first use
in this function)
Modules/LDAPObject.c: In function ‘LDAPMod_DEL’:
Modules/LDAPObject.c:81: warning: implicit declaration of function
‘PyMem_DEL’
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:104: error: expected ‘)’ before ‘*’ token
Modules/LDAPObject.c:207: error: expected ‘)’ before ‘*’ token
Modules/LDAPObject.c:259: error: expected ‘)’ before ‘*’ token
Modules/LDAPObject.c:327: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:367: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:407: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:453: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:554: error: expected declaration specifiers or ‘...’
before ‘PyObject’
Modules/LDAPObject.c: In function ‘interaction’:
Modules/LDAPObject.c:557: error: ‘PyObject’ undeclared (first use in this
function)
Modules/LDAPObject.c:557: error: ‘result’ undeclared (first use in this
function)
Modules/LDAPObject.c:559: warning: implicit declaration of function
‘PyObject_CallMethod’
Modules/LDAPObject.c:559: error: ‘SASLObject’ undeclared (first use in this
function)
Modules/LDAPObject.c:570: warning: implicit declaration of function
‘PyString_AsString’
Modules/LDAPObject.c:570: warning: assignment makes pointer from integer
without a cast
Modules/LDAPObject.c:586: warning: implicit declaration of function
‘Py_DECREF’
Modules/LDAPObject.c: In function ‘py_ldap_sasl_interaction’:
Modules/LDAPObject.c:608: error: ‘PyObject’ undeclared (first use in this
function)
Modules/LDAPObject.c:608: error: ‘SASLObject’ undeclared (first use in this
function)
Modules/LDAPObject.c:608: error: expected expression before ‘)’ token
Modules/LDAPObject.c:612: error: too many arguments to function
‘interaction’
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:619: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:697: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:739: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:784: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:825: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:873: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:917: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1015: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1082: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1148: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1165: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1178: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1235: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘methods’
Modules/LDAPObject.c:1264: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
Modules/LDAPObject.c:1273: error: expected declaration specifiers or ‘...’
before ‘PyObject’
Modules/LDAPObject.c: In function ‘setattr’:
Modules/LDAPObject.c:1275: error: ‘PyExc_AttributeError’ undeclared (first
use in this function)
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:1281: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘LDAP_Type’
error: command 'gcc' failed with exit status 1


I would love to help test this. Please let me know what I can send you to be
most useful.

Also, thanks for all your work on this.

Rob
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to