NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/53122: guide chapter 32 build.sh section does not work



>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



Home | Main Index | Thread Index | Old Index