[distcc] Missing Files: Kernel Compile

Martin Pool mbp at sourcefrog.net
Sat Jan 18 23:31:01 GMT 2003

On 18 Jan 2003, Steve Hay <hays at rpi.edu> wrote:
> I have compiled the 1.0 release of distcc on my slack box and got an 
> error about the multiline printf in dopt.c (line 113-114) (using gcc 3.2.)
> gcc -g -O2 -W -Wall -Wshadow -Wpointer-arith -Wcast-align 
> -DHAVE_CONFIG_H -I./popt -I./src  -c -o src/dopt.o src/dopt.c
> In file included from src/dopt.c:45:
> popt/popt.h:444: warning: type qualifiers ignored on function return type
> src/dopt.c:114:1: directives may not be used inside a macro argument
> src/dopt.c:113:1: unterminated argument list invoking macro "printf"
> src/dopt.c: In function `distccd_show_usage':
> src/dopt.c:117: parse error before string constant

It looks like printf has become a macro?  What *exact* gcc and glibc
versions are using?

> Then, I tried the vanilla linux kernel with "make -j2 CC='distcc' ".. 
> This error persists (I am doing the proper make mrproper oldconfig dep 
> && make) [ same error with simpler make CC='distcc' ]

You know if you're doing -j you can't do "make dep" in the same
command as "make", right?  You need 

  make dep && make -j2 

> distcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall 
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon    
> -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched  
> -fno-omit-frame-pointer -c -o sched.o sched.c
> In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,
>                 from /usr/src/linux-2.4.20/include/linux/fs.h:12,
>                 from /usr/src/linux-2.4.20/include/linux/capability.h:17,
>                 from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
>                 from /usr/src/linux-2.4.20/include/linux/sched.h:9,
>                 from /usr/src/linux-2.4.20/include/linux/mm.h:4,
>                 from sched.c:23:
> /usr/src/linux-2.4.20/include/linux/kernel.h:10:20: stdarg.h: No such 
> file or directory

This almost certainly looks like a problem in installation of your
compiler or C library, not something in distcc.  Can you build the
kernel using 

  make CC=cc

rather than just using the default compiler. 

If so there is something wrong with the compiler called cc on your
system.  You can either fix this (good idea) or run something like

  make CC=distcc gcc-3.2'

specifying the non-broken compiler.

If that doesn't fix it, try turning on DISTCC_VERBOSE and DISTCC_LOG,
and post all the lines with the same pid for the compilation of

Let us know how it works out.


More information about the distcc mailing list