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

Bug 247331

Summary: games-arcade/xgalaga: fails with forced --as-needed
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: darkside
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

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-18 13:04: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-18 13:06:54 UTC
Created attachment 172199 [details]
Build log
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-18 21:30:23 UTC
Actually, xgalaga honors the users LDFLAGS but does not work with --as-needed. I suggest append-ldflags --no-as-needed.

%% cvs diff xgalaga-2.0.34-r6.ebuild 
Index: xgalaga-2.0.34-r6.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/games-arcade/xgalaga/xgalaga-2.0.34-r6.ebuild,v
retrieving revision 1.5
diff -u -r1.5 xgalaga-2.0.34-r6.ebuild
--- xgalaga-2.0.34-r6.ebuild    4 Feb 2008 15:16:21 -0000       1.5
+++ xgalaga-2.0.34-r6.ebuild    18 Dec 2008 21:24:40 -0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/games-arcade/xgalaga/xgalaga-2.0.34-r6.ebuild,v 1.5 2008/02/04 15:16:21 nyhm Exp $
 
-inherit eutils games
+inherit eutils games flag-o-matic
 
 DEB_VER=30
 DESCRIPTION="A Galaga clone with additional features"
@@ -35,6 +35,7 @@
        sed -i \
                -e '/SOUNDDEFS/ s:@prefix@:@prefix@/bin:' Makefile.in \
                || die "sed Makefile.in failed"
+       append-ldflags -Wl,--no-as-needed #247331
 }
 
 src_compile() {

Committed, hope you don't mind.
Comment 3 Rafał Mużyło 2008-12-18 22:04:03 UTC
Looking at the log, most probably switching libs with libsprite/libsprite.a
should be the correct fix,
so an (almost) trivial sed line should do.
Comment 4 Tupone Alfredo gentoo-dev 2009-02-02 13:27:49 UTC
Fixed in portage. Thanks for report and solution