It's OK when not build ldap as a plugin.
I checked passed.c and userdb.c and compared with 1.1.x, and modified them:
change: passdb_register_module(&passdb_ldap);
to: #if defined(PASSDB_LDAP) && defined(BUILTIN_LDAP) passdb_register_module(&passdb_ldap); #endif
and OK.
There are two macros for ldap, PASSDB_LDAP and BUILTIN_LDAP, and for other dbs only one PASSDB_xxxx, I think that is the problem here.
1.2's cleaned up such codes in passdb.c and userdb.c :)
On Mon, 23 Mar 2009 15:31:16 +0100 Michal Hlavinka <mhlavink@redhat.com> wrote:
And the same problem here, I can't get it compiled. (This is first time, I'm packaging 1.2 branch).
It fails for ldap plugin (./configure --with-ldap=plugin is enough to reproduce this)
linking src/auth/dovecot-auth
/bin/sh ../../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2 -I/usr/kerberos/include -export-dynamic -o dovecot-auth auth.o auth-cache.o auth-client-connection.o auth-master-connection.o auth-master-listener.o auth-request.o auth-request-handler.o auth-stream.o auth-worker-client.o auth-worker-server.o db-checkpassword.o db-sql.o db-passwd-file.o main.o mech.o mech-anonymous.o mech-plain.o mech-login.o mech-cram-md5.o mech-digest-md5.o mech-ntlm.o mech-otp.o mech-skey.o mech-rpa.o mech-apop.o mech-winbind.o otp-skey-common.o plain-common.o passdb.o passdb-blocking.o passdb-bsdauth.o passdb-cache.o passdb-checkpassword.o passdb-passwd.o passdb-passwd-file.o passdb-pam.o passdb-shadow.o passdb-sia.o passdb-vpopmail.o passdb-sql.o userdb.o userdb-blocking.o userdb-checkpassword.o userdb-nss.o userdb-passwd.o userdb-passwd-file.o userdb-prefetch.o userdb-static.o userdb-vpopmail.o userdb-sql.o mech-gssapi.o libpassword.a ../lib-settings/libsettings.a ../lib-ntlm/libntlm.a ../lib-otp/libotp.a ../lib-sql/libsql.a ../lib/liblib.a -lcrypt -lpam -export-dynamic -ldl
fails with:
In function
passdbs_init': /home/mhlavink/cvsf/dovecot/devel/dovecot-1.2.beta3/src/auth/passdb.c:230: undefined reference to
passdb_ldap' userdb.o: In functionuserdbs_init': /home/mhlavink/cvsf/dovecot/devel/dovecot-1.2.beta3/src/auth/userdb.c:177: undefined reference to
userdb_ldap'It seems that ldap sources are not compiled (and not linked).
If I modify Makefile and add them (db-ldap.c passdb-ldap.c userdb-ldap.c ) to am__dovecot_auth_SOURCES_DIST list, it works fine.
I have LDAP headers and libraries installed.
checking for ldap_init in -lldap... yes checking ldap.h usability... yes checking ldap.h presence... yes checking for ldap.h... yes checking for ldap_initialize in -lldap... yes checking for ldap_start_tls_s in -lldap... yes ... Install prefix ...................... : /usr/local File offsets ........................ : 64bit I/O loop method ..................... : epoll File change notification method ..... : inotify Building with SSL support ........... : yes (OpenSSL) Building with IPv6 support .......... : yes Building with pop3 server ........... : yes Building with mail delivery agent .. : yes Building with GSSAPI support ........ : no Building with user database modules . : static prefetch passwd passwd-file checkpassword ldap (plugin) nss Building with password lookup modules : passwd passwd-file shadow pam checkpassword ldap (plugin)
It seems to me that configure/Makefile is not working or am I doing something wrong?
Regards,
Michal Hlavinka
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3954 (20090323) __________
The message was checked by ESET NOD32 Antivirus.
-- Xueron Nee http://www.xueron.com