Export to GitHub

distcc - issue #98

Build problem of checkout r755


Posted on Mar 4, 2012 by Quick Bird

I ran: ./autogen.sh ./configure make

and got this: gcc -D_FORTIFY_SOURCE=2 -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/etc\"" -DPKGDATADIR="\"/usr/share/distcc\"" -Isrc -I"./src" -I"./lzo" -Werror -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wmissing-declarations -Wuninitialized -D_REENTRANT -pthread -o src/zeroconf.o -c src/zeroconf.c src/zeroconf.c: In function 'dcc_zeroconf_add_hosts': src/zeroconf.c:601:18: error: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Werror=unused-result] cc1: all warnings being treated as errors

Comment #1

Posted on Mar 5, 2012 by Happy Wombat

A work-around is to configure with

./configure --disable-Werror

Comment #2

Posted on Mar 5, 2012 by Quick Bird

Thanks! Would be great if you could fix that by default!

Comment #3

Posted on Mar 6, 2012 by Happy Wombat

Here's a patch. Can you please review it and let me know if it looks good to you?

Index: src/zeroconf.c

--- src/zeroconf.c (revision 755) +++ src/zeroconf.c (working copy) @@ -598,8 +598,11 @@ setsid(); #endif

  • chdir("/");
  • int ret = chdir("/"); rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
  • if (ret != 0) {
  • rs_log_warning("chdir to '/' failed: %s", strerror(errno));
  • } _exit(daemon_proc(host_file, lock_file, n_slots)); }

Comment #4

Posted on Apr 4, 2012 by Helpful Panda

I went ahead and commit the patch. Fixed in revision 757.

Comment #5

Posted on Apr 4, 2012 by Helpful Panda

(No comment was entered for this change.)

Status: Fixed