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

Bug 165511

Summary: mysql_config --cflags includes all of $CFLAGS in it's output
Product: Gentoo Linux Reporter: Joshua Hoblitt <j_gentoo>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Joshua Hoblitt 2007-02-05 21:02:07 UTC
This is a bug with MySQL and not just Gentoo but I thought I'd file it here first in hopes that a fix will be sent upstream.  The mysql_config utility is encoding the value of CFLAGS into the output of it's --cflags option.  This is an incorrect behavior.  --cflags should *only* return the CFLAG values needed to link against libmysqlclient*.  This can be particullary annoying if MySQL is built with -g or optimization flags that will break the compilation of packages that depend on libmysqlclient.  Eg. I'm on my laptop the output of `mysql_config  --cflags` looks like this:

-I/usr/include/mysql -pipe -march=pentium-m -mfpmath=sse -msse -msse2 -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing

The solution is problem for MySQL's configure.ac to keep the value of CFLAGS seperated from the MYSQL_CFLAGS value that gets backed into mysql_config. (as is what is typically done with pkg-config .pc files)

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-02-05 22:03:17 UTC

*** This bug has been marked as a duplicate of bug 156301 ***