Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 298144 - x11-wm/musca: fails with forced --as-needed
Summary: x11-wm/musca: 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 QA (vote)
Assignee: Jeroen Roovers (RETIRED)
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2009-12-23 23:16 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-12-27 18:55 UTC (History)
1 user (show)

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


Attachments
Build log (musca-0.9.24:20091223-141838.log,12.54 KB, text/plain)
2009-12-23 23:16 UTC, Diego Elio Pettenò (RETIRED)
Details
fixing as-needed issues (musca-0.9.24-make.diff,916 bytes, patch)
2009-12-27 18:18 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details | Diff
fixing as-needed issues (musca-0.9.24-make.diff,853 bytes, patch)
2009-12-27 18:25 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-23 23:16:35 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 2009-12-23 23:16:59 UTC
Created attachment 213988 [details]
Build log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-24 02:04:35 UTC
Looks like this might fix it:

Index: files/musca-0.9.24-make.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/x11-wm/musca/files/musca-0.9.24-make.patch,v
retrieving revision 1.1
diff -u -B -r1.1 musca-0.9.24-make.patch
--- files/musca-0.9.24-make.patch       30 Nov 2009 20:46:35 -0000      1.1
+++ files/musca-0.9.24-make.patch       24 Dec 2009 02:03:44 -0000
@@ -4,7 +4,7 @@
 -CFLAGS?=-Wall -g
 +CFLAGS ?= -Wall -g
 +INCLUDES = $(shell pkg-config --cflags x11)
-+LIBS = $(shell pkg-config --libs x11) -lm
++LIBS = -lm $(shell pkg-config --libs x11)
 +COMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(LIBS) $(LDFLAGS)
 +BIN_DIST = musca apis xlisten
  
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2009-12-27 18:18:23 UTC
Created attachment 214336 [details, diff]
fixing as-needed issues

(In reply to comment #2)
It's rather wrong compilation order. Corrected make.patch attached.
Comment 4 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2009-12-27 18:25:42 UTC
Created attachment 214337 [details, diff]
fixing as-needed issues

Sorry for the noise, I've skipped some important things in previous patch
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-27 18:55:24 UTC
Ah. Thanks. That makes it slightly more clear how --as-needed expects arguments to be ordered. I applied that last patch as it does seem to make sense.