solaris bootstrap problems
Mike Stump
mrs@windriver.com
Wed Dec 20 08:14:00 GMT 2000
> Date: Tue, 19 Dec 2000 22:40:30 -0800
> To: gcc@gcc.gnu.org, mrs@windriver.com
> From: Benjamin Kosnik <bkoz@redhat.com>
> Hey mike. I don't suppose you could post the error you're seeing?
I already have. The problem is there is _no_ build error caught and
returned by make. The symptom is that there is no libstdc++-v3 built,
or Makefile generated. The way to reproduce it is to try make -j5
bootstrap on a solaris machine with GNU make 3.79.
> Can you please explain what you mean by this:
> "I think the fix is to serialize the configuration of all the target directories."
> And how is that done?
I was taking a stab in the dark, as to what the problem might be. I
noticed that all the target libs seemed to be configured in parallel.
Since all these go through config.cache, I wondered if there is a bug
in automake, or some of the configury bits that doesn't like this.
All make targets are done in parallel, _unless_ there is an explicit
dependency that _prevents_ this from happening.
So, for example:
foo.c: foo.y
bison foo.y
foo.h: foo.y
bison foo.y
foo.o: foo.c foo.h
main: main.c foo.o
isn't parallel safe. The reason is that when main is built, it will
build all the dependencies in parallel, which is wrong, as bison will
not protect the generation of the foo.[ch] files, but two bison calls
run at the same time. To fix it, one can change it to:
foo.h: foo.y
bison foo.y
foo.c: foo.h
foo.o: foo.c foo.h
main: main.c foo.o
Here, things serialize through foo.h. I'd hope the GNU make manual
describes these issues, but it's been a while since I looked at it.
Another way in which people usually get makefiles wrong, is by assuming that:
d: a b c
will first do a, then after that is done, then start b, and after that
is done, start on c. This isn't the case. C can be done first, then
b, then a, or a then c then b and so on. Or part of c, then part of a
and then... One can serialize this by doing:
d: c
c: b
b: a
or by:
d: a b c
b: a
c: b
or maybe by:
d:
make a && make b && make c
(ick).
More information about the Gcc
mailing list