Created attachment 185421 [details] patch-src-mysql-version The part of build log with error message: ============================================ mysql.c:437:9: error: use of undeclared identifier 'MYSQL_SERVER_VERSION' MYSQL_SERVER_VERSION, MYSQL_COMPILATION_COMMENT, ^ mysql.c:437:31: error: use of undeclared identifier 'MYSQL_COMPILATION_COMMENT' MYSQL_SERVER_VERSION, MYSQL_COMPILATION_COMMENT, ^ 1 warning and 2 errors generated. *** Error code 1 ============================================ Patch was tested with mariadb 10.1 too.
It still doesn't link for me even with this patch as Exim tries to link with libmysqlclient.
(In reply to Vsevolod Stakhov from comment #1) What? $ pkg which /usr/local/include/mysql/mysql_version.h /usr/local/include/mysql/mysql_version.h was installed by package mariadb102-client-10.2.7 $ pkg which /usr/local/include/mysql/mysql_version.h /usr/local/include/mysql/mysql_version.h was installed by package mariadb101-client-10.1.25 My patch added #include <mysql_version.h>, which is part of the mariadb client in both - 10.1 and 10.2.
It doesn't fix the build with mariadb. I have installed mariadb102-client, applied your patch and tried to build Exim with mysql support. After all, I had the following error: cc -o exim /usr/bin/ld: cannot find -lmysqlclient Am I missing something?
(In reply to Vsevolod Stakhov from comment #3) You are describe a different bug. No link error on my hosts: 10.3 and 11.1 amd64. Check your mariadb installation. And yes, you are MAINTAINER= vsevolod@FreeBSD.org, you have to know better… :-D I just found an error (other than you have), fixed it and ask to commit patch. BTW, I found 100% same patch in the redhat bagzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1467312
A commit references this bug: Author: vsevolod Date: Tue Aug 15 20:42:40 UTC 2017 New revision: 448008 URL: https://svnweb.freebsd.org/changeset/ports/448008 Log: - Fix finding of mariadb headers [1] - Fix build with custom mysql library PR: 221533 [1] Submitted by: vvd at unislabs.com [1] Changes: head/mail/exim/Makefile head/mail/exim/files/patch-src-lookups-mysql.c
Thanks!