Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291671 - dev-python/python-ldap-2.3.10 doesn't build against stable net-nds/openldap-2.3.43
Summary: dev-python/python-ldap-2.3.10 doesn't build against stable net-nds/openldap-2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2009-11-03 09:38 UTC by Frank Ridderbusch
Modified: 2009-11-03 21:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to compile against openldap 2.3.43 (python-ldap-openldap-2.4.xx-patch,866 bytes, patch)
2009-11-03 09:40 UTC, Frank Ridderbusch
Details | Diff
New Ebuild to include patch. (python-ldap-2.3.10-r1.ebuild,1.89 KB, text/plain)
2009-11-03 09:41 UTC, Frank Ridderbusch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ridderbusch 2009-11-03 09:38:45 UTC
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
Comment 1 Frank Ridderbusch 2009-11-03 09:40:22 UTC
Created attachment 209119 [details, diff]
Patch to compile against openldap 2.3.43
Comment 2 Frank Ridderbusch 2009-11-03 09:41:12 UTC
Created attachment 209120 [details]
New Ebuild to include patch.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-03 21:46:49 UTC
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.