Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253917 - dev-db/mysql-5.0.72-r1: mysql_config includes LDFLAGS (and hence as-needed) in --libs/--libs_r output
Summary: dev-db/mysql-5.0.72-r1: mysql_config includes LDFLAGS (and hence as-needed) i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard: InExtras 2009/07/06
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-05 22:33 UTC by Mike Auty (RETIRED)
Modified: 2009-07-06 19:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
mysql-5.0.76-as-needed-config.patch (mysql-5.0.76-as-needed-config.patch,1.84 KB, patch)
2009-02-14 22:55 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2009-01-05 22:33:33 UTC
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:)
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-11 11:39:10 UTC
Patches welcome. You'll find the mysql_config.sh.in and mysql_config.pl, just patch both of them.
Comment 2 Mike Auty (RETIRED) gentoo-dev 2009-02-14 22:55:58 UTC
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:)
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-06 18:26:34 UTC
Included in mysql-extras as of 2009/07/06. Git rev 40d5248.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-06 19:09:13 UTC
5.0.83 has been committed to Gentoo now, with this patch.