Subject: obj-problems in src/lib
To: NetBSD current-users <current-users@NetBSD.ORG>
From: Bjoern Labitzke <hermit@labitzke.isdn.cs.tu-berlin.de>
List: current-users
Date: 09/01/1997 17:42:42
Hello...

A word before the questions: Because it works now, it's not too urgent. I
am just curious. ;-)

About a week ago I encountered problems in the lib-subtree of the sources.
I thought the problems might be on my side, so I redid everything step by
step, checked it with persons on #netbsd (esp. kleink; thx. again) and
found the error was not my fault.

The steps:

1) delete whole source-tree
2) untar whole source-tree
3) sup to update to the last state of development
4) Create /etc/mk.conf with
     BSDSRCDIR=/local/usr/src
     BSDOBJDIR=/local/usr/obj
   (my paths to the existing directories)
5) In /local/usr/src "make obj"
6) In /local/usr/src "make -DUPDATE build"


In the lib-subdirs some errors occured, they all had the same reason:
Instead of writing the objects in the obj-dir, they were written to the
corresponding main directory, e.g. instead of /local/usr/src/lib/libc/obj
/local/usr/src/lib/libc got populated with object-files. When it came to
building the lib itself, the files couldn't be found. 

My solution: I moved all objects and cat-files to the obj-dir (in all
lib-subdirs!), removed the .depend-files and did a "make -DUPDATE build"
in the main src-dir again. From this time on each build worked fine.


Any ideas why it went wrong in the first run? Remarkable is, that only
src/lib was concerned, all the rest worked fine. (I tested that with some
(make -DUPDATE depend; make -DUPDATE)-runs in different dirs. It went bad
in the lib-dirs, but fine in all the rest.

Bye, Bjoern

-- 
Bjoern Labitzke   | E-Mail: hermit@cs.tu-berlin.de
PGP-Key available | Use PGP! Or don't you use envelopes for your letters?