Subject: Re: Kernel compilation fails
To: None <current-users@NetBSD.org>
From: William Allen Simpson <wsimpson@greendragon.com>
List: current-users
Date: 11/03/2003 12:46:39
Allen Briggs wrote:
>
> On Mon, Nov 03, 2003 at 06:55:29AM -0500, William Allen Simpson wrote:
> > Yes, despite the existing instructions to the contrary, it's best to
> > compile userland before kernel, although you must install the kernel
> > before userland. I documented that in PR 21923, after questions on
> > this list circa last June.
>
> Actually, I think the instructions should be something like (abbreviated):
>
> * Use build.sh to build new tools
>
> * Use new tools to build new kernel
>
I strongly disagree. At this point, it is important to make sure that
the new tools will build the userland.
If the userland doesn't build -- completely enough to install, which
should be tested with `build distribution` -- then a new `cvs update`
(and/or patches) is necessary until it does!
I have found that it is essential to ensure that the userland sources
are as close to the anticipated kernel as possible.
Once the userland is ready, then it's time to compile the kernel, a
much easier and less time consuming task.
Of course, this is only possible because of the nice tools! Even a
native compilation is handled as a cross-build. As far as I know
(and I also asked here on this list) there is no dependency on the
kernel in the build tools.
> * Back up old kernel
>
> * Install new kernel
>
> * Boot new kernel
>
> * Rebuild the rest of the system
>
That's the OLD method, when building userland also installed them
into a running system. Dangerous and unnecessary.
Experience has shown that compiling the new userland with the new
kernel DOES NOTHING to enhance the building. Therefore, it is ONLY a
liability. Several times this past year, the new kernel has made it
impossible to complete building userland, resulting in an unusuable
system that needs to be rebuilt from scratch. This is untenable!
> Right now, it's the older compiler that's tripping people up because
> the old compiler had bugs that the kernel sources worked around. The
> newer compiler doesn't have the bugs, the kernel sources have been
> updated to remove the work-arounds, and the old compiler is exposed.
>
That only happens when people follow the *OLD* method. If they always
(1) build.sh tools
(2) build.sh distribution
(3) build.sh kernel
(4) install kernel (and reboot)
(5) build.sh install=/
-- keeping the smallest possible window between kernel and userland
-- there were no problems.
This was considerably enhanced by (5) build.sh install automatically
running postinstall and etcupdate.
As I've said time and again, the problem is that the documentation has
not kept up with the process. The same questions and answers come up
on this and other lists over again.
--
William Allen Simpson
Key fingerprint = 17 40 5E 67 15 6F 31 26 DD 0D B9 9B 6A 15 2C 32