[Dovecot] autoconf check for ldap not linking with -lber
Maybe not a big deal, but generally you (used to?) link against both:
configure:31276: checking for ldap_init in -lldap configure:31311: gcc -o conftest -std=gnu99 -I/usr/local/include -Wall -W -Wmiss ing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat =2 -Wbad-function-cast -I/usr/sfw/include -L/usr/local/lib conftest.c -lldap -lsocket -lnsl -lrt -lsendfile >&5 Undefined first referenced symbol in file ber_sockbuf_io_readahead /usr/local/lib/libldap.so ber_sockbuf_alloc /usr/local/lib/libldap.so ber_sockbuf_io_fd /usr/local/lib/libldap.so
But could be special situation as my LDAP version is fixed, due to production environment using it. It also failed when OpenLDAP was linked against OpenSSL, since it does not try with the SSL libraries.
Lund
-- Jorgen Lundman | <lundman@lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
If anyone cares, I needed:
from: LIBS="-lldap $LIBS"
to: LIBS="-lldap -llber -lresolv $LIBS"
to compile, that's without SSL support in OpenLDAP.
Lund
Jorgen Lundman wrote:
Maybe not a big deal, but generally you (used to?) link against both:
configure:31276: checking for ldap_init in -lldap configure:31311: gcc -o conftest -std=gnu99 -I/usr/local/include -Wall -W -Wmiss ing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat =2 -Wbad-function-cast -I/usr/sfw/include -L/usr/local/lib conftest.c -lldap -lsocket -lnsl -lrt -lsendfile >&5 Undefined first referenced symbol in file ber_sockbuf_io_readahead /usr/local/lib/libldap.so ber_sockbuf_alloc /usr/local/lib/libldap.so ber_sockbuf_io_fd /usr/local/lib/libldap.so
But could be special situation as my LDAP version is fixed, due to production environment using it. It also failed when OpenLDAP was linked against OpenSSL, since it does not try with the SSL libraries.
Lund
-- Jorgen Lundman | <lundman@lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
On Tue, 2006-10-17 at 15:29 +0900, Jorgen Lundman wrote:
Maybe not a big deal, but generally you (used to?) link against both:
No, I've never even heard of lber before.
configure:31276: checking for ldap_init in -lldap configure:31311: gcc -o conftest -std=gnu99 -I/usr/local/include -Wall -W -Wmiss ing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat =2 -Wbad-function-cast -I/usr/sfw/include -L/usr/local/lib conftest.c -lldap -lsocket -lnsl -lrt -lsendfile >&5 Undefined first referenced symbol in file ber_sockbuf_io_readahead /usr/local/lib/libldap.so ber_sockbuf_alloc /usr/local/lib/libldap.so ber_sockbuf_io_fd /usr/local/lib/libldap.so
I think usually the linker links it with automatically..:
~/cvs/m/dovecot/src/auth% rm dovecot-auth ~/cvs/m/dovecot/src/auth% make |grep lber ~/cvs/m/dovecot/src/auth% ldd dovecot-auth|grep lber liblber.so.2 => /usr/lib/liblber.so.2 (0xb7b75000)
I think usually the linker links it with automatically..:
~/cvs/m/dovecot/src/auth% rm dovecot-auth ~/cvs/m/dovecot/src/auth% make |grep lber ~/cvs/m/dovecot/src/auth% ldd dovecot-auth|grep lber liblber.so.2 => /usr/lib/liblber.so.2 (0xb7b75000)
I agree, I think this is something they sorted out in later versions of LDAP. I am on an old version so it probably is ok to ignore it. Thought to show the compile line in case others end up on the same situation.
Lund
-- Jorgen Lundman | <lundman@lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
participants (2)
-
Jorgen Lundman
-
Timo Sirainen