Hello, ipaudit fails to build with mysql support (I use mariadb-5.5.31-r1): checking for mysql_init in -lmysqlclient... no *************************************************************** FATAL ERROR: you specified the option "--with-mysql" for mysql support, but the mysql *library* was not found. You can re-run "./configure" without the option "--with-mysql" to create the non-mysql version of ipaudit. *************************************************************** config.log shows that configure tries to locate libmysqlclient in standard library path while it is now located at $(libdir)/mysql: configure:3832: checking for mysql_init in -lmysqlclient configure:3862: i686-pc-linux-gnu-gcc -o conftest -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -pipe -frecord-gcc-switches -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -Wl,-O1,--as-needed -pipe conftest.c -lmysqlclient -lpcap -lnsl -lm >&5 /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lmysqlclient collect2: error: ld returned 1 exit status
Created attachment 357308 [details] config.log
Created attachment 357310 [details] build.log
Created attachment 357312 [details] emerge --info
Created attachment 357314 [details] ipaudit-1.0_beta2.ebuild New EAPI 5 ebuild. It appends needed LDFLAGS thus both fixing the problem and maintaining support for older mysql setups.
Comment on attachment 357314 [details] ipaudit-1.0_beta2.ebuild --- ipaudit-1.0_beta2.ebuild 2011-04-05 17:20:45.000000000 +0200 +++ - 2013-08-29 15:45:19.829501284 +0200 @@ -2,26 +2,27 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipaudit/ipaudit-1.0_beta2.ebuild,v 1.7 2011/04/02 12:53:39 ssuominen Exp $ -inherit eutils +EAPI=5 + +inherit eutils flag-o-matic multilib + DESCRIPTION="IPAudit monitors network activity on a network by host, protocol and port." HOMEPAGE="http://ipaudit.sourceforge.net/" MY_P="${PN}-${PV/_beta/BETA}" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" + KEYWORDS="~amd64 ppc x86" IUSE="mysql" + DEPEND="net-libs/libpcap mysql? ( virtual/mysql )" -#RDEPEND="" -S="${WORKDIR}/${MY_P}" +RDEPEND="${DEPEND}" -src_compile() { - econf `use_with mysql` || die - emake || die "emake failed" -} +S="${WORKDIR}/${MY_P}" -src_install() { - make DESTDIR=${D} install || die - dodoc AUTHORS README +src_configure() { + use mysql && append-ldflags "-L/usr/$(get_libdir)/mysql" + econf $(use_with mysql) }
Recent changes to dev-db/{mariadb,mysql} 5.5 may make it easier for libraries to be found. This bug may be obsolete with mariadb-5.5.38. Please retest. Also, please never assume a path and use the output from mysql_config as a source. In this case, `append-ldflags "$(mysql_config --libs)"` or `append-ldflags "-L$(mysql_config --variable=pkglibdir)"`
Hi, with mariadb-10.1.14 build is fine here.