So I tried today to install for Mariadb 10.6.4 and I had to tweak a bit around
sql/handler.h looks like has been moved, I suggest to just check for mysql.h ?
-I$MYSQL_SOURCE_DIR/sql does no longer exists
diff --git a/configure.ac b/configure.ac index 52ca528..53bbcd5 100644 --- a/configure.ac +++ b/configure.ac @@ -41,13 +41,13 @@ AC_ARG_WITH([mysql-source], [MySQL server source directory])], [ MYSQL_SOURCE_DIR=`cd $withval && pwd` - if test -f "$MYSQL_SOURCE_DIR/sql/handler.h" ; then + if test -f "$MYSQL_SOURCE_DIR/mysql/mysql.h" ; then AC_MSG_NOTICE(Directory is valid: $MYSQL_SOURCE_DIR) else - AC_MSG_NOTICE([File not found : $MYSQL_SOURCE_DIR/sql/handler.h]) + AC_MSG_NOTICE([File not found : $MYSQL_SOURCE_DIR/mysql/mysql.h.h]) AC_MSG_ERROR([Invalid MySQL source directory : $withval]) fi - CPPFLAGS="-I$MYSQL_SOURCE_DIR/include -I$MYSQL_SOURCE_DIR/include/mysql -I$MYSQL_SOURCE_DIR/sql $CPPFLAGS" + CPPFLAGS="-I$MYSQL_SOURCE_DIR -I$MYSQL_SOURCE_DIR/mysql/server $CPPFLAGS" ], [AC_MSG_ERROR( [You must specify MySQL server source directory using --with-mysql-source=PATH])]
Anothe small tweak in
diff --git a/src/sqlstat.h b/src/sqlstat.h index 10550e6..1c075d9 100644 --- a/src/sqlstat.h +++ b/src/sqlstat.h @@ -63,7 +63,7 @@ #define MYSQL_DYNAMIC_PLUGIN 1 #include <mysql.h> -#include <plugin.h> +#include <mysql/plugin.h>
Also when I install inside mysql the step in install.sql the INSTALL PLUGIN libsqlstat SONAME 'libsqlstat.so';
Maybe has became useless ? As it gives the error
Error in query (1127): Can't find symbol 'libsqlstat' in library
But the other goes fine, and is now working
Thank you for this package
Does building for MySQL still work with your patch? Otherwise, please, rework your patch to provide a configuration switch to select the software MySQL or MariaDB for which you are building the extension.
Best regards
Heinrich
Auf Ubuntu Hirsute (20.04) hatte ich keine Probleme gegen MariaDB zu bauen:
Closed - works for me