As described in the dovecot INSTALL guide (http://www.dovecot.org/doc/INSTALL) "Dovecot prefers GNUTLS". The dovecot ebuild allows this by including "gnutls" in the USE flags. However attempting to build with this USE flag set causes a failure of compilation. Reproducible: Always Steps to Reproduce: 1. Edit /etc/make.conf to include "gnutls" in the USE flags 2. emerge dovecot Actual Results: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/lib -DPKG_RUNDIR=\""/var/run/dovecot"\" -DSBINDIR=\""/usr/sbin"\" -O2 -march=pentium4 -fomit-frame-pointer -ffast-math -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -c ssl-proxy-gnutls.c gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/lib -DPKG_RUNDIR=\""/var/run/dovecot"\" -DSBINDIR=\""/usr/sbin"\" -O2 -march=pentium4 -fomit-frame-pointer -ffast-math -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -c ssl-proxy-openssl.c ssl-proxy-gnutls.c: In function `ssl_handshake': ssl-proxy-gnutls.c:279: warning: implicit declaration of function `gnutls_handshake_get_direction' ssl-proxy-gnutls.c: In function `initialize_state': ssl-proxy-gnutls.c:301: warning: implicit declaration of function `gnutls_cert_type_set_priority' ssl-proxy-gnutls.c: In function `ssl_proxy_new': ssl-proxy-gnutls.c:317: warning: passing arg 2 of `gnutls_transport_set_ptr' makes pointer from integer without a cast ssl-proxy-gnutls.c: In function `read_dh_parameters': ssl-proxy-gnutls.c:415: warning: `gnutls_dh_params_set' is deprecated (declared at /usr/include/gnutls/compat8.h:81) ssl-proxy-gnutls.c: In function `read_rsa_parameters': ssl-proxy-gnutls.c:441: warning: `gnutls_rsa_params_set' is deprecated (declared at /usr/include/gnutls/compat8.h:76) ssl-proxy-gnutls.c: In function `ssl_proxy_init': ssl-proxy-gnutls.c:507: warning: implicit declaration of function `gnutls_certificate_allocate_cred' ssl-proxy-gnutls.c:519: error: void value not ignored as it ought to be ssl-proxy-gnutls.c:522: error: void value not ignored as it ought to be ssl-proxy-gnutls.c: In function `ssl_proxy_deinit': ssl-proxy-gnutls.c:544: warning: implicit declaration of function `gnutls_certificate_free_cred' make[3]: *** [ssl-proxy-gnutls.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/dovecot-0.99.10.9-r1/work/dovecot-0.99.10.9/src/login-common' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/dovecot-0.99.10.9-r1/work/dovecot-0.99.10.9/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/dovecot-0.99.10.9-r1/work/dovecot-0.99.10.9' make: *** [all-recursive-am] Error 2 !!! ERROR: net-mail/dovecot-0.99.10.9-r1 failed. !!! Function src_compile, Line 71, Exitcode 2 !!! (no error message) Expected Results: Successful compilation. Oddly enough, dovecot insists on downgrading the version of gnutls before attempting to build. Emerging gnutls on it's own will install net-libs/gnutls-1.0.17. Emerging dovecot with this installed will first of all downgrade it to net-libs/gnutls-1.0.4. This might be completely unrelated to the above behaviour. emerge info: Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.4.26-bytemark-uml-20040706-1) ================================================================= System uname: 2.4.26-bytemark-uml-20040706-1 i686 UML Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -ffast-math" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -ffast-math" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo-distfiles" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://mirror.bytemark.co.uk/gentoo" USE="apm arts avi berkdb bitmap-fonts crypt cups encode f77 foomaticdb gdbm gif gnutls gpm gtk2 imap imlib jpeg libg++ libwww mad mikmod motif mpeg ncurses nls nopop3d oggvorbis pam pdflib perl png python quicktime readline sasl slang spell ssl svga tcpd truetype x86 xml2 xmms xprint xv zlib"
Have you tried using .11 by any chance?
It turns out that gnutls support is currently broken and likely to remain so for quite some time according to upstream: http://www.dovecot.org/list/dovecot/2004-November/005169.html Removed gnutls support. Thanks!