Both trees of dovecot linked with ld.gold throws: /usr/libexec/dovecot/managesieve: symbol lookup error: /usr/lib64/dovecot/libdovecot-sieve.so.0: undefined symbol: mail_deliver_get_log_var_expand_table in log. Reproducible: Always # emerge --info FEATURES variable contains unknown value(s): Xfail-clean, Xkeepwork, Xprofile, Xsplitdebug, Xtest, profile-use Error during set creation: Could not import 'smartliverebuild.sets.SmartLiveRebuildSet' for section 'smart-live-rebuild' Portage 2.2.0_alpha116 (hardened/linux/amd64, gcc-4.5.3, glibc-2.14.1-r3, 3.4.2-hardened-r1 x86_64) ================================================================= System uname: Linux-3.4.2-hardened-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_930_@_2.80GHz-with-gentoo-2.1 Timestamp of tree: Wed, 11 Jul 2012 07:30:01 +0000 ccache version 3.1.7 [enabled] app-shells/bash: 4.2_p20 dev-lang/python: 2.7.3-r2, 3.2.3 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.7-r5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.6 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 3.4-r1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r3 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/tomoyo/conf /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS=" --quiet-build=n" FCFLAGS="-O2 -pipe" FEATURES="Xfail-clean Xkeepwork Xprofile Xsplitdebug Xtest assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs profile-use protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.mneisen.org/" LANG="pl_PL.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="pl en" MAKEOPTS="-j2 -l3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="-O" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acpi amd64 apache2 bash-completion caps hardened idn iproute2 ipv6 mmap mmx mmxext modules multilib nls openmp openssl smp sse sse2 sse3 sse4 sse4a ssse3 syslog threads threadsafe unicode urandom vhosts vim-syntax xtpax" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon auth_digest authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user cache cgid dav dav_fs dav_lock dir env expires ext_filter filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif status unique_id usertrack vhost_alias" APACHE2_MPMS="prefork" CURL_SSL="openssl" ELIBC="glibc" KERNEL="linux" LINGUAS="pl en" NGINX_MODULES_HTTP="access browser charset gzip map limit_zone proxy rewrite stub_status" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2" USERLAND="GNU" XTABLES_ADDONS="geoip ipset6 psd sysrq tarpit" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
I couldn't reproduce this with dovecot-2.1.8 on a non-hardened system. Can you post the full build log please?
Created attachment 317950 [details] build.log Please note those error occurs when i run managesieve binary after installing.
First impression is that it's an ld.gold bug. I commited dovecot-2.1.8-r1 (masked for now) which includes an experimental patch for this issue. managesieve binary compiles fine with gold with binutils-2.21.1-r1, binutils-2.22-r1 and binutils-2.22.52.04 but segfaults at runtime - make check also fails with the $SUBJECT message btw. But reportedly, it works on debian with binutils-2.20. See the thread at: http://dovecot.org/list/dovecot/2012-July/067067.html So, it looks like a regression in ld.gold or a bug on our part. I am cc'ing toolchain in the hope that they have a clue.
/usr/lib64/dovecot/libdovecot-lda.so provides the mail_deliver_get_log_var_expand_table symbol, but /usr/lib64/dovecot/libdovecot-sieve.so doesn't link against it. sounds like a bug in dovecot.
Should be fixed in =net-mail/dovecot-2.1.9. Thanks for the bug report.
I checked dovecot-2.1.9 and compiles fine for me, thanks! What about 2.0.*?