[Dovecot] dovecot cores

dovecot at freakout.de dovecot at freakout.de
Fri Oct 12 11:10:20 EEST 2012


According to Tamsy:
> Timo Sirainen wrote the following on 12.10.2012 14:34:
> > On 12.10.2012, at 10.02, dovecot at freakout.de wrote:
> >
> >> According to Timo Sirainen:
> >>> Simply specifying -I or -L paths doesn't link with libmysql. What exactly did you use for CPPFLAGS/LDFLAGS/configure?
> >>>
> >> ok - i specified: CFLAGS="-I/opt/zlib/include -I/opt/ssl/include -I/opt/mysql/include"
> >>                   LDFLAGS="-L/opt/zlib/lib -L/opt/ssl/lib -L/opt/mysql/lib -lmysqlclient"
> > -lmysqlclient shouldn't be in LDFLAGS.
> >
> > I'm not sure why it's doing that. It really shouldn't. You could try SQL_LIBS=-lmysqlclient or AUTH_LIBS=-lmysqlclient or MYSQL_LIBS=-lmysqlclient if one of them helps.
> Axel, please let us know whether one of these works: 
> "SQL_LIBS=-lmysqlclient or AUTH_LIBS=-lmysqlclient or 
> MYSQL_LIBS=-lmysqlclient".
> 
> Since Dovecot 1.x all the way up to 2.1.10 I had trouble with this and 
> only by putting -lmysqlclient in LDFLAGS as described before Dovecot 
> compiles without error (Ubuntu Server 8.04 & 10.04, mySQL in a 
> non-standart location).
>

SQL_LIBS=-lmysqlclient => not working
AUTH_LIBS=-lmysqlclient => not working

MYSQL_LIBS=-lmysqlclient \
LDFLAGS="-L/opt/zlib/lib -L/opt/ssl/lib -L/opt/mysql/lib" \
./configure --prefix=%{_prefix} \
        --sysconfdir=%{_etcdir} --mandir=%{_mandir} --docdir=%{_docdir} --libexecdir=%{_sbindir} --datadir=%{_prefix} \
        --with-rundir=/var/dovecot/run \
        --with-statedir=/var/dovecot/state \
        --with-mysql
 => WORKING

BUT:

 [axel at joe rpm]$ ldd BUILD/dovecot-2.1.10-root/opt/dovecot-2.1.10-5/sbin/dovecot
        libdovecot.so.0 => /opt/dovecot/lib/libdovecot.so.0 (0x00993000)
        libgcc_s.so.1 => /opt/gcc4/lib/libgcc_s.so.1 (0x0092c000)
        libc.so.6 => /lib/libc.so.6 (0x00ebf000)
>>>>!   libmysqlclient.so.18 => /opt/mysql/lib/libmysqlclient.so.18 (0x001cc000)
        libdl.so.2 => /lib/libdl.so.2 (0x00ae3000)
        libssp.so.0 => /opt/ssp/lib/libssp.so.0 (0x0057b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x002c6000)
        libstrings.so => /opt/mysql/lib/libstrings.so (0x0057e000)
        libz.so.1 => /opt/zlib/lib/libz.so.1 (0x00110000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00b08000)
        libm.so.6 => /lib/libm.so.6 (0x00135000)

dovecot still seems to be linked with the mysqlclient!

i have just compiled - not tried the binaries - the core dump occurs only in the night!

> If you run configure without adding the -lmysqlclient, what do you get with:

egrep -i 'mysql|auth_libs|sql_libs' Makefile

 [axel at joe dovecot-2.1.10]$ egrep -i 'mysql|auth_libs|sql_libs' Makefile
AUTH_LIBS = -lcrypt  -lmysqlclient
CFLAGS = -std=gnu99 -g -I/opt/zlib/include -I/opt/ssl/include -I/opt/mysql/include -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/opt/ssl/include
LDFLAGS = $(NOPLUGIN_LDFLAGS) -L/opt/zlib/lib -L/opt/ssl/lib -L/opt/mysql/lib
MYSQL_CFLAGS =
MYSQL_CONFIG = NO
MYSQL_LIBS = -lmysqlclient
PGSQL_LIBS =
SQL_LIBS = -lmysqlclient
sql_drivers =  mysql
          scan-build -o scan-reports ../configure --with-ldap=auto --with-pgsql=auto --with-mysql=auto --with-sqlite=auto --with-solr=auto --with-gssapi=auto --with-libwrap=auto; \

Cheers
Axel



More information about the dovecot mailing list