From: Eric Carty-F. <eri...@gm...> - 2007-09-13 21:27:25
|
I am trying to build python-ldap (2.3.1) on a RH Linux box. I installed openldap (2.3.38) from source with the default settings and had no problems. I also have a source install of Python 2.4.4. In setup.cfg I modified these two lines: library_dirs = /usr/local/lib include_dirs = /home/eric/openldap-2.2.13/include /usr/include/sasl When I try to build with "python setup.py build" I get this: In file included from Modules/constants.c:11: /home/eric/openldap-2.2.13/include/ldap.h:210:1: warning: "LDAP_CONTROL_VALUESRETURNFILTER" redefined In file included from Modules/constants.c:9: Modules/constants.h:16:1: warning: this is the location of the previous definition Modules/constants.c: In function `LDAPinit_constants': Modules/constants.c:179: error: `LDAP_OPT_X_TLS_CRLCHECK' undeclared (first use in this function) Modules/constants.c:179: error: (Each undeclared identifier is reported only once Modules/constants.c:179: error: for each function it appears in.) Modules/constants.c:180: error: `LDAP_OPT_X_TLS_CRL_NONE' undeclared (first use in this function) Modules/constants.c:181: error: `LDAP_OPT_X_TLS_CRL_PEER' undeclared (first use in this function) Modules/constants.c:182: error: `LDAP_OPT_X_TLS_CRL_ALL' undeclared (first use in this function) error: command 'gcc' failed with exit status 1 What am I doing incorrectly? I've searched high and low and cannot find much reference to these specific errors. Thanks in advance. Eric |
From: Torsten K. <pyt...@tk...> - 2007-09-13 22:18:39
|
On Thursday, September 13, 2007 at 23:27 Eric Carty-Fickes wrote: > I am trying to build python-ldap (2.3.1) on a RH Linux box. I > installed openldap (2.3.38) from source with the default settings and ^^^^^^^^ > include_dirs = /home/eric/openldap-2.2.13/include /usr/include/sasl ^^^^^^^^ Why do you try to build with 2.2.13 headers, although you already installed 2.3.38? I had similar problems when building python-ldap on Mac OSX, where openldap 2.2.x is installed by default. Simply "stealing" the 2.3 headers from a Linux system did the trick there. Thus, point include_dirs to the location of your 2.3 headers (presumably /usr/local/include, if you installed from source) and everything should work like a charm. Torsten -- Never make anything simple and efficient when a way can be found to make it complex and wonderful. - Murphy's Law No. 13 - |
From: <mi...@st...> - 2007-09-14 11:49:25
|
Torsten Kurbad wrote: > > I had similar problems when building python-ldap on Mac OSX, where > openldap 2.2.x is installed by default. Simply "stealing" the 2.3 > headers from a Linux system did the trick there. This workaround is very bad practice. You MUST NOT mix headers and libs from different OpenLDAP versions. This can lead to serious crashs. Please don't ask for support if you're doing something like this. Ciao, Michael. |
From: Torsten K. <pyt...@tk...> - 2007-09-14 11:56:01
|
> > I had similar problems when building python-ldap on Mac OSX, where > > openldap 2.2.x is installed by default. Simply "stealing" the 2.3 > > headers from a Linux system did the trick there. > > This workaround is very bad practice. You MUST NOT mix headers and > libs from different OpenLDAP versions. This can lead to serious > crashs. Please don't ask for support if you're doing something like > this. I won't... This was part of my .egg project - and was merely a test. ;o) But it showed clearly that it's problematic to build python-ldap-2.3.1 with OpenLDAP 2.2.x, which I didn't know beforehand. Anyway, Eric HAS the 2.3.x libs installed and used the 2.2.x headers for no good reason. That's what I wanted to point out... Regards, Torsten -- I am a deeply superficial person. -Andy Warhol |
From: <mi...@st...> - 2007-09-14 12:03:14
|
Torsten Kurbad wrote: > > Anyway, Eric HAS the 2.3.x libs installed and used the 2.2.x headers > for no good reason. That's what I wanted to point out... Got your message. But I wanted to make sure that it won't get misunderstood. Ciao, Michael. |
From: <mi...@st...> - 2007-09-14 11:47:40
|
Eric Carty-Fickes wrote: > I am trying to build python-ldap (2.3.1) on a RH Linux box. I > installed openldap (2.3.38) from source with the default settings and > had no problems. I also have a source install of Python 2.4.4. > > In setup.cfg I modified these two lines: > library_dirs = /usr/local/lib > include_dirs = /home/eric/openldap-2.2.13/include /usr/include/sasl python-ldap 2.3+ strictly requires OpenLDAP libs 2.3.x. Fix include_dirs in your setup.cfg to reflect this. Ciao, Michael. |