Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12232

"configure" fails with MariaDB Connector/C

    XMLWordPrintable

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 19, Sprint 20, Sprint 21
    • Story Points:
      0.25

      Description

      Zabbix v3.0.10rc1 - with MariaDB and MariaDB Connector/C "configure" fails as follows:

      checking for mysql_config... /usr/bin/mysql_config
      checking for main in -l... no
      configure: error: Not found mysqlclient library
      

      Debian/testing has Installed libraries:

      $  find /usr/lib -name '*mysql*'
      ...
      /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
      /usr/lib/x86_64-linux-gnu/libmysqlclient.so
      ...
      /usr/lib/x86_64-linux-gnu/libmysqlclient_r.a
      ...
      /usr/lib/x86_64-linux-gnu/libmysqlclient.a
      ...
      
      $ find /usr/lib -name '*mariadb*'
      /usr/lib/x86_64-linux-gnu/libmariadb.a
      /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18        <---- Symlink to libmariadbclient.so.18.0.0
      /usr/lib/x86_64-linux-gnu/libmariadb.so.2
      /usr/lib/x86_64-linux-gnu/mariadb18
      /usr/lib/x86_64-linux-gnu/mariadb
      /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18.0.0
      /usr/lib/x86_64-linux-gnu/libmariadb.so                 <---- Symlink to libmariadb.so.2
      

      This fix helps:

      Index: m4/ax_lib_mysql.m4
      ===================================================================
      --- m4/ax_lib_mysql.m4  (revision 68585)
      +++ m4/ax_lib_mysql.m4  (working copy)
      @@ -93,11 +93,13 @@
                       ;;
                           -lperconaserverclient)
                               _client_lib_name="perconaserverclient"
      -
                       ;;
                           -lmariadbclient)
                               _client_lib_name="mariadbclient"
                       ;;
      +                    -lmariadb)
      +                        _client_lib_name="mariadb"
      +                ;;
                           -L*)
                               MYSQL_LDFLAGS="${MYSQL_LDFLAGS} $i"
                       ;;
      @@ -107,7 +109,7 @@
                   if test "x$enable_static" = "xyes"; then
                      for i in $_full_libmysql_libs; do
                          case $i in
      -                     -lmysqlclient|-lperconaserverclient|-lmariadbclient)
      +                     -lmysqlclient|-lperconaserverclient|-lmariadbclient|-lmariadb)
                          ;;
                             -l*)
                                      _lib_name="`echo "$i" | cut -b3-`"
      

        Attachments

        1. fix-m4-mariadb-search.patch
          3 kB
          Andrey Melnikov
        2. update-mysql-detection.patch
          3 kB
          Adam Williamson
        3. zabbix-3.4.7-freebsd.patch
          4 kB
          Tao Zhou

          Issue Links

            Activity

              People

              Assignee:
              abs Andrea Biscuola (Inactive)
              Reporter:
              andris Andris Mednis
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: