... and subsequently fails with following error: fry ~ # /usr/lib64/cyrus/master -D No log handling enabled - turning on stderr logging Warning: Failed to connect to the agentx master agent ([NIL]): fatal error: wrong db version fatal error: wrong db version fatal error: wrong db version fatal error: wrong db version uninstalling sys-libs/db:4.7 before merging cyrus-imapd makes it compile and link correctly and subsequently work (although all links to db:4.7 are broken then, so db:4.7 needs to be installed again, till the next cyrus-imapd merge).
Created attachment 195054 [details] emerge --info
Created attachment 196858 [details, diff] Patch to cyrus-imapd-2.3.14-r1 to let it build with the latest version of db in the system With the help of Diego (flameeyes), here is a patch that allows cyrus-imapd to build with db-4.7. This patch will make it use db-4.7. It's also possible to force the use of db-4.6 - the latest version supported by upstream.
Although the patch allows cyrus-imapd to use db-4.7: scanelf -n /usr/lib/cyrus/* TYPE NEEDED FILE ET_EXEC libsasl2.so.2,libssl.so.0.9.8,libcrypto.so.0.9.8,libresolv.so.2,libdb-4.7.so,libpcre.so.0,libpcreposix.so.0,libc.so.6 /usr/lib/cyrus/arbitron ET_EXEC libsasl2.so.2,libssl.so.0.9.8,libcrypto.so.0.9.8,libresolv.so.2,libdb-4.7.so,libpcre.so.0,libpcreposix.so.0,libc.so.6 /usr/lib/cyrus/chk_cyrus it causes a serious issue by passing a relative path to RPATH: scanelf -r /usr/lib/cyrus/* TYPE RPATH FILE ET_EXEC db-4.7/lib /usr/lib/cyrus/arbitron ET_EXEC db-4.7/lib /usr/lib/cyrus/chk_cyrus Ned (solar) helped me trace it and it seemed to come from: cmulocal/berkdb.m4: RPATH="-Wl,-rpath,${DB_LIB_DIR}" However, after adding a patch to remove all the calls from berkdb.m4, it's still adding db-4.7/lib to the rpath. I'm attaching the non-working patch next.
Created attachment 196985 [details, diff] Patch to remove the rpath manipulation in berkdb.m4
Created attachment 197107 [details, diff] cyrus-imapd-2.3.14-db47.patch Try this one, please.
Created attachment 197376 [details, diff] Patch to fix several RPATH issues on cyrus-imapd This patch fixes quite a few issues with RPATH in cyrus-imapd. Without the patch, any call of --with-bdb in ./configure results in partial paths being added to the RPATH of the libs and executables as stated on comment #3 about the patch on comment #2.
Created attachment 197377 [details, diff] Patch for cyrus-imapd-2.3.14-r1 This patch to the ebuild adds support for the patches in comment 5 and comment 6.
(In reply to comment #7) > Created an attachment (id=197377) [edit] > Patch for cyrus-imapd-2.3.14-r1 > > This patch to the ebuild adds support for the patches in comment 5 and comment > 6. > Fixed in 2.3.14-r2. Thanks!