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 194763 [details] Build log
I tried building this manually, but I can't reproduce it. I'm not sure what a good proposed fix is.
Created attachment 195392 [details, diff] Patch to fix QA issues in upstream Makefile.am and configure.ac Based on the output from Automake when using LDFLAGS=-Wl,--as-needed, the way in which the upstream Makefile.am constructs its flags causes Automake to place user-specified LDFLAGS too late in the line to trigger this problem. However, I can reproduce the failure when using Diego's technique to force --as-needed. This patch fixes several QA issues: - User CFLAGS are overwritten in configure.ac. The patch changes configure.ac to append user-specified CFLAGS to the upstream-specified CFLAGS. - Active upstream-generated CFLAGS are doubled up in compilation because AM_CFLAGS is set to include $CFLAGS, even though Automake already specifies $CFLAGS separately in the rules it generates. The patch changes Makefile.am not to include $CFLAGS. - AM_LDFLAGS is used to link to the FUSE libraries. The patch drops this line, and instead has configure.ac probe for FUSE in the same way that it probes for other required libraries, so that configure will add -lfuse to $LIBS or die early if libfuse is unusable. I will also attach an ebuild patch to make use of these changes.
Created attachment 195394 [details, diff] Patch to s3backer ebuild to use attachment #195392 [details, diff], and fix a minor dependency omission Apply this patch to update s3backer-1.2.2.ebuild to EAPI=2, add sys-libs/zlib to $DEPEND, and add code to apply the previous attachment and perform the required eautoreconf afterward. The upstream configure script checks for sys-libs/zlib and dies on failure, so this patch adds a dependency to reflect that.
Many thanks Kevin, applied in -r1