@jengelh Eureka!! It is confirmed… Not a kopano issue at all and thank you for posting your mysql_config output.
The issue lies with Redhat/Centos MariaDB devel rpm packages, sourced from MariaDB repo, as they royally mangled up the installation/configuration of mariadb’s connector c files/paths ex-
Centos - /usr/lib64/mariadb is nowhere to be found so /usr/lib64/mysql is used instead seeing that mariadb_config/mysql_config reference /usr/lib64 and not /usr/lib64/mariadb which should be the correct path if the connector was installed correctly. This causes libmysqlclient to be used instead of libmariadbclient which is a no no seeing that mariadb 10.2 exclusively uses libmariadb/client.
Fedora appears to be using the correct paths in install.cmake and installs mariadb connector/libmariadbclient to /usr/lib64/mariadb and include files in /usr/include/mysql which is why you are not seeing this issue.
So when kopano calls mariadb_config or mysql_config in (cf. configure.ac) on Centos with mariadb 10.2.x-devel installed, it fumbles up and spits out the ‘reconnect’ error because the mariadb connector c isn’t properly installed by the official MariaDB rpm devel packages which is why it falls back to using the ‘reconnect’ method.
Solution [Centos/Redhat]: clone master branch of mariadb-connector-c and compile/install manually then build kopano
Correct connector cmake config to use on Centos:
-- MariaDB Connector/c configuration:
-- CPack generation: TGZ
-- SSL support: OPENSSL Libs: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- Zlib support: yes (using bundled zlib)
-- Installation layout: DEFAULT
-- Include files will be installed in include
-- Libraries will be installed in lib64/mariadb
-- Binaries will be installed in bin
-- Documentation included from
-- Required:
-- Configuring done
-- Generating done
which produces:
[root@xn1-dev connector_c]# mariadb_config
Copyright 2011-2017 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: mariadb_config [OPTIONS]
--cflags [-I/usr/include -I/usr/include/mysql]
--include [-I/usr/include -I/usr/include/mysql]
--libs [-L/usr/lib64/mariadb/ -lmariadb -lnsl -ldl -lm -lpthread -lssl -lcrypto]
--libs_r [-L/usr/lib64/mariadb/ -lmariadb -lnsl -ldl -lm -lpthread -lssl -lcrypto]
--libs_sys [-lnsl -ldl -lm -lpthread -lssl -lcrypto]
--version [10.2.9]
--cc_version [3.0.3]
--socket [/tmp/mysql.sock]
--port [3306]
--plugindir [/usr/lib64/mariadb/plugin]
--tlsinfo [OpenSSL 1.0.2k]
With the bug squashed, I can now enjoy my weekend.
Thanks again
W