Hiya guys, I was just trying to build a package (mangos-9999 as it turns out). It wasn't building properly with LDFLAGS="-Wl,--as-needed", so I set LDFLAGS="", but sure enough it was still trying to build with --as-needed. I eventually tracked this down to the "mysql_config --libs_r" output. Whilst this should specify which libraries the system mysql was built with, it probably shouldn't also specify the same LDFLAGS, as these may no longer be wanted. Since the file's a script it's pretty easy to edit and work around, but I thought I should flag it up in case someone else trips into it. The ideal solution is to fix the other package to accept as-needed properly, and I'm going to work on that, but this should probably be fixed too when you're really bored... 5:)
Patches welcome. You'll find the mysql_config.sh.in and mysql_config.pl, just patch both of them.
Created attachment 182078 [details, diff] mysql-5.0.76-as-needed-config.patch Cool, thanks very much for the pointers to the right place. 5:) These patches just remove LDFLAGS from the libs entries. I've based it against mysql-5.0.76, but I doubt there's much change between versions. On my system's mysql install, LDFLAGS doesn't hold any additional library directives, so my guess is that the mysql build system doesn't ever mistakenly use it that way. Let me know if there's anything else I can help with... 5:)
Included in mysql-extras as of 2009/07/06. Git rev 40d5248.
5.0.83 has been committed to Gentoo now, with this patch.