Building python-ldap with libldap_r (was: defect)
Michael Ströder
michael at stroeder.com
Mon Jul 1 15:14:29 CEST 2002
Michael Ströder wrote:
>
> I tried to build python-ldap against libldap_r from OpenLDAP's REL_ENG_2
> branch by simply modifying setup.cfg:
>
> libs = ldap_r lber sasl
>
> The build went fine. ldd shows output like expected:
> [..]
>
> But import does not work.
> [..]
> ImportError: /usr/lib/python2.2/site-packages/_ldap.so: undefined
> symbol: ldap_first_reference
Hmm I saw some postings on using libldap_r with other software
packages. They used libldap_r *and* libldap for linking.
I tried this in setup.cfg:
libs = ldap_r ldap lber sasl
It seems to work and ldd shows this:
$ ldd /usr/lib/python2.2/site-packages/_ldap.so
libldap_r.so.2 => /usr/local/openldap2/lib/libldap_r.so.2
(0x4001f000)
libldap.so.2 => /usr/local/openldap2/lib/libldap.so.2
(0x40052000)
liblber.so.2 => /usr/local/openldap2/lib/liblber.so.2
(0x40082000)
libsasl.so.7 => /usr/lib/libsasl.so.7 (0x4008e000)
Can anyone confirm that it's supposed to work that way using both
libldap_r and libldap for linking? How can I be sure that the
reentrant version of a ldaplib function is used? (Again revealing
my lack of C compiling knowledge...)
Ciao, Michael.
More information about the python-ldap
mailing list