[Dovecot] problem with ldap
Hi,
dovecot-1.2 from hg.dovecot.org openldap-2.4.11
passdb.o: In function passdbs_init': /home/src/dovecot-1.2/src/auth/passdb.c:230: undefined reference to
passdb_ldap'
userdb.o: In function userdbs_init': /home/src/dovecot-1.2/src/auth/userdb.c:177: undefined reference to
userdb_ldap'
collect2: ld returned 1 exit status
-- Xueron Nee http://www.xueron.com
The same with the src downloaded from: http://dovecot.org/releases/1.2/beta/dovecot-1.2.beta2.tar.gz
BDB-4.6, openldap-2.4.11, openssl, mysql were installed in /home/dovecot.
# CPPFLAGS="-I/home/dovecot/include -I/home/dovecot/include/mysql"
LDFLAGS="-L/home/dovecot/lib -L/home/dovecot/lib/mysql"
./configure --prefix=/home/dovecot
--with-ldap=plugin --with-db
--with-sql=plugin --with-mysql
--with-zlib --with-bzlib
--with-ssl=openssl
--with-ssldir=/home/dovecot/etc/ssl
--with-gssapi=plugin
Install prefix ...................... : /home/dovecot 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 ........ : plugin Building with user database modules . : static prefetch passwd passwd-file checkpassword ldap (plugin) sql nss Building with password lookup modules : passwd passwd-file shadow pam checkpassword ldap (plugin) sql Building with SQL drivers ............: mysql (plugins) NOTE: This is the UNSTABLE development branch of Dovecot v1.2.
On Tue, 17 Mar 2009 11:26:21 +0800 Xueron Nee <xueron@xueron.com> wrote:
Hi,
dovecot-1.2 from hg.dovecot.org openldap-2.4.11
passdb.o: In function
passdbs_init': /home/src/dovecot-1.2/src/auth/passdb.c:230: undefined reference to
passdb_ldap' userdb.o: In functionuserdbs_init': /home/src/dovecot-1.2/src/auth/userdb.c:177: undefined reference to
userdb_ldap' collect2: ld returned 1 exit status-- Xueron Nee http://www.xueron.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3941 (20090317) __________
The message was checked by ESET NOD32 Antivirus.
-- Xueron Nee http://www.xueron.com
And, It's OK with the src downloaded from http://dovecot.org/releases/1.1/dovecot-1.1.12.tar.gz
with the same
# CPPFLAGS="-I/home/dovecot/include -I/home/dovecot/include/mysql"
LDFLAGS="-L/home/dovecot/lib -L/home/dovecot/lib/mysql"
./configure --prefix=/home/dovecot
--with-ldap=plugin --with-db
--with-sql=plugin --with-mysql
--with-zlib --with-bzlib
--with-ssl=openssl
--with-ssldir=/home/dovecot/etc/ssl
--with-gssapi=plugin
:)
On Tue, 17 Mar 2009 11:47:33 +0800 Xueron Nee <xueron@xueron.com> wrote:
The same with the src downloaded from: http://dovecot.org/releases/1.2/beta/dovecot-1.2.beta2.tar.gz
BDB-4.6, openldap-2.4.11, openssl, mysql were installed in /home/dovecot.
# CPPFLAGS="-I/home/dovecot/include -I/home/dovecot/include/mysql"
LDFLAGS="-L/home/dovecot/lib -L/home/dovecot/lib/mysql"
./configure --prefix=/home/dovecot
--with-ldap=plugin --with-db
--with-sql=plugin --with-mysql
--with-zlib --with-bzlib
--with-ssl=openssl
--with-ssldir=/home/dovecot/etc/ssl
--with-gssapi=pluginInstall prefix ...................... : /home/dovecot 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 ........ : plugin Building with user database modules . : static prefetch passwd passwd-file checkpassword ldap (plugin) sql nss Building with password lookup modules : passwd passwd-file shadow pam checkpassword ldap (plugin) sql Building with SQL drivers ............: mysql (plugins) NOTE: This is the UNSTABLE development branch of Dovecot v1.2.
On Tue, 17 Mar 2009 11:26:21 +0800 Xueron Nee <xueron@xueron.com> wrote:
Hi,
dovecot-1.2 from hg.dovecot.org openldap-2.4.11
passdb.o: In function
passdbs_init': /home/src/dovecot-1.2/src/auth/passdb.c:230: undefined reference to
passdb_ldap' userdb.o: In functionuserdbs_init': /home/src/dovecot-1.2/src/auth/userdb.c:177: undefined reference to
userdb_ldap' collect2: ld returned 1 exit status-- Xueron Nee http://www.xueron.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3941 (20090317) __________
The message was checked by ESET NOD32 Antivirus.
-- Xueron Nee http://www.xueron.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3941 (20090317) __________
The message was checked by ESET NOD32 Antivirus.
-- Xueron Nee http://www.xueron.com
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
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
On Mar 26, 2009, at 5:20 AM, Xueron Nee wrote:
It's OK when not build ldap as a plugin.
This should help: http://hg.dovecot.org/dovecot-1.2/rev/643a96aec996
seems still has some problems :)
Mar 27 10:03:44 mail dovecot: Dovecot v1.2.beta4 starting up (core dumps disabled) Mar 27 10:03:44 mail dovecot: Panic: auth(default): passdb_register_module(ldap): Already registered Mar 27 10:03:44 mail dovecot: auth(default): Raw backtrace: dovecot-auth [0x806bf30] -> dovecot-auth [0x806bf8a] -> dovecot-auth [0x806b84c] -> dovecot-auth [0x805fff8] -> /home/amos/lib/dovecot/auth/libauthdb_ldap.so(authdb_ldap_init+0x20) [0xc3beb0] -> dovecot-auth(module_dir_init+0x26) [0x8072076] -> dovecot-auth(main+0x152) [0x805b112] -> /lib/libc.so.6(__libc_start_main+0xdc) [0x901dec] -> dovecot-auth [0x8050ea1] Mar 27 10:03:44 mail dovecot: child 20274 (auth) killed with signal 6 (core dumps disabled) Mar 27 10:03:44 mail dovecot: Fatal: Auth process died too early - shutting down
On Thu, 26 Mar 2009 18:38:24 -0400 Timo Sirainen <tss@iki.fi> wrote:
On Mar 26, 2009, at 5:20 AM, Xueron Nee wrote:
It's OK when not build ldap as a plugin.
This should help: http://hg.dovecot.org/dovecot-1.2/rev/643a96aec996
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3967 (20090326) __________
The message was checked by ESET NOD32 Antivirus.
-- Xueron Nee http://www.xueron.com
On Fri, 2009-03-27 at 09:56 +0800, Xueron Nee wrote:
seems still has some problems :)
Mar 27 10:03:44 mail dovecot: Dovecot v1.2.beta4 starting up (core dumps disabled) Mar 27 10:03:44 mail dovecot: Panic: auth(default): passdb_register_module(ldap): Already registered
How about now: http://hg.dovecot.org/dovecot-1.2/rev/4aa05d7d8b07
participants (3)
-
Michal Hlavinka
-
Timo Sirainen
-
Xueron Nee