Subject: How to build new toolchain under 1.5?
To: None <netbsd-help@netbsd.org>
From: Christopher W. Richardson <cwr@nexthop.com>
List: netbsd-help
Date: 01/19/2005 12:22:53
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
For various and sundry reasons, I've decided that it's time for
me to upgrade one of my old i386 1.5.4_ALPHA servers to the shiny-new
NetBSD 2.0.
To that end, I checked out the source tree for
netbsd-2-0-1-RELEASE (into /usr/src-2.0), created a new (and
therefore empty) /usr/tools-2.0 and /usr/obj-2.0, and went to
town with:
./build.sh -O ../obj-2.0 -T ../tools-2.0 -U tools
Figuring that this would bootstrap the new tool chain, and I'd be
good to go. Alas, 'twas not the case. The build failed with
# compile binstall/getid.lo
cc -O -I/usr/src-2.0/../obj-2.0/tools/compat -I/usr/src-2.0/../obj-2.0/tools/compat/include -I/usr/src-2.0/tools/binstall/../compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I/usr/src-2.0/bin/ls -I/usr/src-2.0/usr.sbin/mtree -c -o getid.lo.o /usr/src-2.0/usr.sbin/mtree/getid.c
In file included from /usr/src-2.0/usr.sbin/mtree/extern.h:47,
from /usr/src-2.0/usr.sbin/mtree/getid.c:85:
/usr/include/netdb.h:237: conflicting types for `socklen_t'
/usr/src-2.0/tools/binstall/../compat/compat_defs.h:131: previous declaration of `socklen_t'
*** Failed target: getid.lo
*** Failed command: cc -O -I/usr/src-2.0/../obj-2.0/tools/compat
*** -I/usr/src-2.0/../obj-2.0/tools/compat/include
*** -I/usr/src-2.0/tools/binstall/../compat
*** -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
*** -I/usr/src-2.0/bin/ls -I/usr/src-2.0/usr.sbin/mtree -c -o
*** getid.lo.o /usr/src-2.0/usr.sbin/mtree/getid.c
*** Error code 1
[recursing failures elided, but I can post them if useful]
ERROR: Failed to make tools
*** BUILD ABORTED ***
This closest relevant things I could find were
a) several references to the need to rebuild mtree in
UPDATING, bug, isn't that what's failing here? and
b) another breakage in building of binstall (though not
at exactly the same point) which was discussed here
http://mail-index.netbsd.org/current-users/2004/07/18/0008.html
but for which the solution seemed to be "remove your
old obj dirs"
I've confirmed that I don't have any old obj dirs lying around.
Reverting back to the "old" build method was my last ditch
effort, and the "standard" stuff there like doing "make includes"
and "cd share/mk && make install" fail in various other exciting
ways. I could just remove the offending /usr/include/netdb.h,
but, that seems imprudent; and, shouldn't building the toolchain not
pull that in from the base system anyhow? I'm most open to any
suggestions.
TIA,
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>
iD8DBQFB7pFZP65RBOOHTzERAoa+AKCk8X7YV3ng+pmyJYzzzCciKgnO5ACfYwjX
bdtrKqjorTCo/mzrZSmmvwM=
=pdGS
-----END PGP SIGNATURE-----