From ae230d718d5a0a8c7484e8cf22c1fac54b0c1090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 17 Sep 2015 15:17:22 +0200 Subject: [PATCH] Mysql: Link to the MariaDB libs twice. This is an attempt to work around MariaDB having symbols (like 'hash_insert') that clash with the same symbols in Pike. Potential fix for crash on Solaris 10. --- src/modules/Mysql/configure.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/Mysql/configure.in b/src/modules/Mysql/configure.in index 39f9e7af2c..3ea6020408 100644 --- a/src/modules/Mysql/configure.in +++ b/src/modules/Mysql/configure.in @@ -378,18 +378,20 @@ fi if test "x${MARIADB_CONFIG}" = "xno"; then :; else # Try the MariaDB client libraries. # NB: These are distributed separately from the MariaDB server. + # NB: We link with them twice to make sure that symbols in them + # (like 'hash_insert') aren't resolved against Pike... TRY_MYSQLCLIENT="no" AC_CHECK_SQLLIB(mariadbclient_r, [ - LIBS="-lmariadbclient_r $LIBS" + LIBS="-lmariadbclient_r -lmariadbclient_r $LIBS" ], [ AC_CHECK_SQLLIB(mariadbclient, [ - LIBS="-lmariadbclient $LIBS" + LIBS="-lmariadbclient -lmariadbclient $LIBS" ], [ AC_CHECK_SQLLIB(mariadb_r, [ - LIBS="-lmariadb_r $LIBS" + LIBS="-lmariadb_r -lmariadb_r $LIBS" ], [ AC_CHECK_SQLLIB(mariadb, [ - LIBS="-lmariadb $LIBS" + LIBS="-lmariadb -lmariadb $LIBS" ], [ # Fallback to using the MySQL client libraries. # NB: These are distributed together with the MariaDB server. -- GitLab