In file included from /usr/include/mysql/mysql.h:64:0,
from km_dbase.c:36:
/usr/include/mysql/mysql/client_plugin.h:103:38: fatal error: mysql/plugin_auth_common.h: No such file or directory
#include <mysql/plugin_auth_common.h>
^
Ubuntu-14.04
Kamailio-4.3.3
libmysqlclient-dev-5.7.9
$ mysql_config --include
-I/usr/include/mysql
Makefile in modules/db_mysql will replace the string "-I/usr/include/mysql" to "-I/usr/include", the latter one will make the compilation fail but the former one won't. However it did not happen when compiling using mysql 5.6 or 5.5 etc. Not sure if there is anything changed in mysql 5.7.
Add the original include path created by mysql_config:
diff --git a/modules/db_mysql/Makefile b/modules/db_mysql/Makefile
index 1cea920..ea6ccac 100644
--- a/modules/db_mysql/Makefile
+++ b/modules/db_mysql/Makefile
@@ -20,7 +20,8 @@ endif
ifneq ($(MYSQLCFG),)
# use autodetection
- DEFS += $(shell $(MYSQLCFG) --include | sed 's/\(-I[^ ]*\)\/mysql/\1/g' )
+ DEFS += $(shell $(MYSQLCFG) --include | sed 's/\(-I[^ ]*\)\/mysql/\1/g' ) \
+ $(shell $(MYSQLCFG) --include
LIBS = $(shell $(MYSQLCFG) --libs)
else
Or, apply the above patch when mysql's version >= 5.7, assuming it only occurs in mysql 5.7.
—
Reply to this email directly or view it on GitHub.