Subject: Re: build.sh weirdness related to env variables?
To: Jeff Rizzo <firstname.lastname@example.org>
From: Hernani Marques Madeira <email@example.com>
Date: 01/17/2004 18:42:27
> 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
> 'build.sh -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> ./build.sh -U kernel=GENERIC releasekernel=GENERIC
> ... it does the usual "let's rebuild nbmake for the hell of it":
> ===> build.sh command: ./build.sh -U kernel=GENERIC releasekernel=GENERIC
> ===> build.sh 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
> ./build.sh: /work/netbsd/src/obj.i386/tooldir.NetBSD-1.6ZG-i386/bin/nbconfig: not found
> ERROR: nbconfig failed for GENERIC
> *** BUILD ABORTED ***
However, if you give build.sh the parameter -T tooldir.NetBSD-1.6ZG-i386
it should work...
> It looks to me like there's probably some interaction with a few env
> variables I started setting quite some time ago (before build.sh, anyway):
> setenv OBJMACHINE
> setenv USR_OBJMACHINE
> 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 only have OBJMACHINE=YES in /etc/mk.conf, but it happens to me too.