Subject: Re: Building userland fails in bin/pax
To: Matthias Redlich <m-redlich@t-online.de>
From: Frederick Bruckman <fredb@immanent.net>
List: current-users
Date: 03/02/2003 19:12:28
On 2 Mar 2003, Matthias Redlich wrote:

> Am Sam, 2003-03-01 um 18.29 schrieb Matthias Redlich:
> >
> > I wanted to install NetBSD-current yesterday. After updating my sources
> > I succesfully did the following steps: './build.sh tools','./build.sh
> > kernel=<MYKERNEL>', replaced /netbsd with the new kernel, rebooted.
> >
> > Then I wanted to build the new userland. I tried './build.sh -u -D "" -T
> > /usr/tools -M /usr/obj distribution' (DESTDIR is an empty string because
> > I want to replace my old system). It stopped with the following error:

You're using inconsistent options. Your first invocation creates
directories named "obj" in each source directory, to place the objects
in. Setting ${MAKEOBJDIRPREFIX} to "/usr/obj", which is what "-M"
does, tells "make" to put the objects in subdirectories of "/usr/obj".
No symlinks required.

> > <installing stuff from /usr/src/bin..>
> > install ==> bin/pax
> > /usr/src//bin/tar -> /usr/src//bin/pax
> > *** Error code 1
> >
> > nbmake: stopped in /usr/src/bin/pax/obj
> >
> > <leaving dirs..>
> >
> > /usr/src/bin/tar does not exist.

Since you build with "-M /usr/obj", it should actually have built pax
in /usr/obj/usr/src/bin/pax, but for some reason the build think its
in /usr/src/bin/pax/obj, which must be from a previous build, so
either delete all the obj directories in the tree, or don't use "-M".

By the way, you don't need to set DESTDIR to "" -- it's more typical
to set it to "/", or leave it unset. Of course, it's safer to actually
set a DESTDIR.

> > I do not know what to do because I have no real error message (just
> > Error code 1). Does anybody know this problem? How could I get more
> > output?

If you set MAKEFLAGS=-dA in your environment, you'll get voluminous
output. That may not help much, in this case...

What I would suggest, is to clean out the crud from the source tree,
as follows,

    cd /usr/src
    find . -type dir -name obj | xargs -n5 rm -r

and try again. You could also do your cvs update with "-I \! -I CVS",
and it'll report every file in the source tree that shouldn't be there
(including "obj" directories).

Frederick