Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259013 - app-misc/beanstalkd-1.0 fails to build with -D_FORTIFY_SOURCE=2
Summary: app-misc/beanstalkd-1.0 fails to build with -D_FORTIFY_SOURCE=2
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Caleb Tennis (RETIRED)
: 260185 260238 (view as bug list)
Depends on:
Blocks: fortify-source
  Show dependency tree
Reported: 2009-02-14 21:40 UTC by Kevin Pyle
Modified: 2009-03-02 00:03 UTC (History)
2 users (show)

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

Build log of beanstalkd-1.0 (app-misc_beanstalkd-1.0.log,1.90 KB, text/plain)
2009-02-24 21:33 UTC, Magnus Granberg
Remove -Werror (remove_Werror2.patch,290 bytes, text/plain)
2009-02-25 23:32 UTC, Magnus Granberg

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pyle 2009-02-14 21:40:52 UTC
While preparing the patch for bug #246902, I encountered a build failure with app-misc/beanstalkd-1.0.  My CFLAGS included -D_FORTIFY_SOURCE=2, which turns on warnings in some commonly misused library functions.  The upstream Makefile adds -Werror to CFLAGS, so those warnings became fatal.  The section of the build log showing the failure is:

cc -O2 -pipe -D_FORTIFY_SOURCE=2 -Wall -Werror -O2   -c -o beanstalkd.o beanstalkd.c
cc1: warnings being treated as errors
beanstalkd.c: In function 'daemonize':
beanstalkd.c:64: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result
make: *** [beanstalkd.o] Error 1

The failed function appears to serve the same purpose as the glibc function daemon(3), so it should be possible to remove the offending function and replace it with a call to daemon().  I have no workload with which to test this application, nor do I use it, but I can write up a proposed patch if you would like.

Although I have -D_FORTIFY_SOURCE=2 in my CFLAGS explicitly, some of the gcc 4.3.x series will set it by default, so this package will likely break when gcc 4.3.x hits the tree.
Comment 1 Magnus Granberg gentoo-dev 2009-02-24 21:29:58 UTC
*** Bug 260185 has been marked as a duplicate of this bug. ***
Comment 2 Magnus Granberg gentoo-dev 2009-02-24 21:33:36 UTC
Created attachment 183078 [details]
Build log of beanstalkd-1.0
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-25 11:30:42 UTC
*** Bug 260238 has been marked as a duplicate of this bug. ***
Comment 4 Magnus Granberg gentoo-dev 2009-02-25 23:32:57 UTC
Created attachment 183206 [details]
Remove -Werror

Compile fine when remove -Werror
Comment 5 Patrick Lauer gentoo-dev 2009-03-02 00:03:33 UTC
+  02 Mar 2009; Patrick Lauer <>
+  +files/beanstalkd-werror.patch, beanstalkd-1.0.ebuild:
+  Fixing -Werror failure. Patch by Magnus Granberg.