Subject: bin/3334: 'make -f Makefile.boot' in /usr/src/usr.bin/make fails
To: None <firstname.lastname@example.org>
From: Brian C. Grayson <email@example.com>
Date: 03/15/1997 02:24:23
>Synopsis: 'make -f Makefile.boot' in /usr/src/usr.bin/make fails
>Responsible: bin-bug-people (Utility Bug People)
>Arrival-Date: Sat Mar 15 00:35:01 1997
>Originator: Brian Grayson
Parallel and Distributed Systems
Electrical and Computer Engineering
The University of Texas at Austin
>Release: ~late Feb.
System: NetBSD marvin 1.2C NetBSD 1.2C (MARVIN) #18: Tue Mar 4 10:01:21 CST 1997 bgrayson@marvin:/a/orac/home/orac/src/sys/arch/i386/compile/MARVIN i386
Although the Makefile.boot in /usr/src/usr.bin/make is
intended to be used only for bootstrapping, it is unfortunate
that this Makefile can not be used on NetBSD systems.
The fatal errors from attempting to build arch.o are:
In file included from make.h:77,
/usr/include/unistd.h:170: conflicting types for `truncate'
/usr/include/sys/types.h:95: previous declaration of `truncate'
/usr/include/unistd.h:178: conflicting types for `getopt'
/usr/include/stdlib.h:150: previous declaration of `getopt'
/usr/include/unistd.h:184: conflicting types for `getsubopt'
/usr/include/stdlib.h:156: previous declaration of `getsubopt'
These are due to the fact that 'make.h' redefines 'const'
to be '', but only after some header files have already been
cd /usr/src/usr.bin/make && make clean && make -f Makefile.boot
I don't know what the best fix would be. I would suggest
having _every_ C file include "bootstrap.h" before _any_
includes, including system headers. If MAKE_BOOTSTRAP is
undefined, bootstrap.h would do nothing. Otherwise, it
would do the things such as making const and volatile
be ignored -- the things that are currently in
"make.h". I tried this out (making every C file
include "bootstrap.h" first) and it worked, although it
gave lots of warnings about conflicting types for memcpy,
etc. I then used the created bmake to re-create itself
with the -j3 option, and it succeeded.
This may not be the best fix, but to me it seems a bit
better than the current situation. Comments?