Subject: toolchain/19997: fails on a Linux host (sunlabel compile fails)
To: None <>
From: Richard Earnshaw <>
List: netbsd-bugs
Date: 01/22/2003 15:44:41
>Number:         19997
>Category:       toolchain
>Synopsis: fails on a Linux host (sunlabel compile fails)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 22 07:45:01 PST 2003
>Originator:     Richard Earnshaw
>Release:        NetBSD-current
System: Redhat 7.2 x86
Target: NetBSD 1.6K NetBSD 1.6K (GENERIC) #0: Sun Dec 1 17:52:23 GMT 2002 shark
Target-Architecture: arm
Target-Machine: shark
	The file BUILDING says that should build the system on any
	host that has a POSIX compatible /bin/sh.  However, building the
	cross-tool version of sunlabel fails because it includes a 
	NetBSD-specific header file.

	Also, having failed to build sunlabel, the script fails to terminate,
	so the error remains undetected until much later in the build process.

	The precise error is:

  dependall ===> sunlabel
  --- .depend ---
  /work/rearnsha/netbsd/build/tools/shark/bin/nbhost-mkdep -a -DDISTRIB -I/work/rearnsha/netbsd/build/src/shark/tools/compat -I/work/rearnsha/netbsd/build/src/shark/tools/compat/include  -I/work/rearnsha/netbsd/src/tools/sunlabel/../compat -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  /work/rearnsha/netbsd/src/tools/sunlabel/../../usr.sbin/sunlabel/sunlabel.c
  /work/rearnsha/netbsd/src/tools/sunlabel/../../usr.sbin/sunlabel/sunlabel.c:54:27: sys/disklabel.h: No such file or directory
  --- afterdepend ---
  --- dependall ---
  --- sunlabel.lo ---
  cc -O -DDISTRIB -I/work/rearnsha/netbsd/build/src/shark/tools/compat -I/work/rearnsha/netbsd/build/src/shark/tools/compat/include  -I/work/rearnsha/netbsd/src/tools/sunlabel/../compat -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -c -o sunlabel.lo.o /work/rearnsha/netbsd/src/tools/sunlabel/../../usr.sbin/sunlabel/sunlabel.c
  /work/rearnsha/netbsd/src/tools/sunlabel/../../usr.sbin/sunlabel/sunlabel.c:54:27: sys/disklabel.h: No such file or directory
  *** [sunlabel.lo] Error code 1
  1 error

  nbmake: stopped in /work/rearnsha/netbsd/src/tools/sunlabel
  *** [dependall] Error code 2
	Run on a linux machine to build (the following script may

#! /bin/sh

if [ $# != 1 ] ; then
        echo "usage $0 <evbarm|shark>"
        exit 1

build=`date +%Y%m%d`
cd /work/rearnsha/netbsd

echo "Deleting old build"
rm -rf build/{dist,install,src,tools}/${target}/*

echo "Saving old log"
mv -f build/log/${target}.log build/log/${target}.log.old

cd src

echo "Starting build"
time nice -5 ./ -a arm -B rearnsha-${build} -j 2 -m $target -D /work/rearnsha/netbsd/build/install/$target -O /work/rearnsha/netbsd/build/src/$target -R /work/rearnsha/netbsd/build/dist/$target -T /work/rearnsha/netbsd/build/tools/$target -U > /work/rearnsha/netbsd/build/log/${target}.log 2>&1
if [ $x = 0 ]; then
  echo "Build complete"
  echo "Build failed"
exit $x