I’m trying to build Dovecot 2.2.29.1 in a Docker container today and have the following error in ./configure:
checking for shadow.h... yes checking for pam_start in -lpam... no checking for auth_userokay... no checking for mysql_config... mysql_config checking for mysql_init in -lmysqlclient... no configure: error: Can't build with MySQL support: libmysqlclient not found
#> find / -name libmysqlclient\* /usr/share/doc/libmysqlclient20 /usr/share/lintian/overrides/libmysqlclient20 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.5 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20 /var/lib/dpkg/info/libmysqlclient20:amd64.triggers /var/lib/dpkg/info/libmysqlclient20:amd64.shlibs /var/lib/dpkg/info/libmysqlclient20:amd64.list /var/lib/dpkg/info/libmysqlclient20:amd64.md5sums
I have installed MySQL 5.7.18 Debian 9 packages (including the libmysqlclient-dev package) from the MySQL repo.
I’m not an expert, but is there a bug in the "./configure --prefix=/usr --sysconfdir=/etc --with-mysql”?
I’ve been building Dovecot with this Dockerfile using Ubuntu 16.04 for a while now without issue. Do I need some extra ./configure option to get it to find libmysqlclient.so.20?
Kevin
You might have to install the package default-libmysqlclient-dev from the Debian repo.
Peter
On 4/25/17 1:37 PM, KT Walrus wrote:
I’m trying to build Dovecot 2.2.29.1 in a Docker container today and have the following error in ./configure:
checking for shadow.h... yes checking for pam_start in -lpam... no checking for auth_userokay... no checking for mysql_config... mysql_config checking for mysql_init in -lmysqlclient... no configure: error: Can't build with MySQL support: libmysqlclient not found
#> find / -name libmysqlclient\* /usr/share/doc/libmysqlclient20 /usr/share/lintian/overrides/libmysqlclient20 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.5 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20 /var/lib/dpkg/info/libmysqlclient20:amd64.triggers /var/lib/dpkg/info/libmysqlclient20:amd64.shlibs /var/lib/dpkg/info/libmysqlclient20:amd64.list /var/lib/dpkg/info/libmysqlclient20:amd64.md5sums
I have installed MySQL 5.7.18 Debian 9 packages (including the libmysqlclient-dev package) from the MySQL repo.
I’m not an expert, but is there a bug in the "./configure --prefix=/usr --sysconfdir=/etc --with-mysql”?
I’ve been building Dovecot with this Dockerfile using Ubuntu 16.04 for a while now without issue. Do I need some extra ./configure option to get it to find libmysqlclient.so.20?
Kevin
On Apr 25, 2017, at 2:16 PM, Peter van der Does <peter@avirtualhome.com> wrote:
You might have to install the package default-libmysqlclient-dev from the Debian repo.
Isn’t that the MariaDB package? I don’t really want to mix MariaDB with MySQL (even though they are probably still compatible, but diverging as time passes).
Dovecot does build with default-libmysqlclient-dev, but maybe ./configure needs to be updated by the Dovecot devs to build against the libmysqlclient package that Oracle built for Debian Stretch?
Since I’m only testing today to get ready for Debian 9, I don’t really need this fixed now. But, when Debian 9 is released, it would be nice to be able to do a production build of Dovecot using the Oracle MySQL packages and Debian 9.
Kevin
Peter
On 4/25/17 1:37 PM, KT Walrus wrote:
I’m trying to build Dovecot 2.2.29.1 in a Docker container today and have the following error in ./configure:
checking for shadow.h... yes checking for pam_start in -lpam... no checking for auth_userokay... no checking for mysql_config... mysql_config checking for mysql_init in -lmysqlclient... no configure: error: Can't build with MySQL support: libmysqlclient not found
#> find / -name libmysqlclient\* /usr/share/doc/libmysqlclient20 /usr/share/lintian/overrides/libmysqlclient20 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.5 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20 /var/lib/dpkg/info/libmysqlclient20:amd64.triggers /var/lib/dpkg/info/libmysqlclient20:amd64.shlibs /var/lib/dpkg/info/libmysqlclient20:amd64.list /var/lib/dpkg/info/libmysqlclient20:amd64.md5sums
I have installed MySQL 5.7.18 Debian 9 packages (including the libmysqlclient-dev package) from the MySQL repo.
I’m not an expert, but is there a bug in the "./configure --prefix=/usr --sysconfdir=/etc --with-mysql”?
I’ve been building Dovecot with this Dockerfile using Ubuntu 16.04 for a while now without issue. Do I need some extra ./configure option to get it to find libmysqlclient.so.20?
Kevin
On 4/25/17 4:06 PM, KT Walrus wrote:
On Apr 25, 2017, at 2:16 PM, Peter van der Does <peter@avirtualhome.com> wrote:
You might have to install the package default-libmysqlclient-dev from the Debian repo.
Isn’t that the MariaDB package? I don’t really want to mix MariaDB with MySQL (even though they are probably still compatible, but diverging as time passes).
Dovecot does build with default-libmysqlclient-dev, but maybe ./configure needs to be updated by the Dovecot devs to build against the libmysqlclient package that Oracle built for Debian Stretch?
Since I’m only testing today to get ready for Debian 9, I don’t really need this fixed now. But, when Debian 9 is released, it would be nice to be able to do a production build of Dovecot using the Oracle MySQL packages and Debian 9.
Kevin
The problem with making the Dovecot check for libmysqlclient.so.20 would be that you have have to make sure older/newer packages are also supported. The 20 extension is subject to changes.
If I check the Oracle DEB file for Debian 9, it seems they do use the name libmysqlclient.so, so not sure what to make of it. Double check to make sure you really installed the file libmysqlclient-dev_5.7.18-1debian9_amd64.deb from the Oracle repo.
If you still have problems I might setup a Docker file with Debian 9 later tonight to check myself.
Peter
-- Peter van der Does
Facebook : https://www.facebook.com/petervanderdoes Twitter : https://twitter.com/petervanderdoes GitHub : https://github.com/petervanderdoes About Me : https://about.me/petervanderdoes
On Apr 25, 2017, at 4:30 PM, Peter van der Does <peter@avirtualhome.com> wrote:
The problem with making the Dovecot check for libmysqlclient.so.20 would be that you have have to make sure older/newer packages are also supported. The 20 extension is subject to changes.
If I check the Oracle DEB file for Debian 9, it seems they do use the name libmysqlclient.so, so not sure what to make of it. Double check to make sure you really installed the file libmysqlclient-dev_5.7.18-1debian9_amd64.deb from the Oracle repo.
If you still have problems I might setup a Docker file with Debian 9 later tonight to check myself.
I’ve attached a Dockerfile that reproduces the issue and might save you a little time.
Also, I spotted a deprecation warning that you might want to look into since it has to do with building against OpenSSL 1.1 (which is the default version for Debian 9).
Kevin
On Apr 25, 2017, at 5:37 PM, KT Walrus <kevin@my.walr.us> wrote:
Also, I spotted a deprecation warning that you might want to look into since it has to do with building against OpenSSL 1.1 (which is the default version for Debian 9).
Oops!!!
Forgot to attach the warning:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -DMODULE_DIR=\"/usr/lib/dovecot\" -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -MT iostream-openssl-params.lo -MD -MP -MF .deps/iostream-openssl-params.Tpo -c iostream-openssl-params.c -fPIC -DPIC -o .libs/iostream-openssl-params.o ^[[91miostream-openssl-params.c: In function 'generate_dh_parameters': ^[[0m^[[91miostream-openssl-params.c:18:2: warning: 'DH_generate_parameters' is deprecated [-Wdeprecated-declarations] dh = DH_generate_parameters(bitsize, DH_GENERATOR, NULL, NULL); ^~ ^[[0m^[[91mIn file included from /usr/include/openssl/dh.h:13:0, from /usr/include/openssl/dsa.h:31, from /usr/include/openssl/x509.h:32, from /usr/include/openssl/ssl.h:50, from iostream-openssl.h:6, from iostream-openssl-params.c:5: /usr/include/openssl/dh.h:118:1: note: declared here DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator, ^
Kevin,
Regarding the configuration error, your missing a package: zlib1g-dev
As far as the deprecation warning, it's a bit more complicated. The source of Dovecot needs to be patched to check for the OpenSSL version and depending on the version use a different DH_generate_numbers function.
Regards,
Peter
-- Peter van der Does
Facebook : https://www.facebook.com/petervanderdoes Twitter : https://twitter.com/petervanderdoes GitHub : https://github.com/petervanderdoes About Me : https://about.me/petervanderdoes
On Apr 25, 2017, at 7:54 PM, Peter van der Does <peter@avirtualhome.com> wrote:
Kevin,
Regarding the configuration error, your missing a package: zlib1g-dev
Thanks! I guess default-libmysqlclient-dev drags in zlib1g-dev for some reason that the Oracle package doesn’t. Everything builds with the Oracle libmysqlclient now, so I’m good to go. Thanks for your help.
As far as the deprecation warning, it's a bit more complicated. The source of Dovecot needs to be patched to check for the OpenSSL version and depending on the version use a different DH_generate_numbers function.
Okay. Should I just ignore this then? I’m not actually going to do much with this build until Debian 9 is released and all the packages that I use have had time to be production hardened on Debian 9. I’m building against Ubuntu 16.04 for my actual work. I really want to use Debian 9 in production since it comes with OpenSSL 1.1.0e and I want to support the ChaCha20-Poly1305 ciphers for NGINX sessions (and maybe Dovecot too).
https://github.com/openssl/openssl/issues/304 <https://github.com/openssl/openssl/issues/304>
Any other comments on my Dockerfile? Since everything builds, I assume it uses sane options to build Dovecot. I couldn’t find any other example Dockerfiles for building Dovecot so just made this one up from other Dockerfiles that I use to build other images.
I’d really like to see an official Dovecot image in the Docker Hub and base my containers off that. I actually use s6-overlay and other extras in my real Dovecot image, but it would be nice to see a Dockerfile that is based on Alpine Linux too. Alpine seems to be the preferred distro for official Docker Hub images, as I understand it.
Kevin
participants (2)
-
KT Walrus
-
Peter van der Does