Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247926 - net-analyzer/ethstatus: fails with forced --as-needed
Summary: net-analyzer/ethstatus: 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: Michele Noberasco (RETIRED)
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-11-21 12:13 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2008-11-24 09:56 UTC (History)
1 user (show)

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


Attachments
Build log (net-analyzer:ethstatus-0.4.2-r2:20081121-072041.log,8.35 KB, text/plain)
2008-11-21 12:13 UTC, Diego Elio Pettenò (RETIRED)
Details

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:13:06 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:13:30 UTC
Created attachment 172668 [details]
Build log
Comment 2 Michele Noberasco (RETIRED) gentoo-dev 2008-11-24 09:02:12 UTC
Diego, this particular bug happens because /usr/lib/libncurses.so actually contains this:

/* GNU ld script
   Since Gentoo has critical dynamic libraries
   in /lib, and the static versions in /usr/lib,
   we need to have a "fake" dynamic lib in /usr/lib,
   otherwise we run into linking problems.

   See bug http://bugs.gentoo.org/4411 for more info.
 */
OUTPUT_FORMAT ( elf32-i386 )
GROUP ( /lib/libncurses.so )

and of course /lib/libncurses.so contains the missing symbols. I don't know how I should go about fixing this; do you?
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-24 09:07:46 UTC
No the ldscript is fine, the problem is that the linking order is wrong:

gcc -O2 -pipe -lncurses -o ethstatus ethstatus.c

-lncurses is passed before any object, so it's automatically discarded; the --as-needed fixing guides already contains a section about linking order.
Comment 4 Michele Noberasco (RETIRED) gentoo-dev 2008-11-24 09:56:14 UTC
touché :-)

Fixed in Portage...