Subject: Re: kernel 'make install' problem?
To: Rui Paulo <rpaulo@fnop.net>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: current-users
Date: 05/28/2006 11:09:39
On Sun, 28 May 2006 15:33:46 +0100, Rui Paulo <rpaulo@fnop.net> wrote:

> At Sat, 27 May 2006 20:47:12 -0400,
> Steven M. Bellovin wrote:
> > 
> > I just build a kernel, using build.sh.  As I usually do, I did a 'cd' to
> > the build directory and did a 'make install'.  It failed with these
> > messages:
> > 
> > make: "/usr/src/sys/conf/Makefile.kern.inc" line 79: Malformed conditional
> > (${HAVE_GCC} > 3) make: "/usr/src/sys/conf/Makefile.kern.inc" line 79:
> > Need an operator make: "/usr/src/sys/conf/Makefile.kern.inc" line 82:
> > if-less endif make: "/usr/src/sys/conf/Makefile.kern.inc" line 82: Need an
> > operator make: "/usr/src/sys/conf/Makefile.kern.inc" line 96: Malformed
> > conditional (${HAVE_GCC} > 3) make: "/usr/src/sys/conf/Makefile.kern.inc"
> > line 96: Need an operator make: "/usr/src/sys/conf/Makefile.kern.inc" line
> > 98: if-less endif make: "/usr/src/sys/conf/Makefile.kern.inc" line 98:
> > Need an operator make: Fatal errors encountered -- cannot continue
> > 
> > make: stopped in /usr/BUILD/obj/sys/arch/i386/compile/GG1
> > 
> > Using nbmake from the tools directory didn't help; the build itself (of
> > all of kernel and userland) was done with a clean obj and tools directory.
> 
> The error is because your /usr/share/mk is not up-to-date.
> When you do a make install on the kernel compile directory, it uses
> your system's /usr/share/mk, not the one in your source tree.
> 
> To solve this, just to a ``make USETOOLS=no install`` in
> YOURSOURCETREE/share/mk. After that, make install should work.
> 
Thanks -- but I would argue that that's a bug.  Why should a kernel build
(well, install) reference something outside of the build tree?


		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb