ldap-haskell questions

Hi, to start off, I'm using ldap-haskell straight from its darcs repo under GHC-6.4.1, and it works. Just not quite like I want. First, I can't make a static compile: $ ghc --make prog.hs -o prog works without a warning, while $ ghc --make prog.hs -o prog -optl -static [...] /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(os-ip.o)(.text+0x38a): In function `ldap_pvt_is_socket_ready': : warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(os-ip.o)(.text+0x381): In function `ldap_pvt_is_socket_ready': : warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(os-ip.o)(.text+0x684): In function `ldap_connect_to_host': : warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(util-int.o)(.text+0x232): In function `ldap_pvt_gethostbyaddr_a': : warning: Using 'gethostbyaddr_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(util-int.o)(.text+0x64): In function `ldap_pvt_gethostbyname_a': : warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(open.o)(.text+0x1b7): In function `ldap_create': : undefined reference to `ber_memcalloc' /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libldap.a(open.o)(.text+0x26d): In function `ldap_create': : undefined reference to `ber_sockbuf_alloc' [...] (plenty of undefined references elided) If I cut out the LDAP part, the above command creates a static executable just fine. Second, I find no trace of SSL/TLS routines. Is that really left out, or do I overlook something? -- Thanks, Feri.

On Thu, 13 Jul 2006, Ferenc Wagner wrote: ...
Second, I find no trace of SSL/TLS routines. Is that really left out, or do I overlook something?
OpenLDAP supports an option LDAP_OPT_X_TLS -- ldap_set_option Nothing LDAP_OPT_X_TLS LDAP_OPT_X_TLS_DEMAND ... ldapconnection <- ldap_initialize url I assume you will find something like that there (the above is actually from my own LDAP interface, but since I haven't seen any other response to this question ...) Have no idea about static binaries, even what that means. When I compile with ghc, I get reasonably static libraries inasmuch as there aren't any GHC shared objects, but of course libc is shared, as well as anything specified on the link command that turns out to be a shared library. If for example I have both a libldap.so and libldap.a and I want to link to the latter (as indeed I would), then it's up to me to say so on the link command, libldap.a instead of -lldap. Pardon me if that's obvious! Donn Cave, donn@drizzle.com

Donn Cave
On Thu, 13 Jul 2006, Ferenc Wagner wrote: ...
Second, I find no trace of SSL/TLS routines. Is that really left out, or do I overlook something?
OpenLDAP supports an option LDAP_OPT_X_TLS --
ldap_set_option Nothing LDAP_OPT_X_TLS LDAP_OPT_X_TLS_DEMAND ... ldapconnection <- ldap_initialize url
I assume you will find something like that there (the above is actually from my own LDAP interface, but since I haven't seen any other response to this question ...)
find -type f | xargs grep -i tls revealed nothing in my ldap-haskell tree. Isn't your interface available for the public by chance?
Have no idea about static binaries, even what that means. When I compile with ghc, I get reasonably static libraries inasmuch as there aren't any GHC shared objects, but of course libc is shared, as well as anything specified on the link command that turns out to be a shared library. If for example I have both a libldap.so and libldap.a and I want to link to the latter (as indeed I would), then it's up to me to say so on the link command, libldap.a instead of -lldap. Pardon me if that's obvious!
Perhaps it should have been. I tried putting -optl -static on the command line here are there, and that indeed worked until I started using the LDAP binding. Erred out afterwards. But putting in libldap.a looks like a good idea, I will try. -- Thanks, Feri.
participants (2)
-
Donn Cave
-
Ferenc Wagner