Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

Zabbix 3.2.7 configure issue


cbdougla

Question

I am having trouble upgrading from Zabbix 3.2.6 to Zabbix 3.2.7.

 

The configure script, on my system at least, does not detect the mysqlclient properly.

 

Here's the section of the configure script I am having trouble with:

 

       if test -x "$MYSQL_CONFIG"; then

 

            MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"

 

            _full_libmysql_libs="`$MYSQL_CONFIG --libs`"

 

            for i in $_full_libmysql_libs; do

                case $i in

                    -lmysqlclient)

                        _client_lib_name="mysqlclient"

                ;;

                    -lperconaserverclient)

                        _client_lib_name="perconaserverclient"

 

                ;;

                    -lmariadbclient)

                        _client_lib_name="mariadbclient"

                ;;

                    -L*)

                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} $i"

                ;;

                esac

            done

 

The problem is that when I run mysql_config --libs, I get the following:

 

ella zabbix-3.2.7 # mysql_config --libs

-L/usr/lib64  -lmariadb -lpthread -lz -ldl -lm -lssl -lcrypto

 

None of the strings in the case statement are matched so _client_lib_name is not set.  So later on in the configure script, this happens:

 

configure:8148: x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -I/usr/include/mysql -I/usr/include/mysql/..   -rdynamic

 -Wl,-O1 -Wl,--sort-common -Wl,--as-needed  -L/usr/lib64 conftest.c -l  -lm -ldl  -lresolv  >&5

/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l-lm

collect2: error: ld returned 1 exit status

configure:8148: $? = 1

 

 

Notice the "-l -lm".  After that "-l" is where the _client_lib_name variable is but since it's blank, configure dies thinking that it has not detected libmysqlclient.

 

 

I can make configure work by adding the following lines:

 

8060a8061,8063

>                     -lmariadb)

>                         _client_lib_name="mysqlclient"

>                 ;;

 

 

However, I am not a saavy enough programmer to suggest a permanent fix -- which is why I am posting here.

Any help on where to go from here would be greatly appreciated.

 

 

 

EDIT: I forgot to put in my USE flags:

 


net-analyzer/zabbix-3.2.6::gentoo was built with the following:

USE="agent frontend ipv6 ldap mysql openipmi server snmp ssl -curl -java -libxml2 -odbc -oracle -postgres -proxy -sqlite -ssh -static -xmpp"

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...