If mysql is set in USE flags but mysql is not yet installed, emerging ulogd will not emerge mysql. Because of this, ulogd fails to compile unless mysql has already been installed (either directly from the mysql ebuild, or as a dependency of another program). When mysql is NOT set in USE flags, the software still attempts to link against the mysql libraries and the compile fails. Reproducible: Always Steps to Reproduce: 1. emerge unmerge mysql 2. USE="-*" emerge ulogd Actual Results: Compile fails on ulogd_MYSQL.c with following error (more detail in attachment): !!! ERROR: app-admin/ulogd-1.02 failed. !!! Function src_compile, Line 20, Exitcode 2 !!! make failed Expected Results: ulogd should have compiled and installed successfully. Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.21-grsec) ================================================================= System uname: 2.4.21-grsec i686 AMD Duron(tm) processor Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -O3 -pipe -mmmx -m3dnow -msse" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/ config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon -O3 -pipe -mmmx -m3dnow -msse" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.vic.keypoint.com.au/gentoo http://ftp.vic.keypoint.com.au/gentoo http://gentoo.rfk.id.au ftp://mirror.aarnet.edu.au/pub/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://ftp.vic.keypoint.com.au/gentoo-portage" USE="apm crypt fam gdbm libwww memlimit ncurses pam perl pic python readline slang ssl x86 zlib"
Created attachment 24573 [details] Error messages from compiling ulogd without mysql These are the compile errors from ulogd when it is emerged without mysql installed (output is unaffected by the presence/absence of mysql in USE).
Turns out there was a copy of MySQL lying around which had been installed manually from source (instead of via portage). ulogd was finding the header files for MySQL but not the libraries (since they were in /usr/local). There is still a missing conditional dependency in the ebuild for ulog-1.02, but I'll file that as a new bug and close this one off. Sorry - my bad.