Problems importing _ldap module

Christian Wiese cw at 4ix.net
Tue Oct 2 19:26:25 CEST 2001


with my little experience in C, I removed the ufn functions in LDAPObject.c 
from the CVS source and now can import the ldap module and it seems to 
function.

greetings

Christian

Am Tuesday 02 October 2001 19:17 schrieb Joe Little:
> This is getting interesting
>
> Looks like LDAPObject.c in the Modules directory explicitly call ufn_*
> and these are in turn relied upon by the URL functions. I'm currently
> undergoing surgery on the code, removing the ugly bits AND hoping that
> it will still be functional.
>
> This is not CVS.. just my latest edition.
>
> On Tuesday, October 2, 2001, at 09:36 AM, Christian Wiese wrote:
> > Ok, I understand, but I've never installed OpenLDAP 1.x on this system.
> >
> > Then we should check "LDAPObject.c", regarding this functions.
> >
> > Here are some greps, concerning my configuration:
> >
> > ---------------------------------------------------
> >
> > # rpm -qa | grep openldap
> > openldap-devel-2.0.15-1
> > openldap-clients-2.0.15-1
> > openldap-servers-2.0.15-1
> > openldap-2.0.15-1
> >
> > # rpm -qa | grep python
> > python-xmlrpc-1.4-1
> > python-docs-1.5.2-35
> > pythonlib-1.28-1
> > rpm-python-4.0.3-0.96
> > python-devel-1.5.2-35
> > python-tools-1.5.2-35
> > openssl-python-0.9.6-3
> > mod_python-2.7.3-1
> > python-1.5.2-35
> > python-ldap-python1.5-1.10alpha3-4
> >
> > ---------------------------------------------------
> >
> > Am Tuesday 02 October 2001 18:24 schrieb Michael Ströder:
> >> Christian Wiese wrote:
> >>> but if I try
> >>>
> >>>>>> import ldap
> >>>
> >>> I get the a similar error message.
> >>> [..]
> >>>     from _ldap import __version__
> >>> ImportError: /usr/lib/python1.5/site-packages/_ldapmodule.so:
> >>> undefined
> >>> symbol: ldap_ufn_setfilter
> >>
> >> Yes, there is a import _ldap in ldap.py anyway. It's just a matter
> >> of module packaging.
> >>
> >> The problem is that in the OpenLDAP 2 libs the support for the
> >> mainly unused functions *ufn* was dropped. Your build of python-ldap
> >> trys to import those old functions which makes me believe that your
> >> _ldapmodule.so was built against OpenLDAP 1 libs.
> >>
> >> Ciao, Michael.
> >
> > 


More information about the python-ldap mailing list