Subject: bin/32573: [dM] build.sh fails gratuitously
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 01/19/2006 16:55:00
>Number: 32573
>Category: bin
>Synopsis: build.sh fails when run naively
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 19 16:55:00 +0000 2006
>Originator: der Mouse
>Release: NetBSD 3.0
>Organization:
Dis-
>Environment:
I see nothing which seems likely to be relevant; the system is
3.0 straight out of the box.
Architecture: i386
Machine: i386
>Description:
build.sh, when run naively in an attempt to build a new kernel
on a fresh system, fails. Since it is the documented way to
build kernels now, I believe that it should deal with creating
whatever is necessary to work when run without special options
out of the box, which is why I've classed this as sw-bug. If
this really is the desired behaviour, this should be
reclassified as a doc-bug; at the very least the kernel=
operation in BUILDING should mention that it won't work unless
/usr/obj is manually created first, and it should be emphasized
that "tools" is not optional (BUILDING implies that it is, when
the installed tools match the source).
>How-To-Repeat:
Install a new system. Install the sources from the source .tgz
files. Then, as root,
# cd /usr/src
# sh build.sh kernel=GENERIC
...it rebuilds make...
cc -O -o nbmake *.o
BSDOBJDIR /usr/obj does not exist, bailing...
*** Failed target: obj
*** Failed command: cd /usr/src/tools; ...very long line...
*** Error code 1
Stop.
nbmake: stopped in /usr/src/tools
ERROR: Failed to make obj in tools
*** BUILD ABORTED ***
# mkdir /usr/obj
# sh build.sh kernel=GENERIC
...it rebuilds make again(!)...
===> MACHINE: i386
===> MACHINE_ARCH: i386
===> TOOLDIR path: /usr/src/tooldir.NetBSD-3.0-i386
===> DESTDIR path: /usr/src/destdir.i386
===> RELEASEDIR path: /usr/src/releasedir
===> Created /usr/src/tooldir.NetBSD-3.0-i386/bin/nbmake
===> makewrapper: /usr/src/tooldir.NetBSD-3.0-i386/bin/nbmake-i386
===> Updated /usr/src/tooldir.NetBSD-3.0-i386/bin/nbmake-i386
===> Building kernel without building new tools
# objdir /usr/obj/sys/arch/i386/compile
===> Building kernel: GENERIC
===> Build directory: /usr/src/sys/arch/i386/compile/obj/GENERIC
rm -f a.out [Ee]rrs mklog core *.core .gdbinit
build.sh: /usr/src/tooldir.NetBSD-3.0-i386/bin/nbconfig: not found
ERROR: nbconfig failed for GENERIC
*** BUILD ABORTED ***
#
>Fix:
Dunno. As a workaround, I created /usr/obj manually and told
build.sh to do "tools" (which, in passing, is extremely
wasteful, as it builds a lot of junk - slow-to-buid junk - that
is totally unnecessary for building a kernel).
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B