Ad Widget

Collapse

Zabbix build from sourve configure fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hsimon
    Junior Member
    • Feb 2016
    • 11

    #1

    Zabbix build from sourve configure fails

    Hi,6.4.0

    I want to build zabbix 6.4.0 from source on a QNAP NAS, but it fails in configure when checking for mysql init options functions.

    checking for mysql_config... /share/CACHEDEV1_DATA/.qpkg/MariaDB10/bin/mysql_config
    checking for main in -lmariadb... yes
    checking for TLS support in MySQL library... no
    checking for TLS support in MariaDB library... no
    checking for MariaDB init options function... no
    checking for MySQL init options function... no
    no
    configure: error: Could not find the options function for mysql init​

    Is this check necessary and if not can it be disabled?

    Horst
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    If it is checked, then I suppose it is important and needed.. Specially if whole process breaks because of it.

    Comment

    • hsimon
      Junior Member
      • Feb 2016
      • 11

      #3
      I didn;t explain myself correct. I know I need the mysql option, but I don't know what this init options function is, it found correctly the mysql_config file, but I suspect in this file is an option missing.
      How can I find which option it is looking for, it might be named different in this file than what it expect in configure.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Originally posted by hsimon

        6.4.0

        I want to build zabbix 6.4.0 from source on a QNAP NAS, but it fails in configure when checking for mysql init options functions.
        It's possible to build several different components from the same Zabbix source code.

        If you're trying to build the zabbix server (are you?) then the server requires a database. Do you want to use MySQL or MariaDB as the database, if you're building the zabbix-server? If so, then you must have the MySQL or Mariadb libraries and other development-related software installed (header files, possibly other stuff like pkg-config).

        If you're building the server but you don't want to use MySQL or MariaDB because you're going to use one of the other supported database backends instead, then you need to tell configure you want to use some other database. You do that with various command line flags that you pass to configure, such as '--without-mysql' or '--with-mysql=no'.

        Originally posted by hsimon
        checking for mysql_config... /share/CACHEDEV1_DATA/.qpkg/MariaDB10/bin/mysql_config
        I don't use Qnap and I don't know anything about its filesystem or its package manager, but I highly doubt that path is for a valid install of the mysql_config command. It looks more like a cache directory for a package manager. If the 'configure' command is finding it there, that's probably not useful, because I don't think it's a valid install.

        On a typical Linux system where MySQL or MariaDB is fully installed (both the runtime and development stuff) the mysql_config command would usually be someplace like /usr/bin/mysql_config, though other install locations are possible (e.g. /opt/mysql/bin/mysql_config or /usr/local/bin/mysql_config, if it was installed outside of the typical operating system package management system).

        Originally posted by hsimon
        checking for main in -lmariadb... yes
        checking for TLS support in MySQL library... no
        checking for TLS support in MariaDB library... no
        checking for MariaDB init options function... no
        checking for MySQL init options function... no
        no
        configure: error: Could not find the options function for mysql init​

        Is this check necessary and if not can it be disabled?
        configure keeps a log of everything it does, it's called "config.log". It won't be at the end of the log (a bunch of environment and "I found this" messages are at the end of a failed configure run), but you can search the "config.log" for messages like:

        Code:
        checking for MariaDB init options function
        or

        Code:
        checking for main in -lmariadb
        to see the actual code that is being executed as part of the detection phase. There are often error messages there from the compiler or linker that will tell you what was attempted, before it arrived at the "no (it's not here)" conclusion.

        Comment

        • hsimon
          Junior Member
          • Feb 2016
          • 11

          #5
          Thanks for the reply, my first check already found that it cannot find the mysql.h file. I will do more checking.

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Then you miss the libraries as tim.mooney hinted..

            Comment

            • hsimon
              Junior Member
              • Feb 2016
              • 11

              #7
              It was in a different location and I pointed it to this location and got further now, but now the ld command failed and I will check this when I get time for it.

              Comment

              Working...