dev-python/python-ldap-2.3.10 doesn't build against stable net-nds/openldap-2.3.43. I'm getting compilation errors (undeclared constant): .... i686-pc-linux-gnu-gcc -pthread -DNDEBUG -march=i686 -O2 -mno-tls-direct-seg-refs -pipe -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.10 -IModules -I/usr/include -I/usr/include/sasl -I/usr/include/python2.6 -c Modules/constants.c -o build-2.6/temp.linux-i686-2.6/Modules/constants.o Modules/constants.c: In Funktion »LDAPinit_constants«: Modules/constants.c:184: Fehler: »LDAP_OPT_X_TLS_NEWCTX« nicht deklariert (erste Benutzung in dieser Funktion) Modules/constants.c:184: Fehler: (Jeder nicht deklarierte Bezeichner wird nur einmal aufgeführt Modules/constants.c:184: Fehler: für jede Funktion in der er auftritt.) error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1 * ERROR: dev-python/python-ldap-2.3.10 failed: * Building failed with Python 2.6 in building() function * * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3143: Called distutils_src_compile * environment, line 757: Called python_execute_function 'building' * environment, line 2811: Called die * The specific snippet of code: * die "${failure_message}"; * The constant LDAP_OPT_X_TLS_NEWCTX is not defined in ldap.h of openldap-2.3.xx. Having peeked at the openldap CVS repository I've seen that the latest openldap sources has this constant defined. So I guess, it's a openldap- 2.4 dependency. To get things to compiled I've ifdef'ed the constant. I don't know, if that could be the right solution in the great scheme of all things LDAP or if the module dependency need to be changed. At least, it compiles. I'll attach the appropriate patch and ebuild. One other things I noticed. Just below the OPT_X_TLS_NEWCTX constant in the source files Modules/constants.c and Modules/options.c of the python modules you find this ifdef: #ifdef OPT_X_TLS_PROTOCOL_MIN add_int(d,OPT_X_TLS_PROTOCOL_MIN); #endif Looking at the other ifdef's in the file I'm wondering, if this should actually be spelled like this: #ifdef LDAP_OPT_X_TLS_PROTOCOL_MIN add_int(d,OPT_X_TLS_PROTOCOL_MIN); #endif I guess, this would be a hint for the original module developer. Reproducible: Always
Created attachment 209119 [details, diff] Patch to compile against openldap 2.3.43
Created attachment 209120 [details] New Ebuild to include patch.
net-nds/openldap-2.4.19 is being stabilized in bug #290345, so I have updated dependencies of dev-python/python-ldap-2.3.10.