[Dovecot] Compiling Dovecot with-notify=inotify
Hi,
I'm trying to compile Dovecot beta2 with inotify support, but this is unsuccessfull.
First, it seems that the configure script is looking for inotify.h in /usr/include/sys, whereas it is in /usr/include/linux on my Debian Sarge system. But that's a minor point, let's make a symlink.
% dpkg -S /usr/include/linux/inotify.h linux-kernel-headers: /usr/include/linux/inotify.h
% dpkg -l linux-kernel-headers ii linux-kernel-headers 2.6.13+0rc3-2 Linux Kernel Headers for development
Then the compilation fails with the following error :
i386-linux-gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -o dovecot-auth auth.o auth-cache.o
auth-client-connection.o auth-master-connection.o auth-master-listener.o
auth-module.o auth-request.o auth-request-handler.o auth-stream.o
auth-worker-client.o auth-worker-server.o db-ldap.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-gssapi.o
mech-rpa.o mech-apop.o passdb.o passdb-blocking.o passdb-bsdauth.o
passdb-cache.o passdb-ldap.o passdb-passwd.o passdb-passwd-file.o
passdb-pam.o passdb-checkpassword.o passdb-shadow.o passdb-vpopmail.o
passdb-sql.o userdb.o userdb-blocking.o userdb-ldap.o userdb-passwd.o
userdb-passwd-file.o userdb-prefetch.o userdb-static.o userdb-vpopmail.o
userdb-sql.o -Wl,--export-dynamic libpassword.a
../lib-settings/libsettings.a ../lib-ntlm/libntlm.a ../lib-sql/libsql.a
../lib/liblib.a -lcrypt -lpam -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto
-lcom_err -lresolv -lldap -lpq /usr/lib/libmysqlclient.so -lz -ldl
../lib/liblib.a(ioloop-notify-inotify.o)(.text+0x185): In function
io_loop_notify_add': /home/nico/sources/dovecot/dovecot-1.0.beta2/src/lib/ioloop-notify-inotify.c:102: undefined reference to
inotify_add_watch'
../lib/liblib.a(ioloop-notify-inotify.o)(.text+0x26d): In function
io_loop_notify_remove': /home/nico/sources/dovecot/dovecot-1.0.beta2/src/lib/ioloop-notify-inotify.c:145: undefined reference to
inotify_rm_watch'
../lib/liblib.a(ioloop-notify-inotify.o)(.text+0x2de): In function
io_loop_notify_handler_init': /home/nico/sources/dovecot/dovecot-1.0.beta2/src/lib/ioloop-notify-inotify.c:163: undefined reference to
inotify_init'
Am I missing something ? What should be done to compile Dovecot with inotify support ?
Thanks in advance,
-- Nico L'homme est intelligent parce qu'il a une main. -+- Anaxagore -+-
Nicolas STRANSKY wrote:
I'm trying to compile Dovecot beta2 with inotify support, but this is unsuccessfull.
This whole inotify header thing is a little strange. At first, dovecot needed linux/inotify.h and linux/inotify-syscalls.h. This was changed some days ago to a single header file, sys/inotify.h. But now the syscall numbers are missing...
I solved it on my system by fetching both header files from ftp://ftp.kernel.org/pub/linux/kernel/people/rml/inotify/headers/ and merging them into a single inotify.h. Don't know if this the right thing[tm], but it works. It's now in the Wiki (CompilingSource). Comments and objections welcome.
On 2006-01-23 13:28:29 +0100, Jakob Hirsch wrote:
This whole inotify header thing is a little strange. At first, dovecot needed linux/inotify.h and linux/inotify-syscalls.h. This was changed some days ago to a single header file, sys/inotify.h. But now the syscall numbers are missing...
I solved it on my system by fetching both header files from ftp://ftp.kernel.org/pub/linux/kernel/people/rml/inotify/headers/ and merging them into a single inotify.h. Don't know if this the right thing[tm], but it works. It's now in the Wiki (CompilingSource). Comments and objections welcome.
you should _not_ include linux/* in a userspace program. at least on my boxes it works just fine with including "sys/inotify.h".
darix
Marcus Rueckert wrote:
you should _not_ include linux/* in a userspace program. at least on my
Nobody said so. And it's probably why it was changed in dovecot.
boxes it works just fine with including "sys/inotify.h".
Good for you. But that won't help me on my FC4 and Gentoo systems, which both have no such file. Which distribution do you use? And how does your inotify.h look like? (Would be nice if you can put it on a web server)
On 2006-01-23 14:12:07 +0100, Jakob Hirsch wrote:
boxes it works just fine with including "sys/inotify.h".
Good for you. But that won't help me on my FC4 and Gentoo systems, which both have no such file. Which distribution do you use? And how does your inotify.h look like? (Would be nice if you can put it on a web server)
The factory branch of SUSE Linux (http://www.opensuse.org/Factory_Distribution) I attached the headers.
hope this helps
darix
participants (3)
-
Jakob Hirsch
-
Marcus Rueckert
-
Nicolas STRANSKY