Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 553358

Summary: net-analyzer/pmacct - Poor detection of mysql libs/includes
Product: Gentoo Linux Reporter: Brian Evans (RETIRED) <grknight>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Brian Evans (RETIRED) gentoo-dev 2015-06-26 18:57:15 UTC
net-analyzer/pmacct has configure output which is prone to random build failures with mysql support.

Current output:
checking whether to enable MySQL support... checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
yes
checking default locations for libmysqlclient... not found
checking for mysql_real_connect in -lmysqlclient... yes
checking for main in -lstdc++... yes
checking for clock_gettime in -lrt... yes
checking default locations for mysql.h... found in /usr/include/mysql

Adding the following will fix the detection:
--- pmacct-1.5.1.ebuild 27 May 2015 11:21:22 -0000      1.4
+++ pmacct-1.5.1.ebuild 26 Jun 2015 18:42:35 -0000
@@ -47,6 +47,8 @@
                $(use_enable ipv6) \
                $(use_enable mongodb) \
                $(use_enable mysql) \
+               $(usex mysql "--with-mysql-includes=$(mysql_config --variable=pkgincludedir)" '') \
+               $(usex mysql "--with-mysql-libs=$(mysql_config --variable=pkglibdir)" '') \
                $(use_enable postgres pgsql) \
                $(use_enable sqlite sqlite3) \
                $(use_enable threads) \



New Output:
checking whether to enable MySQL support... checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
yes
checking your own MySQL client library... ok
checking for main in -lstdc++... yes
checking for clock_gettime in -lrt... yes
checking your own MySQL headers... ok
Comment 1 Brian Evans (RETIRED) gentoo-dev 2015-06-26 20:55:43 UTC
Note that this will fail in the upcoming versions of mysql and friends
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-06-27 06:38:45 UTC
Fixed without revision bump.