Subject: weirdness related to env variables?
To: None <>
From: Jeff Rizzo <>
List: current-users
Date: 01/17/2004 09:22:24
I've noticed this before, and it's just now bugging me enough to try
and figure it out.

Starting with a freshly downloaded -current source tree, circa
24 hours ago now, I successfully did a
' -U tools build distribution sets'.  It had completed by this
morning, so I decided to build a GENERIC kernel to test some stuff
out, as I haven't played with a really current -current in a few weeks.
So, I do the following:

boogers:riz  /work/netbsd/src> ./ -U kernel=GENERIC releasekernel=GENERIC

... it does the usual "let's rebuild nbmake for the hell of it":

===> command: ./ -U kernel=GENERIC releasekernel=GENERIC
===> started: Sat Jan 17 09:02:42 PST 2004
===> No nonexistent/bin/nbmake, needs building.
===> Bootstrapping nbmake
checking for sh... /bin/sh

Then, when it starts trying to do the real work, it can't find nbconfig:

===> MACHINE:          i386
===> MACHINE_ARCH:     i386
===> TOOLDIR path:     /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386
===> DESTDIR path:     /work/netbsd/src/obj.i386/destdir.i386
===> RELEASEDIR path:  /work/netbsd/src/obj.i386/releasedir
===> Created /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386/bin/nbmake
===> makewrapper:      /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386/bin/nbmake-i386
===> Updated /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386/bin/nbmake-i386
===> Building kernel without building new tools
===> Building kernel:  GENERIC
===> Build directory:  /work/netbsd/src/sys/arch/i386/compile/obj.i386/GENERIC
rm -f a.out [Ee]rrs mklog core *.core .gdbinit 
./ /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386/bin/nbconfig: not found

ERROR: nbconfig failed for GENERIC

Ok, so that's weird... I *just* built tools last night, and had not
yet rebooted so the version of my kernel hasn't changed.  Looks like
there's *two* tooldirs, /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386/
and /work/netbsd/src/tooldir.NetBSD-1.6ZG-i386/ .  The one in "obj.i386"
only has nbmake and nbmake-i386 in it, while the other one appears to
have everything, including "nbconfig".

It looks to me like there's probably some interaction with a few env
variables I started setting quite some time ago (before, anyway):

setenv BSDOBJDIR /usr/obj
# need this for "make obj" to work right
setenv BSDSRCDIR /work/src

OK, so BSDSRCDIR is quite obviously not right.  I no longer understand
exactly why I was setting these, and so should probably unset them,
but as it takes on the order of 20 hours to rebuild the world on this
machine, I was hoping to get some insight as to what the heck I *should*
do from someone who pays more attention than I do.  :)

Should I just nuke all these vars?  Or only some of them?
I like having the machine arch tracked in certain things (like pkgsrc),
which is (I think) why I had OBJMACHINE and USR_OBJMACHINE.  But
I seem to have lost track as to what the "recommended" setup is...

Suggestions gratefully received.


Jeff Rizzo