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

Bug 320339

Summary: app-emulation/xen-tools-4: fails with forced --as-needed
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Gentoo Xen Devs <xen>
Status: RESOLVED FIXED    
Severity: QA CC: esigra
Priority: High Keywords: InVCS
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

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 http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed 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.

Thanks,
Diego
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
libxenguest.so 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 libxenguest.so and the linker discovered the missing symbols.  The rule to link the various .opic files into libxenguest.so 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 <xarthisius@gentoo.org>
+  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.