Summary: | app-misc/beanstalkd: fails with forced --as-needed | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | New packages | Assignee: | Caleb Tennis (RETIRED) <caleb> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://www.gentoo.org/proj/en/qa/asneeded.xml | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 129413 | ||
Attachments: |
Build log
Patch to beanstalkd-1.0.ebuild to fix several QA issues in upstream Makefile |
Description
Diego Elio Pettenò (RETIRED)
2008-11-15 14:31:22 UTC
Created attachment 171853 [details]
Build log
Note to self: this seems to get fixed by moving -levent to the end of the link line cc -Wl,-O1 -levent beanstalkd.o conn.o job.o ms.o net.o pq.o prot.o tube.o util.o -o beanstalkd becomes cc -Wl,-O1 beanstalkd.o conn.o job.o ms.o net.o pq.o prot.o tube.o util.o -o beanstalkd -levent Created attachment 182052 [details, diff] Patch to beanstalkd-1.0.ebuild to fix several QA issues in upstream Makefile This patch modifies the ebuild to fix several QA issues in the upstream Makefile. The upstream Makefile does not set CC, nor does its build system have a way to determine the correct compiler name. To address this, the patch adds a tc-export CC, as recommended in Diego's bug reports about various packages not respecting CC. Next, as reported here, linking fails with --as-needed because the library is listed too early. A sed transform replaces the assignment to LDFLAGS with one to LDLIBS, which resolves this issue. Finally, though not specifically a QA issue, this patch changes a CFLAGS assignment in the upstream Makefile. Originally, it did: CFLAGS := $(CFLAGS) -O2 This forced the package to compile with -O2, without regard to what the user put in CFLAGS in /etc/make.conf. The sed expression changes it to: CFLAGS := -O2 $(CFLAGS) This keeps -O2 as a default if one is not specified, but allows CFLAGS from the user to choose a different optimization level if desired. (In reply to comment #2) Yes, that is the typical solution to this type of bug. Given 1.2 uses autotools (and does not fail) I'd say this is done for. Thanks anyway Kevin! :) |