Subject: Getting current...
To: None <masami@fa2.so-net.or.jp>
From: Benoit MARTEL <magus@cs.mcgill.ca>
List: current-users
Date: 03/10/1997 21:47:48
On Tue, 11 Mar 1997, Masami and Ken Nakata wrote:

> On Mon, 10 Mar 1997 15:24:15 -0500 (EST),
> Benoit MARTEL <magus@cs.mcgill.ca> wrote:
> > 
> > I did "make includes" in /usr/src/includes and in /usr/src/sys.
> > I also built and installed config, install and gcc.
> > Then I compiled a new kernel and rebooted using it.
> 
> Did you get /usr/src/Makefile?  That'll make it much easier
> to get things up to date...

I just figured that one out this afternoon. No wonder I was confused what 
order to "make" the directories in! :) I downloaded the tar files from 
ftp.netbsd.org and they dont have the Makefile at the top. I whent got 
the Makefile from the current tree (the modif data is old, should be OK).

> > Now, my problem is with statically linked progs.
> > If I try to build everything before installing more stuff, I get errors 
> > when progs try to link with my libraries because they are the old ones (I 
> > get undefined symbols.  If I update my libraries and try to go back and 
> > compile the rest, my system is almost unusable because my binaries are 
> > the old ones and get undefined symbols from the new libraries (even login 
> > doesn't work).
> 
> I suggest you do "make build" with the above-mentioned Makefile
> *in the sinle-user mode*.  Oh, wait, before doing that, you have
> to do, by hand, "cd /usr/src/usr.bin/make; make && make install"
> and "cd /usr/src/usr.sbin/config; make && make install".

Single user is a good idea, I assume it will be a bit faster with less 
processes and more memory around. For safety, I decided to start from 
scratch since I installed a bunch of binaries in my system some of which 
were probably compiled with the wrong libraries etc. So I untared the 
base distribution 1.2 files over my system. Then I tried a "make clean" 
from /usr/src but that failed so I assumed it was because I hadn't 
recompiled make yet. Anyway, I just renamed my /usr/src and untared the 
original tarballs again; can't be too safe, I've already spent a few days 
on this. Now here, I really want to get the steps right. I sometimes get 
mixed messages from different people about the order. The more formal 
reference I found was Martin Cracauer's web page at 
http://www.bik-gmbh.de/~cracauer/bsd-to-current.html and according to him 
I should:

1) cd /usr/src/include; make install

This (1) seems out of date because it's should actually be "make 
includes" for it to do anything useful.

2) cd /usr/src/etc; make install

3) cd /usr/src/usr.bin/config; make && make install

This (3) everybody seems to agree.

4) config and make a new kernel

He says that if this fail you then "make && make install" the packages 
that seem to need updating and try again. In this case, it's quite clear 
we need to first rebuild "make" because of the new 'Q' modifier.

5) Boot with the new kernel.

6) cd /usr/src; make

Then he adds some troubleshooting if that fails.

I've been hearing some variations on this so taking all the tips into 
account, my best guess of steps (and what I will try) is as follows:

1) cd /usr/src/usr.bin/make; make && make install

2) cd /usr/src/usr.bin/config; make && make install

3) configure and compile a new kernel

4) boot with the new kernel

5) cd /usr/src; make build

I'm pretty sure this should work (looking at my newly acquired 
/usr/src/Makefile). Is it really the right way? Am I missing something 
again? I like this trial and error but it's taking several hours every 
time I try to compile something large so hopefully, this should make it 
into the FAQ. Section 3.2.13 asks the question but there is no answer.

> 
> Good luck!

Thanks!

> Ken
> 

Ben

-----------------------------------------------------------------
"Because user errors often produce unpredictable results, the user
should try to avoid them."

IBM MVS/XA System Programming Library.