minaco2 / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

build with gcc 4.1 snprintf.h error "expected declaration specifiers" #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Answering the following questions is a big help:

1. What version of distcc are you using (e.g. "2.7.1")?

building 3.1 from code.google.com/p/distcc

2. What platform are you running on (e.g. "Red Hat 8.0", "HP-UX 11.11")? 
What compilare are you using ("gcc 3.3")?  Run "uname -a" and "cc
--version" to see.

Novell SLES 10, SLED 10
gcc-4.1.2_20070115-0.11

3. What were you trying to do (e.g. "install distcc", "build Mozilla")?

build distcc

4. What went wrong?  

In file included from src/emaillog.c:36:
src/snprintf.h:30: error: expected declaration specifiers or '...' before
numeric constant
src/snprintf.h:30: error: expected declaration specifiers or '...' before
'__builtin_object_size'
src/snprintf.h:30: warning: conflicting types for built-in function
'__builtin___snprintf_chk'
src/snprintf.h:37: error: expected declaration specifiers or '...' before
numeric constant
src/snprintf.h:37: error: expected declaration specifiers or '...' before
'__builtin_object_size'
src/snprintf.h:37: warning: conflicting types for built-in function
'__builtin___vsnprintf_chk'

5. If you have an example of a compiler invocation that failed, quote it,
in full 

gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/etc\""
-DPKGDATADIR="\"/usr/share/distcc\"" -Isrc -I"./src" -I"./lzo" -march=i586
-mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -O2 -MD -W -Wall
-Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wnested-externs -Wmissing-declarations -Wuninitialized -pthread -o
src/emaillog.o -c src/emaillog.c

this builds fine with openSUSE 11.1 and gcc43-4.3.3_20081022-9.8

thanks for looking into this.

Original issue reported on code.google.com by dhb...@gmail.com on 31 Jan 2009 at 3:09

GoogleCodeExporter commented 9 years ago
Thanks for the bug report.

Could you please try the attached patch (apply it in the 'src' directory), and 
let me know if it solves the problem?

Original comment by fergus.h...@gmail.com on 31 Jan 2009 at 9:47

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by fergus.h...@gmail.com on 31 Jan 2009 at 9:48

GoogleCodeExporter commented 9 years ago
like a charm... builds with patch. thank you.

Original comment by dhb...@gmail.com on 2 Feb 2009 at 1:35

GoogleCodeExporter commented 9 years ago
Fixed in SVN revision 661.

Original comment by fergus.h...@gmail.com on 17 Feb 2009 at 11:11