Subject: Build NetBSD 4.0 kernel?
To: current-users NetBSD <current-users@NetBSD.org>
From: Glen Johnson <gjohnson@valcom.com>
List: current-users
Date: 01/17/2007 10:25:09
Good day,
I am trying to compile the latest NetBSD 4.0 kernel in an attempt to do
a little testing.  According to
http://netbsd.org/Documentation/current/#downloading.


      Note

It is almost always faster for a first-time "whole source" checkout to
FTP the tarballs <http://netbsd.org/Documentation/current/#downloading>
and untar them locally because that makes best use of the network link.
After that, using cvs checkout/update works to minimize the number of
bytes coming over by sending only the changes.

I decided to take this advise and use sup at the same time.  So I used
sup to download the latest release-4-0 tar files.  Below is the sup file
I used.
release-4-0 release=tar_files host=sup.NetBSD.org hostbase=/ftp/pub \
base=./ prefix=./ backup use-rel-suffix compress

This worked wonderfully!  I then un-tarred the files, did chmod +x
build.sh, and executed ./build.sh tools.  After some processing the
tools build died.  Below is part of that output.


#      link  tsort/tsort
cc -O -I/home/glen/src/c/netbsd/tars/src/tools/compat/obj
-I/home/glen/src/c/netbsd/tars/src/tools/compat/obj/include 
-I/home/glen/src/c/netbsd/tars/src/tools/tsort/../compat
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64    -o tsort tsort.lo
-L/home/glen/src/c/netbsd/tars/src/tools/compat/obj -lnbcompat -lz
dependall ===> uudecode
#    create  uudecode/uudecode.d
/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbhost-mkdep
-f uudecode.d --     -I/home/glen/src/c/netbsd/tars/src/tools/compat/obj
-I/home/glen/src/c/netbsd/tars/src/tools/compat/obj/include 
-I/home/glen/src/c/netbsd/tars/src/tools/uudecode/../compat
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64  
/home/glen/src/c/netbsd/tars/src/tools/uudecode/../../usr.bin/uudecode/uudecode.c
#    create  uudecode/.depend
rm -f .depend
/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbhost-mkdep
-d -f .depend -s .lo\ .ln uudecode.d
#   compile  uudecode/uudecode.lo
cc -O -I/home/glen/src/c/netbsd/tars/src/tools/compat/obj
-I/home/glen/src/c/netbsd/tars/src/tools/compat/obj/include 
-I/home/glen/src/c/netbsd/tars/src/tools/uudecode/../compat
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64  -c -o uudecode.lo.o   
/home/glen/src/c/netbsd/tars/src/usr.bin/uudecode/uudecode.c
mv uudecode.lo.o uudecode.lo
#      link  uudecode/uudecode
cc -O -I/home/glen/src/c/netbsd/tars/src/tools/compat/obj
-I/home/glen/src/c/netbsd/tars/src/tools/compat/obj/include 
-I/home/glen/src/c/netbsd/tars/src/tools/uudecode/../compat
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64    -o uudecode
uudecode.lo -L/home/glen/src/c/netbsd/tars/src/tools/compat/obj
-lnbcompat -lz
dependall ===> texinfo
/home/glen/src/c/netbsd/tars/src/tools/texinfo/../../gnu/dist/texinfo/configure:
1: Syntax error: ")" unexpected

*** Failed target:  .configure_done
*** Failed command: (cd build && CC=cc CFLAGS=-O CPPFLAGS= CXX=c++
CXXFLAGS=-O
INSTALL=/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbinstall\
-c\ \ -r LDFLAGS= AR=ar RANLIB=ranlib
LEX=/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nblex
MAKE=/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbmake
PATH="/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin:$PATH"
YACC=/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbyacc
sh
/home/glen/src/c/netbsd/tars/src/tools/texinfo/../../gnu/dist/texinfo/configure
--program-prefix=nb
--prefix=/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386)
*** Error code 2

Stop.
nbmake: stopped in /home/glen/src/c/netbsd/tars/src/tools/texinfo

*** Failed target:  dependall
*** Failed command: cd /home/glen/src/c/netbsd/tars/src/tools/texinfo;
/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbmake realall
*** Error code 1

Stop.
nbmake: stopped in /home/glen/src/c/netbsd/tars/src/tools/texinfo

*** Failed target:  dependall-texinfo
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1";
shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="";
real="/home/glen/src/c/netbsd/tars/src/tools" ;; *) this="${dir}/";
real="/home/glen/src/c/netbsd/tars/src/tools/${dir}" ;; esac;
show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd
"${real}" &&
/home/glen/src/c/netbsd/tars/src/tooldir.NetBSD-3.1-i386/bin/nbmake
_THISDIR_="${this}" "$@" ${target}; }; _makedirtarget texinfo dependall
*** Error code 1

Stop.
nbmake: stopped in /home/glen/src/c/netbsd/tars/src/tools

ERROR: Failed to make dependall tools
*** BUILD ABORTED ***

Any pointers? 
Am I still not downloading something that I need in the source somewhere? 
Or is this one of those cases where you just don't do it that way?

I would like to compile this kernel and do some testing on it too.  I
know any time testing is done by someone else they do it a little bit
different, which is where many times bugs turn up.

Thank you,
Glen Johnson