I came accross this bug while trying to build databases/mysql-udf, which would fail to compile with "fatal error: 'mysql/<module_name>' file not found". Examination of the mariadb100-client modules showed path-prefix being specified in the "#include" statements. Removing the "mysql/" prefix corrects the problem. My patch does not resolve all path problems (I did NOT do a grep search through all files in the mysql folder), it only addresses path issues with regards to compiling databases/mysql-udf. Other path issues may exist. The semi-patch for this path problem is: #1: include/my_global.h @@ -1033 +1033 @@ - #include <mysql/plugin.h> /* my_bool */ + #include <plugin.h> /* my_bool */ #2: include/mysql/plugin.h @@ -51 +51 @@ - #include <mysql/services.h> + #include <services.h> #3: include/mysql/services.h @@ -22,32 +22,32 @@ - #include <mysql/service_my_snprintf.h> - #include <mysql/service_thd_alloc.h> - #include <mysql/service_thd_wait.h> - #include <mysql/service_progress_report.h> - #include <mysql/service_debug_sync.h> - #include <mysql/service_kill_statement.h> - #include <mysql/service_thd_timezone.h> - #include <mysql/service_sha1.h> - #include <mysql/service_logger.h> - #include <mysql/service_thd_autoinc.h> - #include <mysql/service_thd_error_context.h> + #include <service_my_snprintf.h> + #include <service_thd_alloc.h> + #include <service_thd_wait.h> + #include <service_progress_report.h> + #include <service_debug_sync.h> + #include <service_kill_statement.h> + #include <service_thd_timezone.h> + #include <service_sha1.h> + #include <service_logger.h> + #include <service_thd_autoinc.h> + #include <service_thd_error_context.h> #4: include/mysql/my_pthread.h @@ -721 +721 @@ - #include <mysql/psi/mysql_thread.h> + #include <psi/mysql_thread.h> #5: include/mysql/psi/mysql_thread.h @@ -57 +57 @@ - #include "mysql/psi/psi.h" + #include "psi/psi.h" #6: include/mysql/my_sys.h @@ -42, +42 @@ - #include <mysql/plugin.h> + #include <plugin.h> @@ -1010, +1010 @@ - #include <mysql/psi/psi.h> + #include <psi/psi.h> #7: include/mysql/m_string.h @@ -207 +207 @@ - #include <mysql/plugin.h> + #include <plugin.h>
Hi Raif, Thanks for the patch! Will investigate this further.
Over to new maintainer.
Hi Raif, The problem is with databases/mysql-udf not with mariadb-client. This patch solves the build issue % diff -udp Makefile.orig Makefile --- Makefile.orig 2015-08-15 13:55:14.929563914 +0200 +++ Makefile 2015-08-15 13:49:53.650585000 +0200 @@ -31,7 +31,7 @@ CFLAGS+= -fPIC do-build: .for MODULE in ${MODULES} cd ${WRKSRC} && \ - ${CC} ${CFLAGS} -I${LOCALBASE}/include -c -o udf_${MODULE}.o udf_${MODULE}.cc && \ + ${CC} ${CFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql -c -o udf_${MODULE}.o udf_${MODULE}.cc && \ ${CC} -shared -o udf_${MODULE}.so udf_${MODULE}.o .endfor
I think I've come to the bottom of this now. The problem is actually with the mysql-udf sources, not so much with MySQL/MariaDB. The sources include mysql's header files directly whereas these files are in a subdirectory of /usr/local/includes. This works on MySQL by chance as it doesn't pull in any of the mysql header files that include other header files. Including plugin.h or service.h (which have '#include <mysql/') would result in the same error using mysql.
Although the initial error report seems resolved, the port still fails to build due to "unknown type name my_bool" message. This argument is type is present in at least my_dbug.h, my_pthread.h I assume the type needs to be declared at some top level...
A commit references this bug: Author: brnrd Date: Sun Jul 3 12:43:28 UTC 2016 New revision: 417969 URL: https://svnweb.freebsd.org/changeset/ports/417969 Log: databases/mysql-udf: Fix building with MariaDB - Work around MySQL's include/mysql/mysql directory - Add -I ${LOCALBASE}/include to CFLAGS - Move from USE_MYSQL to USES= mysql PR: 199556 Changes: head/databases/mysql-udf/Makefile head/databases/mysql-udf/distinfo