Martin Pool wrote:

On 18 Jan 2003, Steve Hay <[EMAIL PROTECTED]> 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?

gcc version 3.2.1
glibc-config --version reports 1.2.10

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
I did:
   make dep CC='distcc'
   make CC='distcc'

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.
Same error. I looked into it and this is curious:
From /usr/bin/ :
lrwxrwxrwx 1 root root 3 Jan 16 09:24 cc -> gcc
-rwxr-xr-x 1 root root 69852 Jan 16 09:24 g++-gcc-2.95.3
lrwxrwxrwx 1 root root 14 Jan 16 09:24 g++2 -> g++-gcc-2.95.3
lrwxrwxrwx 1 root root 18 Jan 16 09:24 gcc -> /usr/local/bin/gcc

/usr/local/bin is where gcc 3.2.1 is installed. in fact cc --version shows 3.2.1.

make CC='cc' : same error
make CC='gcc' : no error
make CC='distcc gcc' : no error

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
sched.c.

Let us know how it works out.

While the problem is fixed, in a strage sorta way (still don't know why the cc link doesn't work..)
Here is the strange debugging output. the scheduler compile doesn't even show up. Below is the last of the distcc logged output, even when I DIRECTLY LINK cc -> /usr/local/bin/gcc (as if that would make a difference)

distcc[20098] exec on localhost: cc -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 "-DUTS_MACH
INE="i386"" -DKBUILD_BASENAME=version -c -o init/version.o init/version.c
distcc[20098] (dcc_spawn_child) forking to execute cc -D__KERNEL__ -I/usr/src/li
nux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-alia
sing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=
athlon "-DUTS_MACHINE="i386"" -DKBUILD_BASENAME=version -c -o init/version.o ini
t/version.c
distcc[20098] (dcc_spawn_child) child started as pid20099
distcc[20098] (dcc_collect_child) child 20099 terminated with status 0
distcc[20098] (dcc_report_rusage) cc resource usage: 0.010000s user, 0.020000s s
ystem
distcc[20098] compile on turing completed ok
distcc[20098] (dcc_exit) exit: code 0; self: 0.000000 user 0.000000 sys; childre
n: 0.010000 user 0.020000 sys
distcc[20098] (dcc_cleanup_tempfiles) deleted 0 temporary files

At any rate, whatever problem this is, thanks for the help.

-Steve




_______________________________________________
distcc mailing list http://distcc.samba.org/
To unsubscribe or change options: http://lists.samba.org/cgi-bin/mailman/listinfo/distcc
Alan Cox, Bdale, hpa, rusty, tridge, greg KH --> http://linux.conf.au/

Reply via email to