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
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: Caleb Tennis (RETIRED)
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: ---

Build log (s3backer-1.2.2:20090614-233319.log,21.16 KB, text/plain)
2009-06-15 10:37 UTC, Diego Elio Pettenò (RETIRED)
Patch to fix QA issues in upstream and (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 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.

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 and

Based on the output from Automake when using LDFLAGS=-Wl,--as-needed, the way in which the upstream 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  The patch changes 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 not to include $CFLAGS.
- AM_LDFLAGS is used to link to the FUSE libraries.  The patch drops this line, and instead has 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