Solved :) The configure script output was misleading and reported libmysqlclient to be missing, while it was in fact libz, libssl and libcrypto (see below). After installing openssl-devel I was able to configure/build successfully.
configure:13308: checking for mysql_init in -lmysqlclient configure:13333: gcc -o conftest -O2 -g -O2 -Wl,--export-dynamic conftest.c -lmysqlclient -L/usr/lib64 -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl -lpcap -ldl >&5 /usr/bin/ld: cannot find -lz /usr/bin/ld: cannot find -lssl /usr/bin/ld: cannot find -lcrypto collect2: error: ld returned 1 exit status Kind regards, Yann On Tue, Dec 13, 2016 at 11:01 AM Yann Belin <[email protected]> wrote: > Hi Mehul, > > Yes I thought it could be the issue too but the softlinks look fine on FS > level. > > [root@xxxx pmacct]# ll /usr/lib64/libmysqlclient.* > -rw-r--r-- 1 root root 4386606 Oct 27 14:54 /usr/lib64/libmysqlclient.a > lrwxrwxrwx 1 root root 20 Aug 29 22:25 > /usr/lib64/libmysqlclient.so -> libmysqlclient.so.18 > lrwxrwxrwx 1 root root 24 Aug 29 22:25 > /usr/lib64/libmysqlclient.so.15 -> libmysqlclient.so.15.0.0 > -rwxr-xr-x 1 root root 2043496 Aug 24 12:38 > /usr/lib64/libmysqlclient.so.15.0.0 > lrwxrwxrwx 1 root root 24 Aug 29 22:25 > /usr/lib64/libmysqlclient.so.16 -> libmysqlclient.so.16.0.0 > -rwxr-xr-x 1 root root 2016648 Aug 24 12:38 > /usr/lib64/libmysqlclient.so.16.0.0 > lrwxrwxrwx 1 root root 24 Aug 29 22:25 > /usr/lib64/libmysqlclient.so.18 -> libmysqlclient.so.18.0.0 > -rwxr-xr-x 1 root root 6232959 Aug 24 12:30 > /usr/lib64/libmysqlclient.so.18.0.0 > > [root@xxxx pmacct]# file /usr/lib64/libmysqlclient.so.18.0.0 > /usr/lib64/libmysqlclient.so.18.0.0: ELF 64-bit LSB shared object, > x86-64, version 1 (SYSV), dynamically linked, > BuildID[sha1]=8b103aaafd60c23addd177a4fd254affb3abc916, not stripped > > [root@xxxx pmacct]# md5sum /usr/lib64/libmysqlclient.so.18.0.0 > 817b141e90cdb66f63432fda22f8db6f /usr/lib64/libmysqlclient.so.18.0.0 > > > Kind regards, > > Yann > > On Tue, Dec 13, 2016 at 10:47 AM, Mehul Prajapati > <[email protected]> wrote: > > Hi, > > > > In my Ubuntu machine where pmacct is working with MySQL > > > > /usr/lib/x86_64-linux-gnu/libmysqlclient.so -> libmysqlclient.so.18 > > /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 -> > libmysqlclient.so.18.0.0 > > /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0 > > > > In your machine, > > libmysqlclient.so (libc6,x86-64) => /lib64/libmysqlclient.so > > > > Can you check soft links, whether it's pointing to proper .so file ? > > > > > > -----Original Message----- > > From: pmacct-discussion [mailto:[email protected]] > On Behalf Of Yann Belin > > Sent: Tuesday, December 13, 2016 3:07 PM > > To: [email protected] > > Subject: Re: [pmacct-discussion] Configure with MySQL / MariaDB support > > > > Hi Mehul, > > > > It didn't help. could it be a mysql-specific issue (e.g. version)? For > instance ./configure is able to find the pcap libraries under the same > location (/usr/lib64/) with no problems. > > > > [root@xxxx pmacct-1.6.1]# export > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/ > > [root@xxxx pmacct-1.6.1]# echo $LD_LIBRARY_PATH :/usr/lib64/ [root@xxxx > pmacct-1.6.1]# ./configure --enable-mysql > > (...) > > checking default locations for pcap.h... found in /usr/include checking > default locations for libpcap... no checking for pcap_dispatch in -lpcap... > yes checking for pcap_setnonblock in -lpcap... yes checking for bpf_filter > in -lpcap... yes checking packet capture type... linux checking whether to > enable MySQL support... yes checking for mysql_config... mysql_config > checking for mysql_init in -lmysqlclient... no > > configure: error: ERROR: missing MySQL client library [root@xxxx > pmacct-1.6.1]# > > > > Kind regards, > > > > Yann > > > > On Tue, Dec 13, 2016 at 10:22 AM, Mehul Prajapati < > [email protected]> wrote: > >> Hi, > >> > >> I think your environment variable LD_LIBRARY_PATH is not pointing to > /usr/lib64/ directory. > >> > >> Please run following command and try. > >> > >> $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: /usr/lib64/ > >> > >> -----Original Message----- > >> From: pmacct-discussion [mailto:[email protected]] > >> On Behalf Of Yann Belin > >> Sent: Tuesday, December 13, 2016 2:47 PM > >> To: [email protected] > >> Subject: [pmacct-discussion] Configure with MySQL / MariaDB support > >> > >> Hello, > >> > >> I am trying to install pmacct with MySQL / MariaDB support but > [./configure --enable-mysql] fails with the message below. > >> > >> *-*-*-*-* > >> (...) > >> checking for mysql_init in -lmysqlclient... no > >> configure: error: ERROR: missing MySQL client library > >> *-*-*-*-* > >> > >> I have proper libraries and devel packages installed, any idea what may > be causing this? > >> > >> [root@xxxx pmacct-1.6.1]# locate libmysqlclient > >> /usr/lib64/libmysqlclient.so > >> /usr/lib64/libmysqlclient.so.15 > >> /usr/lib64/libmysqlclient.so.15.0.0 > >> /usr/lib64/libmysqlclient.so.16 > >> /usr/lib64/libmysqlclient.so.16.0.0 > >> /usr/lib64/libmysqlclient.so.18 > >> /usr/lib64/libmysqlclient.so.18.0.0 > >> /usr/lib64/libmysqlclient_r.so > >> /usr/lib64/libmysqlclient_r.so.15 > >> /usr/lib64/libmysqlclient_r.so.15.0.0 > >> /usr/lib64/libmysqlclient_r.so.16 > >> /usr/lib64/libmysqlclient_r.so.16.0.0 > >> /usr/lib64/libmysqlclient_r.so.18 > >> /usr/lib64/libmysqlclient_r.so.18.0.0 > >> > >> [root@xxxx pmacct-1.6.1]# ldconfig -p | grep mysqlclient > >> libmysqlclient_r.so.16 (libc6,x86-64) => > /lib64/libmysqlclient_r.so.16 > >> libmysqlclient_r.so.15 (libc6,x86-64) => > /lib64/libmysqlclient_r.so.15 > >> libmysqlclient.so.18 (libc6,x86-64) => > /lib64/libmysqlclient.so.18 > >> libmysqlclient.so.16 (libc6,x86-64) => > /lib64/libmysqlclient.so.16 > >> libmysqlclient.so.15 (libc6,x86-64) => > /lib64/libmysqlclient.so.15 > >> libmysqlclient.so (libc6,x86-64) => /lib64/libmysqlclient.so > >> > >> [root@xxxx pmacct-1.6.1]# rpm -qa | grep -i maria > >> MariaDB-devel-10.0.28-1.el7.centos.x86_64 > >> MariaDB-client-10.0.27-1.el7.centos.x86_64 > >> MariaDB-compat-10.0.27-1.el7.centos.x86_64 > >> MariaDB-connect-engine-10.0.28-1.el7.centos.x86_64 > >> MariaDB-common-10.0.27-1.el7.centos.x86_64 > >> MariaDB-server-10.0.27-1.el7.centos.x86_64 > >> MariaDB-shared-10.0.27-1.el7.centos.x86_64 > >> [root@scrutinizer01 pmacct-1.6.1]# > >> > >> Thanks in advance! > >> > >> > >> Yann > >> > >> _______________________________________________ > >> pmacct-discussion mailing list > >> http://www.pmacct.net/#mailinglists > >> > >> _______________________________________________ > >> pmacct-discussion mailing list > >> http://www.pmacct.net/#mailinglists > > > > _______________________________________________ > > pmacct-discussion mailing list > > http://www.pmacct.net/#mailinglists > > > > _______________________________________________ > > pmacct-discussion mailing list > > http://www.pmacct.net/#mailinglists >
_______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
