[Dovecot] Dovecot 2.1 with custom OpenSSL fails to build

Andreas M. Kirchwitz amk at spamfence.net
Mon Mar 5 02:32:17 EET 2012


Hello Timo!

Timo Sirainen <tss at iki.fi> wrote:

 > The SSL libraries shouldn't be linked when imapc isn't built. Also it probably wouldn't have built with you if you used configure --without-shared-libs. I did a bit large change that hopefully fixes everything:
 > http://hg.dovecot.org/dovecot-2.1/rev/e540404debb7

Thanks for this patch. I've applied it to the dovecot-20120303
nightly snapshot. The good news is, compilation works fine.
The bad news is, the libraries and binaries don't work because
they don't find the custom SSL libraries.

	Greetings, Andreas

===============================================================================

$ patch -p1 -s < ../dovecot-20120303-e540404debb7.patch
$ env SSL_CFLAGS="-I/usr/local/ssl/include" SSL_LIBS="-L/usr/local/ssl/lib -Wl,-R/usr/local/ssl/lib -lcrypto -lssl" ./configure --prefix=/usr/local/Dovecot-20120303 --with-ssl=openssl --with-ssldir=/usr/local/Dovecot-20120303/etc/dovecot/certs && make && make install

===============================================================================

$ ldd src/*/.libs/*.so
src/auth/.libs/libauthdb_imap.so:
        linux-gate.so.1 =>  (0x0013a000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdovecot.so.0 => /usr/local/src/dovecot-20120303/src/lib-dovecot/.libs/libdovecot.so.0 (0x0091d000)
        librt.so.1 => /lib/librt.so.1 (0x003c7000)
        libc.so.6 => /lib/libc.so.6 (0x00c6a000)
        libdl.so.2 => /lib/libdl.so.2 (0x009a6000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00491000)
        /lib/ld-linux.so.2 (0x007a4000)
src/lib-dovecot/.libs/libdovecot.so:
        linux-gate.so.1 =>  (0x0053c000)
        libdl.so.2 => /lib/libdl.so.2 (0x0056d000)
        librt.so.1 => /lib/librt.so.1 (0x00925000)
        libc.so.6 => /lib/libc.so.6 (0x00626000)
        /lib/ld-linux.so.2 (0x00a61000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x003ec000)
src/lib-lda/.libs/libdovecot-lda.so:
        linux-gate.so.1 =>  (0x00b75000)
        libdovecot-storage.so.0 => /usr/local/src/dovecot-20120303/src/lib-storage/.libs/libdovecot-storage.so.0 (0x00c9a000)
        libdovecot.so.0 => /usr/local/src/dovecot-20120303/src/lib-dovecot/.libs/libdovecot.so.0 (0x0062d000)
        librt.so.1 => /lib/librt.so.1 (0x00b3d000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdl.so.2 => /lib/libdl.so.2 (0x002f1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00ab1000)
        /lib/ld-linux.so.2 (0x00f23000)
src/lib-sql/.libs/libdovecot-sql.so:
        linux-gate.so.1 =>  (0x006d3000)
        libdovecot.so.0 => /usr/local/src/dovecot-20120303/src/lib-dovecot/.libs/libdovecot.so.0 (0x0096c000)
        libdl.so.2 => /lib/libdl.so.2 (0x0078c000)
        librt.so.1 => /lib/librt.so.1 (0x00110000)
        libc.so.6 => /lib/libc.so.6 (0x00119000)
        /lib/ld-linux.so.2 (0x00731000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00569000)
src/lib-ssl-iostream/.libs/libdovecot-ssl.so:
        linux-gate.so.1 =>  (0x00ea1000)
        libdl.so.2 => /lib/libdl.so.2 (0x00b31000)
        libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x00110000)
        libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0x00dcf000)
        librt.so.1 => /lib/librt.so.1 (0x00fa5000)
        libc.so.6 => /lib/libc.so.6 (0x002d3000)
        /lib/ld-linux.so.2 (0x002b4000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00d3c000)
src/lib-storage/.libs/libdovecot-storage.so:
        linux-gate.so.1 =>  (0x002ee000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdovecot.so.0 => /usr/local/src/dovecot-20120303/src/lib-dovecot/.libs/libdovecot.so.0 (0x00395000)
        libdl.so.2 => /lib/libdl.so.2 (0x00958000)
        librt.so.1 => /lib/librt.so.1 (0x00333000)
        libc.so.6 => /lib/libc.so.6 (0x00d45000)
        /lib/ld-linux.so.2 (0x008e9000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00f06000)
src/login-common/.libs/libdovecot-login.so:
        linux-gate.so.1 =>  (0x00d66000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdovecot.so.0 => /usr/local/src/dovecot-20120303/src/lib-dovecot/.libs/libdovecot.so.0 (0x00c82000)
        librt.so.1 => /lib/librt.so.1 (0x00f64000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        libdl.so.2 => /lib/libdl.so.2 (0x00b26000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0029a000)
        /lib/ld-linux.so.2 (0x00520000)

===============================================================================

$ ldd /usr/local/Dovecot-20120303/lib/dovecot/*.so /usr/local/Dovecot-20120303/*bin/*
/usr/local/Dovecot-20120303/lib/dovecot/lib01_acl_plugin.so:
        linux-gate.so.1 =>  (0x00230000)
        librt.so.1 => /lib/librt.so.1 (0x00b69000)
        libc.so.6 => /lib/libc.so.6 (0x00231000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00a82000)
        /lib/ld-linux.so.2 (0x007eb000)
/usr/local/Dovecot-20120303/lib/dovecot/lib02_imap_acl_plugin.so:
        linux-gate.so.1 =>  (0x004fb000)
        lib01_acl_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib01_acl_plugin.so (0x00c6f000)
        librt.so.1 => /lib/librt.so.1 (0x0061d000)
        libc.so.6 => /lib/libc.so.6 (0x001dd000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00fae000)
        /lib/ld-linux.so.2 (0x00b89000)
/usr/local/Dovecot-20120303/lib/dovecot/lib02_lazy_expunge_plugin.so:
        linux-gate.so.1 =>  (0x00e5b000)
        librt.so.1 => /lib/librt.so.1 (0x00847000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0039d000)
        /lib/ld-linux.so.2 (0x00a4e000)
/usr/local/Dovecot-20120303/lib/dovecot/lib05_snarf_plugin.so:
        linux-gate.so.1 =>  (0x001e2000)
        librt.so.1 => /lib/librt.so.1 (0x00441000)
        libc.so.6 => /lib/libc.so.6 (0x00220000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00cfa000)
        /lib/ld-linux.so.2 (0x00acd000)
/usr/local/Dovecot-20120303/lib/dovecot/lib10_quota_plugin.so:
        linux-gate.so.1 =>  (0x00fa9000)
        librt.so.1 => /lib/librt.so.1 (0x00bb4000)
        libc.so.6 => /lib/libc.so.6 (0x00d5e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00be7000)
        /lib/ld-linux.so.2 (0x0055c000)
/usr/local/Dovecot-20120303/lib/dovecot/lib11_imap_quota_plugin.so:
        linux-gate.so.1 =>  (0x00426000)
        lib10_quota_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib10_quota_plugin.so (0x004c9000)
        librt.so.1 => /lib/librt.so.1 (0x00e35000)
        libc.so.6 => /lib/libc.so.6 (0x009b5000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00146000)
        /lib/ld-linux.so.2 (0x00507000)
/usr/local/Dovecot-20120303/lib/dovecot/lib11_trash_plugin.so:
        linux-gate.so.1 =>  (0x00baf000)
        lib10_quota_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib10_quota_plugin.so (0x00d8b000)
        librt.so.1 => /lib/librt.so.1 (0x0041e000)
        libc.so.6 => /lib/libc.so.6 (0x00bb6000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0088a000)
        /lib/ld-linux.so.2 (0x00a6d000)
/usr/local/Dovecot-20120303/lib/dovecot/lib15_notify_plugin.so:
        linux-gate.so.1 =>  (0x00110000)
        librt.so.1 => /lib/librt.so.1 (0x00f77000)
        libc.so.6 => /lib/libc.so.6 (0x00146000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00df9000)
        /lib/ld-linux.so.2 (0x004dd000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_autocreate_plugin.so:
        linux-gate.so.1 =>  (0x005d2000)
        librt.so.1 => /lib/librt.so.1 (0x007ed000)
        libc.so.6 => /lib/libc.so.6 (0x00262000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00b48000)
        /lib/ld-linux.so.2 (0x00243000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_expire_plugin.so:
        linux-gate.so.1 =>  (0x00110000)
        librt.so.1 => /lib/librt.so.1 (0x0099e000)
        libc.so.6 => /lib/libc.so.6 (0x0013c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00a93000)
        /lib/ld-linux.so.2 (0x00460000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_fts_plugin.so:
        linux-gate.so.1 =>  (0x002c1000)
        librt.so.1 => /lib/librt.so.1 (0x00ef2000)
        libc.so.6 => /lib/libc.so.6 (0x00c3a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0028d000)
        /lib/ld-linux.so.2 (0x003f5000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_listescape_plugin.so:
        linux-gate.so.1 =>  (0x0027c000)
        librt.so.1 => /lib/librt.so.1 (0x007cf000)
        libc.so.6 => /lib/libc.so.6 (0x00427000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00110000)
        /lib/ld-linux.so.2 (0x00d25000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_mail_log_plugin.so:
        linux-gate.so.1 =>  (0x00cff000)
        lib15_notify_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib15_notify_plugin.so (0x00a2b000)
        librt.so.1 => /lib/librt.so.1 (0x00152000)
        libc.so.6 => /lib/libc.so.6 (0x00355000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00680000)
        /lib/ld-linux.so.2 (0x00c16000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_virtual_plugin.so:
        linux-gate.so.1 =>  (0x0074d000)
        librt.so.1 => /lib/librt.so.1 (0x008d2000)
        libc.so.6 => /lib/libc.so.6 (0x004c2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x009c5000)
        /lib/ld-linux.so.2 (0x0038e000)
/usr/local/Dovecot-20120303/lib/dovecot/lib20_zlib_plugin.so:
        linux-gate.so.1 =>  (0x004ab000)
        libz.so.1 => /lib/libz.so.1 (0x0091c000)
        libbz2.so.1 => /lib/libbz2.so.1 (0x00c4d000)
        librt.so.1 => /lib/librt.so.1 (0x00b30000)
        libc.so.6 => /lib/libc.so.6 (0x0075b000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00611000)
        /lib/ld-linux.so.2 (0x00bfd000)
/usr/local/Dovecot-20120303/lib/dovecot/lib21_fts_squat_plugin.so:
        linux-gate.so.1 =>  (0x00df4000)
        lib20_fts_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib20_fts_plugin.so (0x00ea8000)
        librt.so.1 => /lib/librt.so.1 (0x0021d000)
        libc.so.6 => /lib/libc.so.6 (0x00bd1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00d63000)
        /lib/ld-linux.so.2 (0x00b83000)
/usr/local/Dovecot-20120303/lib/dovecot/lib30_imap_zlib_plugin.so:
        linux-gate.so.1 =>  (0x0059f000)
        lib20_zlib_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib20_zlib_plugin.so (0x00652000)
        librt.so.1 => /lib/librt.so.1 (0x00f2d000)
        libc.so.6 => /lib/libc.so.6 (0x00735000)
        libz.so.1 => /lib/libz.so.1 (0x00110000)
        libbz2.so.1 => /lib/libbz2.so.1 (0x00125000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00136000)
        /lib/ld-linux.so.2 (0x001f9000)
/usr/local/Dovecot-20120303/lib/dovecot/lib90_stats_plugin.so:
        linux-gate.so.1 =>  (0x004c0000)
        librt.so.1 => /lib/librt.so.1 (0x00110000)
        libc.so.6 => /lib/libc.so.6 (0x006b2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00992000)
        /lib/ld-linux.so.2 (0x00d92000)
/usr/local/Dovecot-20120303/lib/dovecot/lib95_imap_stats_plugin.so:
        linux-gate.so.1 =>  (0x0076b000)
        lib90_stats_plugin.so => /usr/local/Dovecot-20120303/lib/dovecot/lib90_stats_plugin.so (0x00b90000)
        librt.so.1 => /lib/librt.so.1 (0x00215000)
        libc.so.6 => /lib/libc.so.6 (0x0021e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00634000)
        /lib/ld-linux.so.2 (0x00e48000)
/usr/local/Dovecot-20120303/lib/dovecot/libdovecot-lda.so:
        linux-gate.so.1 =>  (0x00d82000)
        libdovecot-storage.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot-storage.so.0 (0x009bb000)
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00110000)
        librt.so.1 => /lib/librt.so.1 (0x00542000)
        libc.so.6 => /lib/libc.so.6 (0x002f6000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdl.so.2 => /lib/libdl.so.2 (0x006a6000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00189000)
        /lib/ld-linux.so.2 (0x002d7000)
/usr/local/Dovecot-20120303/lib/dovecot/libdovecot-login.so:
        linux-gate.so.1 =>  (0x00f96000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00e56000)
        librt.so.1 => /lib/librt.so.1 (0x00371000)
        libc.so.6 => /lib/libc.so.6 (0x00168000)
        libdl.so.2 => /lib/libdl.so.2 (0x00623000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00ccd000)
        /lib/ld-linux.so.2 (0x0074f000)
/usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so:
        linux-gate.so.1 =>  (0x00bf3000)
        libdl.so.2 => /lib/libdl.so.2 (0x00a54000)
        librt.so.1 => /lib/librt.so.1 (0x00ad8000)
        libc.so.6 => /lib/libc.so.6 (0x00e63000)
        /lib/ld-linux.so.2 (0x00b1c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x005ac000)
/usr/local/Dovecot-20120303/lib/dovecot/libdovecot-sql.so:
        linux-gate.so.1 =>  (0x008b7000)
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00909000)
        libdl.so.2 => /lib/libdl.so.2 (0x005f5000)
        librt.so.1 => /lib/librt.so.1 (0x008bc000)
        libc.so.6 => /lib/libc.so.6 (0x00675000)
        /lib/ld-linux.so.2 (0x004bc000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00184000)
/usr/local/Dovecot-20120303/lib/dovecot/libdovecot-ssl.so:
        linux-gate.so.1 =>  (0x00ef2000)
        libdl.so.2 => /lib/libdl.so.2 (0x0033f000)
        libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x00a3d000)
        libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0x0034e000)
        librt.so.1 => /lib/librt.so.1 (0x002ea000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        /lib/ld-linux.so.2 (0x007d4000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0029a000)
/usr/local/Dovecot-20120303/lib/dovecot/libdovecot-storage.so:
        linux-gate.so.1 =>  (0x0089e000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00be9000)
        libdl.so.2 => /lib/libdl.so.2 (0x00852000)
        librt.so.1 => /lib/librt.so.1 (0x001aa000)
        libc.so.6 => /lib/libc.so.6 (0x00442000)
        /lib/ld-linux.so.2 (0x00b8a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00b0e000)
/usr/local/Dovecot-20120303/bin/doveadm:
        linux-gate.so.1 =>  (0x00c6a000)
        libdovecot-storage.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot-storage.so.0 (0x00110000)
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00acf000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x0066e000)
        libc.so.6 => /lib/libc.so.6 (0x00247000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdl.so.2 => /lib/libdl.so.2 (0x001f4000)
        librt.so.1 => /lib/librt.so.1 (0x00ab5000)
        libfreebl3.so => /lib/libfreebl3.so (0x003d1000)
        /lib/ld-linux.so.2 (0x00228000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00cc3000)
/usr/local/Dovecot-20120303/bin/doveconf:
        linux-gate.so.1 =>  (0x00830000)
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x0032a000)
        libc.so.6 => /lib/libc.so.6 (0x00876000)
        libdl.so.2 => /lib/libdl.so.2 (0x00110000)
        librt.so.1 => /lib/librt.so.1 (0x002b6000)
        /lib/ld-linux.so.2 (0x007d2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00634000)
/usr/local/Dovecot-20120303/bin/dsync:
        linux-gate.so.1 =>  (0x00c8b000)
        libdovecot-storage.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot-storage.so.0 (0x00257000)
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00662000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00d15000)
        libc.so.6 => /lib/libc.so.6 (0x00dd1000)
        libcrypto.so.1.0.0 => not found
        libssl.so.1.0.0 => not found
        libdl.so.2 => /lib/libdl.so.2 (0x009b3000)
        librt.so.1 => /lib/librt.so.1 (0x0037f000)
        libfreebl3.so => /lib/libfreebl3.so (0x00110000)
        /lib/ld-linux.so.2 (0x00a8e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x001e9000)
/usr/local/Dovecot-20120303/sbin/dovecot:
        linux-gate.so.1 =>  (0x00f00000)
        libcap.so.2 => /lib/libcap.so.2 (0x0037c000)
        libdovecot.so.0 => /usr/local/Dovecot-20120303/lib/dovecot/libdovecot.so.0 (0x00555000)
        libc.so.6 => /lib/libc.so.6 (0x0080b000)
        libattr.so.1 => /lib/libattr.so.1 (0x00ece000)
        libdl.so.2 => /lib/libdl.so.2 (0x00ea2000)
        librt.so.1 => /lib/librt.so.1 (0x00dce000)
        /lib/ld-linux.so.2 (0x00d49000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00bb2000)

===============================================================================



More information about the dovecot mailing list