Jump to content
funtoo forums
  • 0
cbdougla

Zabbix 3.2.7 configure issue

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"

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...