Subject: NetBSD 3.0 crossbuild failure under Cygwin
To: None <tech-toolchain@netbsd.org>
From: None <rrg2@mesanet.com>
List: tech-toolchain
Date: 01/20/2006 11:53:30
G'day,

     While attempting to build NetBSD 3.0 under
Win2K/CYGWIN_NT-5.0-1.5.18/gcc version 3.4.4 (cygming special) (gdc
0.12, using dmd 0.125), I obtain the following results:

Success: ./build.sh -U -m acorn32 tools >& acorn32_tools-build_log
Success: ./build.sh -U -u -m acorn32 kernel=GENERIC >& acorn32_kernel-build_log
Failure: ./build.sh -U -u -m acorn32 build >& acorn32_build-build_log

     It appears that the build process fails while constructing
libc.so.12.128.2:

[Build commences.]
===> build.sh command: ./build.sh -U -u -m acorn32 build
===> build.sh started: Wed Jan 18 23:38:30 PST 2006
===> No nonexistent/bin/nbmake, needs building.
===> Bootstrapping nbmake
<Snippage>
===> MACHINE:          acorn32
===> MACHINE_ARCH:     arm
===> TOOLDIR path:     /mnt/n/tooldir.CYGWIN_NT-5.0-1.5.18-unknown
===> DESTDIR path:     /mnt/n/destdir.acorn32
===> RELEASEDIR path:  /mnt/n/releasedir
===> Created /mnt/n/tooldir.CYGWIN_NT-5.0-1.5.18-unknown/bin/nbmake
===> makewrapper: 
/mnt/n/tooldir.CYGWIN_NT-5.0-1.5.18-unknown/bin/nbmake-acorn32
===> Updated /mnt/n/tooldir.CYGWIN_NT-5.0-1.5.18-unknown/bin/nbmake-acorn32
Build started at: Wed Jan 18 23:38:59 PST 2006
check-tools ===> .
<Snippage>
#     build  libc/libc.so.12.128.2
rm -f libc.so.12.128.2
/mnt/n/tooldir.CYGWIN_NT-5.0-1.5.18-unknown/bin/arm--netbsdelf-gcc
   -Wl,-nostdlib -B/mnt/n/destdir.acorn32/usr/lib/
   -B/mnt/n/destdir.acorn32/usr/lib/
   -Wl,-rpath-link,/mnt/n/destdir.acorn32/lib:/mnt/n/destdir.acorn32/usr/lib
   -R/lib -L/mnt/n/destdir.acorn32/lib -Wl,-x -shared
   -Wl,-soname,libc.so.12 -o libc.so.12.128.2 -Wl,--whole-archive
   libc_pic.a -Wl,--no-whole-archive -L/mnt/n/destdir.acorn32/usr/lib
libc_pic.a(_Exit.so)(.text+0x0): In function `_Exit':
: multiple definition of `_Exit'
libc_pic.a(_exit.so)(.text+0x0): first defined here
collect2: ld returned 1 exit status

*** Failed target:  libc.so.12.128.2
*** Failed command:
/mnt/n/tooldir.CYGWIN_NT-5.0-1.5.18-unknown/bin/arm--netbsdelf-gcc
   -Wl,-nostdlib -B/mnt/n/destdir.acorn32/usr/lib/
   -B/mnt/n/destdir.acorn32/usr/lib/
   -Wl,-rpath-link,/mnt/n/destdir.acorn32/lib:/mnt/n/destdir.acorn32/usr/lib
   -R/lib -L/mnt/n/destdir.acorn32/lib -Wl,-x -shared
   -Wl,-soname,libc.so.12 -o libc.so.12.128.2 -Wl,--whole-archive
   libc_pic.a -Wl,--no-whole-archive -L/mnt/n/destdir.acorn32/usr/lib
*** Error code 1

Stop.
nbmake: stopped in /mnt/n/lib/libc
<Snippage>
ERROR: Failed to make build
*** BUILD ABORTED ***
[Build terminates.]

    Running build.sh with the same arguments completes successfully under 
Linux/RedHat9, but fails with the same error under OSX 10.3 + XCode 1.2. 
Have I missed something obvious here, or is this a toolchain issue?


     -- Rob