Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320339 - app-emulation/xen-tools-4: fails with forced --as-needed
Summary: app-emulation/xen-tools-4: fails with forced --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: Gentoo Xen Devs
Keywords: InVCS
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2010-05-18 10:24 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-06-25 16:44 UTC (History)
1 user (show)

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

Build log (xen-tools-4.0.0:20100517-230232.log,198.55 KB, text/plain)
2010-05-18 10:25 UTC, Diego Elio Pettenò (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-18 10:24:50 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out for details).

Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.

Check the attached build log.

Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-18 10:25:14 UTC
Created attachment 231911 [details]
Build log
Comment 2 Kevin Pyle 2010-05-23 04:16:03 UTC was linked with -lbz2 -llzma too early in the link line, so the forced --as-needed dropped them.  The build later failed when an application linked to and the linker discovered the missing symbols.  The rule to link the various .opic files into needs to be modified to place -lbz2 -llzma after the objects, not before.
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-06-25 16:44:35 UTC
+  25 Jun 2010; Kacper Kowalik <>
+  xen-tools-4.0.0.ebuild, -files/xen-tools-4.0.0-as-needed.patch,
+  +files/xen-tools-4.0.0-asneeded.patch:
+  Fixing build with --as-neeed wrt bug 320339. Thanks to Diego for
+  reporting.