Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247924 - net-analyzer/bwmon: fails with forced --as-needed
Summary: net-analyzer/bwmon: fails with forced --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-11-21 12:05 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-06-02 11:42 UTC (History)
0 users

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


Attachments
Build log (net-analyzer:bwmon-1.3:20081121-065131.log,5.65 KB, text/plain)
2008-11-21 12:10 UTC, Diego Elio Pettenò (RETIRED)
Details
Patch to switch bwmon Makefile to use built-in GNU make rule to compile bwmon (bwmon-makefile.patch,265 bytes, patch)
2009-01-24 04:55 UTC, Kevin Pyle
Details | Diff
Patch to bwmon ebuild to add a line to apply the preceding patch, and to update the sed call (bwmon-ebuild.patch,838 bytes, patch)
2009-01-24 04:58 UTC, Kevin Pyle
Details | Diff
Replacement patch for bwmon Makefile (bwmon-makefile.patch,349 bytes, patch)
2009-01-24 05:06 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-21 12:05:35 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details).

Check the attached build log.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-21 12:10:43 UTC
Created attachment 172667 [details]
Build log
Comment 2 Kevin Pyle 2009-01-24 04:55:52 UTC
Created attachment 179507 [details, diff]
Patch to switch bwmon Makefile to use built-in GNU make rule to compile bwmon

The upstream Makefile had a manual rule that did not provide a way to specify libraries in the correct place.  Remove the rule in favor of letting GNU make infer how to build it based on dependencies and tradition.

A patch to the ebuild to change the sed expression is also required.  I will attach that next.
Comment 3 Kevin Pyle 2009-01-24 04:58:45 UTC
Created attachment 179509 [details, diff]
Patch to bwmon ebuild to add a line to apply the preceding patch, and to update the sed call

The ebuild uses a sed call to update LDFLAGS.  This is not necessary, but the use of LDFLAGS is wrong here.  Change the sed call to rewrite LDFLAGS to be LDLIBS.  Also, change the rewrite of the CFLAGS line to append user CFLAGS instead of prepending them.
Comment 4 Kevin Pyle 2009-01-24 05:06:35 UTC
Created attachment 179511 [details, diff]
Replacement patch for bwmon Makefile

Though the first patch compiled correctly, the use of an alternate output directory caused make not to build the final image when using an implicit rule.  Add the standard linking rule to ensure that the image is built and placed in the correct directory.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-02 11:42:48 UTC
Thanks for the patch Kevin, but I fixed it by just not using the Makefile at all :)