latest ldap.i

Michael Ströder michael at
Mon May 28 20:30:57 CEST 2001

Joe Little wrote:
> I've sent this to Sascha. It now contains the extended LDAP v3 API, with
> only the netscape quasi-specific v3 extensions (server side sorts, and
> other server or client side ops)
> build against Mozilla and openldap 2.x, but I need to check the openldap
> 2.x again for some things. Still working..

I tried to compile it against Netscape/Mozilla LDAP C SDK 5.0
(binaries from Sun's web site downloaded today). After some tweaking
of the Makefile (see attachment) it was built.

But during import of ldapc it chokes with:

Traceback (most recent call last):
  File "tests/", line 9, in ?
    import ldap
  File "/home/michael/src/swig-ldap-0.17-stable-13/", line 2,
in ?
    import ldapc
ImportError: undefined symbol: lber_debug

Tried this again with OpenLDAP 2.0.11 libs. Same result.

Ciao, Michael.
-------------- next part --------------
INCLUDEFLAGS =-I/usr/include/python2.1  

LIBFLAGS=-L/usr/local/lib -L/usr/lib -L/home/michael/src/ldapcsdk50/lib

LIBS=-llber50 -lldap50 ${DMALLOC_LIB}




ldap_wrap.c: version.h ldap.i 
	swig -python -shadow ldap.i 

ldap_wrap.o: ldap_wrap.c
	gcc $(CFLAGS) -c ldap_wrap.c $(INCLUDEFLAGS) ldap_wrap.o
	`$(LINK)` ldap_wrap.o $(LIBFLAGS) $(LIBS) -o

lber_wrap.c: version.h lber.i
	swig -python -shadow lber.i

lber_wrap.o: lber_wrap.c
	gcc $(CFLAGS) -c lber_wrap.c $(INCLUDEFLAGS) lber_wrap.o
	`$(LINK)` lber_wrap.o $(LIBFLAGS) $(LIBS) -o

test:	all
	(cd tests;make)

	(cd tests;make shutdown)

	rm -rf *.*\~ ldap_wrap.doc lber_wrap.doc lber_wrap.c ldap_wrap.c *\~ \#*\# *.o *.so *.pyc *.core
	(cd tests;make clean)
	(cd tools;./	

install: setup 
	cp -p ${INSTALLDIR}

header: setup ldap_wrap.c lber_wrap.c

tar:	clean header
	(cd ..; tar cvzf swig-ldap-`cat swig-ldap/VERSION`.tgz swig-ldap)

More information about the python-ldap mailing list