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.
*** Bug 260185 has been marked as a duplicate of this bug. ***
Created attachment 183078 [details] Build log of beanstalkd-1.0
*** Bug 260238 has been marked as a duplicate of this bug. ***
Created attachment 183206 [details] Remove -Werror Compile fine when remove -Werror
+ 02 Mar 2009; Patrick Lauer <patrick@gentoo.org> + +files/beanstalkd-werror.patch, beanstalkd-1.0.ebuild: + Fixing -Werror failure. Patch by Magnus Granberg.