latest ldap.i
Michael Ströder
michael at stroeder.com
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/ldapsearch.py", line 9, in ?
import ldap
File "/home/michael/src/swig-ldap-0.17-stable-13/ldap.py", 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
INCLUDEFLAGS+=-I/usr/local/include
INCLUDEFLAGS+=-I/home/michael/src/ldapcsdk50/include
LIBFLAGS=-L/usr/local/lib -L/usr/lib -L/home/michael/src/ldapcsdk50/lib
#DMALLOC_LIB=-ldmalloc
LIBS=-llber50 -lldap50 ${DMALLOC_LIB}
LINK=./link
CFLAGS=-g -DSWIG_LDAP_DEBUG -DVERSION=${SWIG_LDAP_VERSION}
INSTALLDIR=/usr/local/etc/MB/bin
all: ldapcmodule.so lbermodule.so
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)
ldapcmodule.so: ldap_wrap.o
`$(LINK)` ldap_wrap.o $(LIBFLAGS) $(LIBS) -o ldapcmodule.so
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)
lbermodule.so: lber_wrap.o
`$(LINK)` lber_wrap.o $(LIBFLAGS) $(LIBS) -o lbermodule.so
test: all
(cd tests;make)
shutdown:
(cd tests;make shutdown)
clean:
rm -rf *.*\~ ldap_wrap.doc lber_wrap.doc lber_wrap.c ldap_wrap.c *\~ \#*\# *.o *.so *.pyc *.core
(cd tests;make clean)
setup:
(cd tools;./setup.sh)
install: setup ldapcmodule.so ldap.py lbermodule.so
cp -p ldapcmodule.so lbermodule.so ldap.py lber.py ${INSTALLDIR}
header: setup ldap_wrap.c lber_wrap.c
./tools/make.header
tar: clean header
(cd ..; tar cvzf swig-ldap-`cat swig-ldap/VERSION`.tgz swig-ldap)
More information about the python-ldap
mailing list