From: Michael <mi...@st...> - 2001-05-28 18:31:25
Attachments:
Makefile-ldapcsdk50
|
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. |
From: Joe L. <jl...@op...> - 2001-05-29 15:50:42
|
I'll need to look into the lber libs and their build mechanism. On Mon, 28 May 2001, Michael Str=F6der wrote: > Joe Little wrote: > > > > I've sent this to Sascha. It now contains the extended LDAP v3 API, w= ith > > only the netscape quasi-specific v3 extensions (server side sorts, an= d > > other server or client side ops) > > > > build against Mozilla and openldap 2.x, but I need to check the openl= dap > > 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. |
From: Joe L. <jl...@op...> - 2001-05-30 02:35:18
|
Ok.. stuck on windows box for network access, but here's the deal. edit lber.i that I submitted, and comment out these function defs: lber_debug lber_pbrint ber_dump Next, edit Sascha's make file to explicitly include ldap50 and lber50 as your included libraries. Last, make sure /opt/ldapsdk/lib or wherever mozilla is in your LD_LIBRARY_PATH, and before any other ldap libs (like Oracle, OpenLDAP, or the like) I did a test ldapsearch with the test dir (its now ldap.open(host,port)!!= ) with the libraries and ldap.py/lber.py files present, and it all worked fine against my openldap 2.0.x server. Yeah Kudos to Michael for catching my not testing my latest lber.i file before submitting to the list :) On Mon, 28 May 2001, Michael Str=F6der wrote: > Joe Little wrote: > > > > I've sent this to Sascha. It now contains the extended LDAP v3 API, w= ith > > only the netscape quasi-specific v3 extensions (server side sorts, an= d > > other server or client side ops) > > > > build against Mozilla and openldap 2.x, but I need to check the openl= dap > > 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. |
From: Michael <mi...@st...> - 2001-05-30 17:59:57
|
HI! I've built the swig-ldap with Joe's ldap.i and lber.i. After modifications to lber.i import works now. But I still have some problems. Note: The module is built as ldapcmodule.so on my system. Python 2.1 (#8, Apr 20 2001, 19:22:23) [GCC 2.95.2 19991024 (release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import ldapc >>> attrs=ldapc.string_array(1) >>> ldapc.string_set(attrs,0,'objectClass') 'objectClass' >>> l=ldapc.open('localhost',389) >>> resPtr=ldapc.makeLDAPMessagePtrPtr() >>> status=ldapc.search_s(l,'O=MICHAELS',ldapc.SCOPE_BASE, '(objectClass=*)',attrs,0,resPtr) Segmentation fault Am I doing something wrong? I have to admit that these kind of error messages endorse my prejudices about SWIG-produced modules... Ciao, Michael. |
From: Joe L. <jl...@op...> - 2001-05-30 18:34:27
|
My only concern is your libraries. do an ldd on the ldapcmodule (there is also the lbermodule.so). Make sure it sees the same ldap libraries you built it with. I'd then use the test ldapsearch in Sacha's test directory (with the aforementioned changed in ldap.open instead of ldap.LDAP for opening a connection. On Wed, 30 May 2001, Michael Str=F6der wrote: > HI! > > I've built the swig-ldap with Joe's ldap.i and lber.i. After > modifications to lber.i import works now. But I still have some > problems. > > Note: The module is built as ldapcmodule.so on my system. > > Python 2.1 (#8, Apr 20 2001, 19:22:23) > [GCC 2.95.2 19991024 (release)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> import ldapc > >>> attrs=3Dldapc.string_array(1) > >>> ldapc.string_set(attrs,0,'objectClass') > 'objectClass' > >>> l=3Dldapc.open('localhost',389) > >>> resPtr=3Dldapc.makeLDAPMessagePtrPtr() > >>> status=3Dldapc.search_s(l,'O=3DMICHAELS',ldapc.SCOPE_BASE, > '(objectClass=3D*)',attrs,0,resPtr) > Segmentation fault > > Am I doing something wrong? > > I have to admit that these kind of error messages endorse my > prejudices about SWIG-produced modules... > > Ciao, Michael. > > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |
From: Michael <mi...@st...> - 2001-05-30 18:55:20
|
Joe Little wrote: > > My only concern is your libraries. do an ldd on the ldapcmodule (there is > also the lbermodule.so). Make sure it sees the same ldap libraries you > built it with. Off course I already did this every time. Seemed ok to me: > ldd ldapcmodule.so /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40015000) libldap50.so => /home/michael/src/ldapcsdk50/lib/libldap50.so (0x40017000) libc.so.6 => /lib/libc.so.6 (0x40047000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) > ldd lbermodule.so /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x4000a000) libldap50.so => /home/michael/src/ldapcsdk50/lib/libldap50.so (0x4000c000) libc.so.6 => /lib/libc.so.6 (0x4003c000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) > I'd then use the test ldapsearch in Sacha's test directory (with the > aforementioned changed in ldap.open instead of ldap.LDAP for opening a > connection. This did not work. I took a look at the source to figure out how it works and tried to track things down by typing the actions manually. Now please tell me what I did wrong in this transcript? It uses ldapc.open() to make the connection. That's definitely not problem. Maybe something's fishy with building "attrs"? Python 2.1 (#8, Apr 20 2001, 19:22:23) [GCC 2.95.2 19991024 (release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import ldapc >>> attrs=ldapc.string_array(1) >>> ldapc.string_set(attrs,0,'objectClass') 'objectClass' >>> l=ldapc.open('localhost',389) >>> resPtr=ldapc.makeLDAPMessagePtrPtr() >>> status=ldapc.search_s(l,'O=MICHAELS',ldapc.SCOPE_BASE, '(objectClass=*)',attrs,0,resPtr) Segmentation fault Am I doing something wrong? Ciao, Michael. |
From: Joe L. <jl...@op...> - 2001-05-31 00:21:42
|
the attrs could be a problem. It may be one area of the mozilla API that = I didn't "expose" via SWIG. Any comments Sascha? I've simply used Sascha's makefile and the like so far, but the tests and such will definitely need to be altered to confirm the ldap and its v3 extensions are working. Its a work in progress, and my without a network :(. I'll try and put together some tests. Michael, if you have any specific tests that you'd like to make sure they work, simply send them m= y way and I'll try and put them into the test suite. The current test suite from Sascha expects openldap 1.x and its config/schema style. On Wed, 30 May 2001, Michael Str=F6der wrote: > Joe Little wrote: > > > > My only concern is your libraries. do an ldd on the ldapcmodule (ther= e is > > also the lbermodule.so). Make sure it sees the same ldap libraries yo= u > > built it with. > > Off course I already did this every time. Seemed ok to me: > > > ldd ldapcmodule.so > /lib/libNoVersion.so.1 =3D> /lib/libNoVersion.so.1 > (0x40015000) > libldap50.so =3D> > /home/michael/src/ldapcsdk50/lib/libldap50.so (0x40017000) > libc.so.6 =3D> /lib/libc.so.6 (0x40047000) > /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x80000000) > > ldd lbermodule.so > /lib/libNoVersion.so.1 =3D> /lib/libNoVersion.so.1 > (0x4000a000) > libldap50.so =3D> > /home/michael/src/ldapcsdk50/lib/libldap50.so (0x4000c000) > libc.so.6 =3D> /lib/libc.so.6 (0x4003c000) > /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x80000000) > > > I'd then use the test ldapsearch in Sacha's test directory (with the > > aforementioned changed in ldap.open instead of ldap.LDAP for opening = a > > connection. > > This did not work. I took a look at the source to figure out how it > works and tried to track things down by typing the actions manually. > > Now please tell me what I did wrong in this transcript? It uses > ldapc.open() to make the connection. That's definitely not problem. > Maybe something's fishy with building "attrs"? > > Python 2.1 (#8, Apr 20 2001, 19:22:23) > [GCC 2.95.2 19991024 (release)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> import ldapc > >>> attrs=3Dldapc.string_array(1) > >>> ldapc.string_set(attrs,0,'objectClass') > 'objectClass' > >>> l=3Dldapc.open('localhost',389) > >>> resPtr=3Dldapc.makeLDAPMessagePtrPtr() > >>> status=3Dldapc.search_s(l,'O=3DMICHAELS',ldapc.SCOPE_BASE, > '(objectClass=3D*)',attrs,0,resPtr) > Segmentation fault > > Am I doing something wrong? > > Ciao, Michael. > > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |