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
Diego, you never attached a build log. Maintainers: this turns out to be a fairly simple fix. xpdf uses a custom Makefile which has this rule for building xpdf: xpdf: CoreOutputDev.o GlobalParams.o ImageOutputDev.o PDFCore.o XPDFApp.o XPDFCore.o XPDFTree.o XPDFViewer.o parseargs.o xpdf.o $(CXX) -o xpdf $(LIBS) *.o When --as-needed is passed, the linker searches the libraries specified in $(LIBS), discards them, then reaches the .o files that require the symbols. The fix is to reorder the line to be: $(CXX) -o xpdf *.o $(LIBS) xpdf also fails to honor $LDFLAGS, so normal --as-needed testing via /etc/make.conf failed to find this problem. I will attach a patch that corrects both issues. With it, I am able to build xpdf with --as-needed.
Created attachment 177018 [details, diff] Patch to Makefile to fix xpdf link line to honor $LDFLAGS and link libraries late enough that --as-needed does not break the build
+ 16 Jan 2009; Peter Alfredsen <loki_val@gentoo.org> + +files/xpdf-3.02-as-needed.patch, xpdf-3.02-r1.ebuild: + Fix as-needed, bug 247003. +