Summary: | net-analyzer/vnstat: fails with forced --as-needed | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | New packages | Assignee: | Gentoo Netmon project <netmon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://www.gentoo.org/proj/en/qa/asneeded.xml | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 129413 | ||
Attachments: |
Build log
Patch to vnstat ebuild to add sed calls to fix Makefile issues |
Description
Diego Elio Pettenò (RETIRED)
![]() Created attachment 172682 [details]
Build log
Created attachment 179708 [details, diff]
Patch to vnstat ebuild to add sed calls to fix Makefile issues
The upstream Makefile exhibits two flaws. First, as Diego found, it does not link correctly under --as-needed because -lm is passed too early in the link line. Second, it does not respect user LDFLAGS, so this cannot be caught in normal /etc/make.conf --as-needed usage.
This patch adds a src_unpack function to the ebuild and uses sed to fix up the upstream Makefile. The sed expressions delete the explicit rules and set LDLIBS to -lm so that the implicit link rule works as desired.
Thanks Kevin, but it seems like this is fixed with 1.7 version. Good enough. 1.7 had not hit the tree when I posted the original fix, and is still not in stable. I assume that this type of build failure is not worth expediting a stable request, right? |