Subject: Re: road map for new immigrants?
To: None <>
From: Richard Earnshaw <>
List: current-users
Date: 09/15/1998 17:54:02
> > No wonder I've found it such a pain to try and get things bootstrapped.
> If something's making it a pain for you to bootstrap the system, it's either
> your having the -domestic sources _even though_ you're not in the U.S., or
> your misinterpretation of the advice you've been given on this list.
> As has been pointed out earlier in this thread, if you don't have
> /usr/src/domestic, nothing _needs_ compile_et, so your build won't blow up
> if you don't have it.

Actually it was a misinterpretation, but it was based on the fact that I 
didn't have the full information.  Since I don't have domestic I don't 
have the source of compile_et.  Ergo, I can't know whether it contains 
something I need or not.

> At one point, when Kerberos IV was first integrated into the system, the
> top-level Makefile in /usr/src did, if the directories were there, go
> build and install compile_et and mk_cmds before trying to run a "make depend"
> over /usr/src/domestic.  This was ugly, but it was a reasonable migration step
> since those binaries weren't in any binary distribution set for any NetBSD
> release.
> There is no longer any reason for that; if you want to be able to rebuild
> /usr/src/domestic, we assume that your system already has the "domestic"
> set of binaries installed on it.  If it doesn't, you have to go build and
> install a few of the support tools first.  I completely fail to see what's
> wrong with this.

/rant on/

What's wrong with this is exactly what makes doing a cross build 
difficult:  the bootstrap now needs a pre-bootstrap, and there seem to be 
few/no rules for doing this (and even less documentation).  Also, this can 
rapidly lead to a situation where you can't build something until you have 
it already.  A good example of this is the linker which needs libc, but 
rules in share/mk assume that the latest version of ld is installed (they 
use flags which aren't in the 1.3 release version).  So you can't build a 
new version of libc until you have the latest version of the linker -- 
things like this mean that you end up jumping into and out of different 
subtrees trying to build up a set of tools that will work to enable you to 
build the full set of tools.

A proper bootstrap system should (in my opinion):

  Build a minimal set of tools that are needed to compile the rest of
    the tree
  Install them somewhere out of the way
  Use the minimal set to build and install everything else.
  Be able to do everything (except the final install) without needing
    to run as root.

The build of the minimal set should be very portable (ideally it should 
generate a set of cross-compilation tools as well if necessary).  It 
doesn't *HAVE* to use all the most fancy features of netbsd, for example, 
the linked binaries don't have to use shared libraries at this point.

/rant off/

I like NetBSD; I want to use it.  But I think the build system sucks.