Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274211 - sys-fs/s3backer: fails with forced --as-needed
Summary: sys-fs/s3backer: 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: Caleb Tennis (RETIRED)
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2009-06-15 10:37 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-06-24 15:45 UTC (History)
0 users

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


Attachments
Build log (s3backer-1.2.2:20090614-233319.log,21.16 KB, text/plain)
2009-06-15 10:37 UTC, Diego Elio Pettenò (RETIRED)
Details
Patch to fix QA issues in upstream Makefile.am and configure.ac (s3backer-qa.patch,1.71 KB, patch)
2009-06-21 20:23 UTC, Kevin Pyle
Details | Diff
Patch to s3backer ebuild to use attachment #195392, and fix a minor dependency omission (s3backer-1.2.2.ebuild.patch,923 bytes, patch)
2009-06-21 20:27 UTC, Kevin Pyle
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-06-15 10:37:09 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-06-15 10:37:34 UTC
Created attachment 194763 [details]
Build log
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2009-06-21 13:29:02 UTC
I tried building this manually, but I can't reproduce it.  I'm not sure what a good proposed fix is.
Comment 3 Kevin Pyle 2009-06-21 20:23:24 UTC
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.
Comment 4 Kevin Pyle 2009-06-21 20:27:09 UTC
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.
Comment 5 Caleb Tennis (RETIRED) gentoo-dev 2009-06-24 15:45:59 UTC
Many thanks Kevin, applied in -r1