NetBSD Problem Report #53122
From www@NetBSD.org Fri Mar 23 01:38:02 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id AB9F37A1D7
for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Mar 2018 01:38:02 +0000 (UTC)
Message-Id: <20180323013801.6FFF67A263@mollari.NetBSD.org>
Date: Fri, 23 Mar 2018 01:38:01 +0000 (UTC)
From: dmh@fastmail.com
Reply-To: dmh@fastmail.com
To: gnats-bugs@NetBSD.org
Subject: guide chapter 32 build.sh section does not work
X-Send-Pr-Version: www-1.0
>Number: 53122
>Category: misc
>Synopsis: guide chapter 32 build.sh section does not work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 23 01:40:00 +0000 2018
>Originator: Dexter Haslem
>Release: 7.1.2
>Organization:
>Environment:
NetBSD nb2 7.1.2 NetBSD 7.1.2 (GENERIC.201803151611Z) amd64
>Description:
In the guide
https://www.netbsd.org/docs/guide/en/chap-kernel.html
Section 32.5. 'Building the kernel using build.sh'
does not work as documented.
Here is the error portion from ./build.sh:
$ ./build.sh kernel=MYKERNEL
.. snip ..
cc -O -o nbmake *.o
===> MAKECONF file: /etc/mk.conf (File not found)
ERROR: -U or -E must be set for build as an unprivileged user.
*** BUILD ABORTED ***
If you try the -U flag:
$ ./build.sh -U kernel=MYKERNEL
.. snip ..
cc -O -o nbmake *.o
===> MAKECONF file: /etc/mk.conf (File not found)
BSDOBJDIR /usr/obj does not exist, bailing...
*** Failed target: obj
*** Failed command: cd "/usr/src"; here=`/bin/pwd`/; subdir=${here#/usr/src/}; if [ "$here" != "$subdir" ]; then if [ ! -d /usr/obj ]; then echo "BSDOBJDIR /usr/obj does not exist, bailing..."; exit 1; fi; subdir=${subdir%/}; dest=/usr/obj/$subdir; if [ -x /tooldir.NetBSD-7.1.2-amd64/bin/nbstat ] && ttarg=`/tooldir.NetBSD-7.1.2-amd64/bin/nbstat -qf '%Y' ${here}obj` && [ "$dest" = "$ttarg" ]; then : ; else echo '# ' " objdir $dest"; rm -rf obj; ln -s $dest obj; fi; if [ ! -d $dest ]; then mkdir -p $dest; else true; fi; else true ; dest=${here}obj ; if [ ! -d obj ] || [ -h obj ]; then echo '# ' " objdir $dest"; rm -f obj; mkdir $dest; fi ; fi;
*** Error code 1
Stop.
nbmake: stopped in /usr/src
ERROR: Can't create top level object directory using make obj
*** BUILD ABORTED ***
Running ./build.sh as root has same error
>How-To-Repeat:
with source sets extracted to /usr/src already:
$ cd /usr/src/sys/arch/amd64/conf
$ cp GENERIC MYKERNEL
$ config MYKERNEL
$ cd /usr/src
$ ./build.sh kernel=MYKERNEL
>Fix:
The manual steps not using build.sh work fine
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.