Subject: bin/36678: crossbuild of -current and netbsd-4 fails on OS/X
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <giles.lean@pobox.com>
List: netbsd-bugs
Date: 07/23/2007 00:55:00
>Number: 36678
>Category: bin
>Synopsis: crossbuild of -current and netbsd-4 fails on OS/X
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 23 00:55:00 +0000 2007
>Originator: Giles Lean
>Release: NetBSD 4.0_BETA2 (and -current, sources from July 22nd 2007)
>Organization:
>Environment:
Darwin citrine.netherstone.net 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc
Host gcc version:
$ gcc --version
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5250)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>Description:
On OS/X builds for i386 are failing in both the -current and netbsd-4
branches
>How-To-Repeat:
===> build.sh command: ./build.sh -U -u -m i386 release iso-image
===> build.sh started: Mon Jul 23 10:23:55 EST 2007
===> NetBSD version: 4.99.25
===> MACHINE: i386
===> MACHINE_ARCH: i386
===> Build platform: Darwin 8.10.0 Power Macintosh
...
# link binstall/xinstall
cc -O -no-cpp-precomp -I/Users/giles/NetBSD/netbsd-current/src/../obj/tools/compat -I/Users/giles/NetBSD/netbsd-current/src/../obj/tools/compat/include -I/Users/giles/NetBSD/netbsd-current/src/tools/binstall/../compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I/Users/giles/NetBSD/netbsd-current/src/tools/binstall/../compat/sys -DTARGET_STRIP=\"/Users/giles/NetBSD/netbsd-current/src/../obj/tooldir.Darwin-8.10.0-powerpc/bin/i386--netbsdelf-strip\" -I/Users/giles/NetBSD/netbsd-current/src/usr.sbin/mtree -o xinstall xinstall.lo getid.lo -L/Users/giles/NetBSD/netbsd-current/src/../obj/tools/compat -lnbcompat -lz
/usr/bin/ld: Undefined symbols:
_le32dec
collect2: ld returned 1 exit status
>Fix:
A build on NetBSD itself is OK.
Adding le32dec() and friends from <sys/endian.h> to
src/tools/compat/compat_defs.h lets the build proceed.
Patch not provided because:
a) I'm not confident this is the "right" fix
b) if it is the right fix, it's simple cut & paste
Giles
>Unformatted: