Subject: Re: USE_NEW_TOOLCHAIN toolchain build not parallel-safe
To: None <sommerfeld@netbsd.org>
From: Havard Eidnes <he@netbsd.org>
List: tech-toolchain
Date: 09/27/2001 20:36:13
> This is a build of -current on a few-months-behind current system.
>
> It used to be the case that
>
> 	make build -j4 =

>
> would run successfully to completion.
>
> Now, if src/tools/toolchain needs to build, it blows up building
> libgcc2.a.  I have not attempted to investigate this yet..

Not only that -- the normal toolchain build is also busted in the same
way (no big surprise there, I guess).  I tried to do a "make -j2" of
the tree recently -- my tree was updated Sep 23.

The first time my build blew up was with

--- dependall-gcc ---
In file included from /usr/src/gnu/usr.bin/gcc/cc1/../../../dist/toolch=
ain/gcc/c-iterate.c:34:
/usr/src/gnu/usr.bin/gcc/cc1/../../../dist/toolchain/gcc/expr.h:353: in=
sn-codes.h: No such file or directory
/usr/tools/bin/mkdep: compile failed.
*** Error code 1
1 error

The reason appears to be that "backend" needs to be built before "cc1"
can be descended into, i.e. a missing .WAIT between those two in

  gnu/usr.bin/gcc/Makefile

However, that is far from enough; I next fell over an error which I
don't have the build log for (sorry), but it was one of the gcc host
programs (gen-something -- gengenrtl?) in the gcc build which was
being linked on one line and run on the next, and since the executable
was already lying around from an earlier attempt, the link step got an
error trying to write to the already-executing file.

I just retried a "make -j2" with the missing .WAIT in place, and got
the attached result -- apparently there are some insufficiently
expressed dependencies for "make -j2" to work.

- H=E5vard

------------------------------

--- rtl.lo ---
cc -O -I. -I/usr/src/gnu/usr.bin/gcc/backend/../arch/i386 -DIN_GCC -DHA=
VE_CONFIG_H -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/=
gcc -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/conf=
ig -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/../in=
clude -c -o rtl.lo /usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolc=
hain/gcc/rtl.c
--- bitmap.lo ---
cc -O -I. -I/usr/src/gnu/usr.bin/gcc/backend/../arch/i386 -DIN_GCC -DHA=
VE_CONFIG_H -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/=
gcc -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/conf=
ig -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/../in=
clude -c -o bitmap.lo /usr/src/gnu/usr.bin/gcc/backend/../../../dist/to=
olchain/gcc/bitmap.c
--- print-rtl.lo ---
cc -O -I. -I/usr/src/gnu/usr.bin/gcc/backend/../arch/i386 -DIN_GCC -DHA=
VE_CONFIG_H -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/=
gcc -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/conf=
ig -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/../in=
clude -c -o print-rtl.lo /usr/src/gnu/usr.bin/gcc/backend/../../../dist=
/toolchain/gcc/print-rtl.c
cc -O -I. -I/usr/src/gnu/usr.bin/gcc/backend/../arch/i386 -DIN_GCC -DHA=
VE_CONFIG_H -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/=
gcc -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/conf=
ig -I/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/../in=
clude  -o genattr /usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolch=
ain/gcc/genattr.c obstack.lo rtl.lo bitmap.lo print-rtl.lo
cc: obstack.lo: No such file or directory
cc: rtl.lo: No such file or directory
cc: bitmap.lo: No such file or directory
cc: print-rtl.lo: No such file or directory
In file included from /usr/src/gnu/usr.bin/gcc/backend/../../../dist/to=
olchain/gcc/genattr.c:25:
/usr/src/gnu/usr.bin/gcc/backend/../../../dist/toolchain/gcc/rtl.h:1173=
: genrtl.h: No such file or directory
*** Error code 1
1 error

make: stopped in /usr/src/gnu/usr.bin/gcc/backend
*** Error code 2