Problems building 4.0 kernel

Problems building 4.0 kernel

Post by Chris Dahle » Sat, 06 May 2000 04:00:00



I ran into a wall last night.  I've been cvsup'ing src-all (4.0) about
once a week for a while now, and last night I had some time and decided
to rebuild everything.  It's only been a week or so since I last
compiled my kernel, and it's been a month or so since I did a "make
world".

I didn't change my kernel config file at all, and the compile goes fine
until it hits the "linking kernel" stage.  Then I suddenly get a pile of
errors saying "undefined reference to 'kqueue'" and "undefined reference
to 'knote'" in files like init_sysent.o, kern_exec.o, kern_fork.o, etc.

make world failed, too, although by that time I was frustrated and
didn't save the error messages.  Obviously, something has changed.
Anyone have any ideas?

Chris

 
 
 

Problems building 4.0 kernel

Post by Bill Mora » Sun, 07 May 2000 04:00:00


Did you do a `make clean' before running each of these? There could be
stale files from the last compile sitting around. Also, before making
world, did you delete /usr/obj?


> I ran into a wall last night.  I've been cvsup'ing src-all (4.0) about
> once a week for a while now, and last night I had some time and decided
> to rebuild everything.  It's only been a week or so since I last
> compiled my kernel, and it's been a month or so since I did a "make
> world".

> I didn't change my kernel config file at all, and the compile goes fine
> until it hits the "linking kernel" stage.  Then I suddenly get a pile of
> errors saying "undefined reference to 'kqueue'" and "undefined reference
> to 'knote'" in files like init_sysent.o, kern_exec.o, kern_fork.o, etc.

> make world failed, too, although by that time I was frustrated and
> didn't save the error messages.  Obviously, something has changed.
> Anyone have any ideas?

> Chris

--
Microsoft: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?

 
 
 

Problems building 4.0 kernel

Post by Chris Dahle » Mon, 08 May 2000 04:00:00


Quote:> Did you do a `make clean' before running each of these? There could be
> stale files from the last compile sitting around. Also, before making
> world, did you delete /usr/obj?

Yes to both.  In fact, with the kernel build, I got furstrated after a
couple of attempts and instead of "make clean", I just deleted the build
directory and then ran another config on my kernel config file.  No
help.  /usr/obj was also deleted prior to "make world".  Any other
ideas, perhaps?  This is quite perplexing.

Chris

 
 
 

Problems building 4.0 kernel

Post by Bill Mora » Mon, 08 May 2000 04:00:00



> > Did you do a `make clean' before running each of these? There could be
> > stale files from the last compile sitting around. Also, before making
> > world, did you delete /usr/obj?

> Yes to both.  In fact, with the kernel build, I got furstrated after a
> couple of attempts and instead of "make clean", I just deleted the build
> directory and then ran another config on my kernel config file.  No
> help.  /usr/obj was also deleted prior to "make world".  Any other
> ideas, perhaps?  This is quite perplexing.

Well, those two are usually the problem when I have build trouble.
However, I know of two other possibilities:
a. You could have cvsuped at a time when there was something unstable in
the tree. This is unlikely, and I've never had it happen, but it's
theoretically possible. The solution here is to re-cvsup and try again.
b. If this is the first time you've built a 4.0 system on a system that
was previously 3.X, you may have some extra work to do. I don't know if
this procedure is still valid, but it was not that long ago:
1. cd /usr/src/usr.sbin/config; make all install clean
 (I guess this is needed to make a 4.0 kernel)
2. cd /usr/src/usr.sbin.config; make all install clean
 (You need to rebuild the `config' program to properly config the 4.0
kernel)
3. Update your config file from LINT or GENERIC to include all the 4.0
stuff
4. build and install the new kernel
5. reboot (make world won't work with a 3.x kernel)
6. cd /usr/src; make buildworld
7. make -k installworld
 (this will fail in places, the -k makes sure it keeps goin anyway)
8. make installworld
 (this will pick up whatever didn't work the first time)
9. merge in the files in /usr/src/etc to /etc
 (I'm guessing a lot has changed)
10. rebuild your kernel again, cleaning first
11. Reboot, you should now have a 4.0 system.

You may have to remake devices and/or switch /etc/fstab around if you're
using IDE drives.

This information came from Alan Strassberg originally, and I haven't
done it yet. I've got 2 4.0 systems that I've installed from scratch -
but I rely on this one too much to risk fouling up an upgrade until I
have something to fall back on.

I assume that those steps are still necessary, but I don't know. I'd
appreciate if you let me know if you do this (whether it works or not
and if anything was missing)

Thanks and good luck,
Bill

--
Microsoft: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?

 
 
 

Problems building 4.0 kernel

Post by Tomasz Paszkows » Mon, 08 May 2000 04:00:00



>Yes to both.  In fact, with the kernel build, I got furstrated after a
>couple of attempts and instead of "make clean", I just deleted the build
>directory and then ran another config on my kernel config file.  No
>help.  /usr/obj was also deleted prior to "make world".  Any other
>ideas, perhaps?  This is quite perplexing.

 Did you include

 COMPAT_43 in your kernel config ?

--
   _     _    _  _   _

  | |\ \| | \ \ \_/ / \ -------------------------------------------------------
 /_/  \__/  /_/ /_\ \_/                         Powered by Brain and Keyboard

 
 
 

Problems building 4.0 kernel

Post by Chris Dahle » Tue, 09 May 2000 04:00:00


Quote:> a. You could have cvsuped at a time when there was something unstable in
> the tree. This is unlikely, and I've never had it happen, but it's
> theoretically possible. The solution here is to re-cvsup and try again.

Surprisingly enough given that I'm building off a stable branch, this
seems to be exactly what the problem was.  I ran cvsup again today and
following that everything built just fine.  It just must not have been
my day last week.  Thanks to all for the help.

Chris

 
 
 

Problems building 4.0 kernel

Post by rick norma » Tue, 09 May 2000 04:00:00


I have had similar problems only the solution wasn't what you
might think.  My older Pentium 200 turned out to have a dead
cooling fan.  System would run fine for days but when I would
try to build the kernel, the cpu couldn't handle the intensity
of the compiles and I would start getting various compile errors.
Just a thought, but try looking at the fan on your cpu and power
supplies.
Rick

> I ran into a wall last night.  I've been cvsup'ing src-all (4.0) about
> once a week for a while now, and last night I had some time and decided
> to rebuild everything.  It's only been a week or so since I last
> compiled my kernel, and it's been a month or so since I did a "make
> world".

> I didn't change my kernel config file at all, and the compile goes fine
> until it hits the "linking kernel" stage.  Then I suddenly get a pile of
> errors saying "undefined reference to 'kqueue'" and "undefined reference
> to 'knote'" in files like init_sysent.o, kern_exec.o, kern_fork.o, etc.

> make world failed, too, although by that time I was frustrated and
> didn't save the error messages.  Obviously, something has changed.
> Anyone have any ideas?

> Chris