[Dovecot] Dovecot SSL issue on Solaris 10 x64 (64-bit)

Chris Wakelin c.d.wakelin at reading.ac.uk
Sat Aug 26 13:38:14 EEST 2006


I've managed to compile it at least on Solaris 10 64-bit sparc. You're 
right, the Sun OpenSSL package is pretty broken, so I used our own 
(version 0.9.8b) compiled with the Sun included gcc (3.4.3)

./config --prefix=/opt/RDGopnssl --openssldir=/opt/RDGopnssl --shared 
no-rc5 no-idea no-mdc2

and Dovecot (actually 1.0rc5) compiled with

CFLAGS="-I/opt/RDGopnssl/include -L/opt/RDGopnssl/lib -g -O2" \
./configure --prefix=/opt/RDGdovect --with-ssl=openssl

which gives a binary with libraries:-

env LD_LIBRARY_PATH=/opt/RDGopnssl/lib ldd src/imap-login/imap-login
         libssl.so.0.9.8 =>       /opt/RDGopnssl/lib/libssl.so.0.9.8
         libcrypto.so.0.9.8 =>    /opt/RDGopnssl/lib/libcrypto.so.0.9.8
         libsocket.so.1 =>        /lib/libsocket.so.1
         libnsl.so.1 =>   /lib/libnsl.so.1
         librt.so.1 =>    /lib/librt.so.1
         libsendfile.so.1 =>      /lib/libsendfile.so.1
         libc.so.1 =>     /lib/libc.so.1
         libdl.so.1 =>    /lib/libdl.so.1
         libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1
         libmp.so.2 =>    /lib/libmp.so.2
         libmd5.so.1 =>   /lib/libmd5.so.1
         libscf.so.1 =>   /lib/libscf.so.1
         libaio.so.1 =>   /lib/libaio.so.1
         libdoor.so.1 =>  /lib/libdoor.so.1
         libuutil.so.1 =>         /lib/libuutil.so.1
         libm.so.2 =>     /lib/libm.so.2
         /platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
         /platform/SUNW,Ultra-5_10/lib/libmd5_psr.so.1

 From what you say below, I'd guess that you're linking OpenSSL 
statically and it's finding a 32-bit version of libcrypto.a (or possibly 
a 32-bit Dovecot and a 64-bit libcrypto.a)

(For the record, I've tested it on 64-bit Solaris 8 but not Solaris 10 yet.)

Best Wishes,
Chris

Patric wrote:
> I'm having an issue with Thunderbird (and Opera) and Dovecot SSL on a 
> Solaris 10.
> 
> My OS is Solaris 10 6/06 x86 (running in 64-bit mode) using ZFS (disk 
> mirror) as the
> filesystem for my users. Dovecot version is 1.0rc7 (logs below are from 
> 1.0rc6).

<snip>

> It seems to be that the OpenSSL installed with Solaris 10 is abit 
> "broken" or missing
> the cryptographic procotols needed. (at least from what I've read on the 
> Internet)
> Strange that it works fine with Mail.app on Mac OS X.
> 
> So, I installed the latest OpenSSL, compiled, tested and installed.
> (no problems occured)
> 
> Back to compiling Dovecot, used this oneliner to point it to the new 
> OpenSSL (and my compile settings):
> env PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure 
> --sysconfdir=/usr/local/etc --with-ssldir=/usr/local/etc/ssl
> 
> Worked!
> bash-3.00$ egrep "^SSL_" config.log
> SSL_CFLAGS='-I/usr/local/ssl/include  '
> SSL_LIBS='-L/usr/local/ssl/lib -lssl -lcrypto -lsocket -lnsl -ldl  '
> 
> But gives this error message when I compile:
>  gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes 
> -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 
> -Wbad-function-cast -I/usr/local/ssl/include -o ssl-build-param 
> ssl-init-main.o ssl-init-openssl.o ssl-init-gnutls.o  ../lib/liblib.a 
> -L/usr/local/ssl/lib -lssl -lcrypto -ldl -lsocket -lnsl -lrt -lsendfile
> ld: warning: file /usr/local/ssl/lib/libcrypto.a(dh_asn1.o): wrong ELF 
> class: ELFCLASS64
> Undefined                       first referenced
> symbol                             in file
> DH_generate_parameters              ssl-init-openssl.o
> ERR_get_error                       ssl-init-openssl.o
> ERR_error_string_n                  ssl-init-openssl.o
> i2d_DHparams                        ssl-init-openssl.o
> ld: fatal: Symbol referencing errors. No output written to ssl-build-param
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `ssl-build-param'
> Current working directory /home/nollan/work2/dovecot-1.0.rc7/src/master
> *** Error code 1
> The following command caused the error:
> (error message removed to save space, can include if requested)
> 
> It seems that the Thunderbird/Opera SSL problem will be solved with a 
> new OpenSSL.
> But I seem to have problems getting Dovecot to compile with the new 
> OpenSSL (64-bit issue?).
> 
> Anyone got any hints on what I should do?
> 
> 
> With Regards,
> Patric

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,                           c.d.wakelin at reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK              Fax: +44 (0)118 975 3094


More information about the dovecot mailing list