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

Bug 247928

Summary: net-analyzer/ifstatus: fails with forced --as-needed
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: 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 Makefile to fix linking with --as-needed and to respect user LDFLAGS

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-21 12:13:58 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:14:36 UTC
Created attachment 172669 [details]
Build log
Comment 2 Kevin Pyle 2009-01-24 04:31:31 UTC
Created attachment 179504 [details, diff]
Patch to Makefile to fix linking with --as-needed and to respect user LDFLAGS

This failure is the typical problem of passing libraries using LDFLAGS instead of LDLIBS.  The Makefile also overwrote user LDFLAGS with a fixed "-lncurses".  This patch drops the assignment of LDFLAGS and moves the -lncurses to LDLIBS, so that libraries are referenced after the object files that need them.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-02 11:50:52 UTC
Thanks Kevin, applied now!