Subject: build woes
To: None <current-users@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 10/28/2002 16:27:21
I've just updated to 'current' and unfortunately the builf is failing.
Something must have changed because this has all worked many times before.

I use the following script (not all of which is probably required):

#!/bin/sh
exec 2>&1
base=`(cd ..;/bin/pwd)`
DESTDIR=$base/dest
RELEASEDIR=$base/release
objdir=$base/obj
export DESTDIR RELEASEDIR
build.sh -d -u -U -D $DESTDIR -O $objdir "$@"

usually invoked as 'build | tee log'

The first fail was missing 'string_to_flags' when linking xinstall.
Some makefile 'magic' is involved in picking this up...

I then did 'rm -rf $obj/tools' and reran build.sh.
This time it didn't recreate $obj/tools and started dumping all the
object files in the source directory tree.

Cleaned up...
Created $obj/tools by hand and tried again
This time the link of xinstall fails because -lnbcompat cannot be found.
A little digging shows that it exists in the $src tree instead of the
$obj one!

The relevant bit of the log goes:
cc -O  -I. -I./include -I/oldroot/usr/bsd-current/src/tools/compat -DHAVE_CONFIG
_H  -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o rec_utils.lo.o /oldroot
/usr/bsd-current/src/tools/compat/../../lib/libc/db/recno/rec_utils.c
mv rec_utils.lo.o rec_utils.lo
rm -f /oldroot/usr/bsd-current/src/tools/compat/libnbcompat.a
ar cq /oldroot/usr/bsd-current/src/tools/compat/libnbcompat.a basename.lo ...

The .lo files are all in $obj, but for some reason the .a file
is put in the source tree.

With an empty 'tools' I also got the following:
obj ===> usr.bin/vacation
obj ===> usr.bin/vgrind
/oldroot/usr/bsd-current/obj/tools/tools.NetBSD-1.6I-i386/bin/i386--netbsdelf-gcc: not found
nbmake: "/oldroot/usr/bsd-current/src/share/mk/bsd.endian.mk" line 11: warning:
Couldn't read shell's output for "printf '#include <sys/endian.h>\n_BYTE_ORDER\n
' |  /oldroot/usr/bsd-current/obj/tools/tools.NetBSD-1.6I-i386/bin/i386--netbsde
lf-gcc -nostdinc -isystem /oldroot/usr/bsd-current/dest/usr/include -E - |  tail
 -1 | awk '{print $1}'"
obj ===> usr.bin/vi
obj ===> usr.bin/vi/catalog

	David

-- 
David Laight: david@l8s.co.uk