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
Created attachment 232701 [details] Build log
Created attachment 232733 [details, diff] ivtv-utils-1.4.0-r1.diff Build system of this package is a mess and I had to patch all Makefiles to make it sane. Additionally I did following changes to ebuild itself: * move compilation phase to src_compile() * don't install unneeded files rather than remove them from ${D} (see patch) * force build system to respect CC and CXX * add missing die's NOTE: building of test could be entirely skipped (by e.g. adding -C utils to all emakes) as binaries are not used nor installed.
Created attachment 232735 [details, diff] multiple fixes see patch header for full description
(In reply to comment #3) > Created an attachment (id=232735) [details] > see patch header for full description The cleanups are appreciated, but I noticed one change you may not have intended. Your patch to the top level Makefile switches from two calls of make -C to instead use a shell for loop. Aside from the potentially unwanted serialization this enforces, this can mask errors. As written, only a failure of the for loop will cause make to exit failure, and the for loop will only exit with failure if the last directory processed fails. Thus, a compilation failure might not cause make to report failure, which would cause your new ||die to be ineffective. To see the unwanted behavior: mkdir a b echo -e 'all:\n\tfalse' > a/Makefile echo -e 'all:\n\ttrue' > b/Makefile echo -e 'all:\n\tfor d in a b; do $(MAKE) -C $$d $@; done' >Makefile make || echo Build failed Since b/ succeeds, the top level succeeds, and the ||echo is never executed. Adding "|| exit $$?" after $@ causes the subshell to bail out early with a failure code, so that the top level make reports an error.
Created attachment 234575 [details, diff] multiple fixes Fixing my attempt to be too smart. Thanks Kyle for noticing. @Kyle Next time if you notice I do something stupid please CC me (if I'm not already there). I've stumbled upon your comment by accident...
(In reply to comment #5) s/Kyle/Kevin/g I'm terribly sorry :( I've merged you name with surname, too tired...
(In reply to comment #5) > Created an attachment (id=234575) [details] > multiple fixes > > Fixing my attempt to be too smart. Thanks Kyle for noticing. I think you attached the wrong file. The new file (attachment #234575 [details, diff]) is byte-for-byte identical to the old file (attachment #232735 [details, diff]) that you superseded. > @Kyle > Next time if you notice I do something stupid please CC me (if I'm not already > there). I shall do so. (In reply to comment #6) > (In reply to comment #5) > s/Kyle/Kevin/g > I'm terribly sorry :( I've merged you name with surname, too tired... This happens to me on a fairly regular basis. You are not the first, and will doubtless not be the last.
Created attachment 234639 [details, diff] multiple fixes (In reply to comment #7) > I think you attached the wrong file. Fixed. Thanks! I solemnly swear not to spam this bug anymore...
+ 29 Jun 2010; Kacper Kowalik <xarthisius@gentoo.org> + ivtv-utils-1.4.0-r1.ebuild, +files/ivtv-utils-1.4.0-gentoo.patch: + QA clean up and fixing build with --as-needed wrt bug 321303. Thanks to + Diego for reporting. +