Subject: [long] building tools for -current fails on macppc (1.6.2 as well as 2.99.9 as host)
To: None <current-users@netbsd.org, port-macppc@netbsd.org>
From: =?ISO-8859-1?Q?Timo_Sch=F6ler?= <eclipser23@web.de>
List: port-macppc
Date: 10/26/2004 18:53:36
hi,

on my Power Mac

fulcrum: {10} uname -a
NetBSD fulcrum.ts39-bln.macfinity.net 2.99.9 NetBSD 2.99.9 (GENERIC)  
#0: Tue Oct  5 20:12:38 UTC 2004   
tis@fulcrum.ts39-bln.macfinity.net:/usr/obj/sys/arch/macppc/compile/ 
GENERIC macppc

with

fulcrum: {11} gcc -v
Using built-in specs.
Configured with:  
/home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure  
--enable-long-long --disable-multilib --enable-threads  
--disable-symvers --build=i386-unknown-netbsdelf2.0.  
--host=powerpc--netbsd --target=powerpc--netbsd : (reconfigured)  
/home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure  
--enable-long-long --disable-multilib --enable-threads  
--disable-symvers --build=i386-unknown-netbsdelf2.0.  
--host=powerpc--netbsd --target=powerpc--netbsd
Thread model: posix
gcc version 3.3.3 (NetBSD nb3 20040520)

building netbsd-current fails steadily :(

checked out sources last saturday, tried, failed, updated, tried again,  
failed...

gcc34 from pkgssrc kicks the bucket also.

very interesting:

i just fired up an old P2 (runs 1.6.2), which now cross-builds for my  
mac without any problem?!

(and, yes, it's optimizing for mcpu=740).

my mac fails with 1.6.2 (vanilla) as well as 2.99.9.

any hints? tia!

the log below:

cc -DIN_GCC -DHAVE_CONFIG_H -O -DIN_GCC -DCROSS_COMPILE -W -Wall  
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional  
-pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE  
-DNETBSD_TOOLS  -I. -I..  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc/..   
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc/../config  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc/../../include  -o  
fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o   
gnu-regex.o fixlib.o
fixincl.o(.text+0x8a): In function `main':
: undefined reference to `_sch_istable'
fixincl.o(.text+0x8e): In function `main':
: undefined reference to `_sch_istable'
fixincl.o(.text+0xaa): In function `main':
: undefined reference to `_sch_istable'
fixincl.o(.text+0xae): In function `main':
: undefined reference to `_sch_istable'
fixincl.o(.text+0x162): In function `main':
: undefined reference to `_sch_istable'
fixincl.o(.text+0x166): more undefined references to `_sch_istable'  
follow
fixincl.o(.text+0x228): In function `initialize':
: undefined reference to `xmalloc_set_program_name'
fixincl.o(.text+0x288): In function `initialize':
: undefined reference to `xstrerror'
fixincl.o(.text+0x44a): In function `initialize':
: undefined reference to `_sch_istable'
fixincl.o(.text+0x44e): In function `initialize':
: undefined reference to `_sch_istable'
fixincl.o(.text+0x5f0): In function `load_file':
: undefined reference to `xstrerror'
fixincl.o(.text+0x688): In function `load_file':
: undefined reference to `xstrerror'
fixincl.o(.text+0x908): In function `run_compiles':
: undefined reference to `xmalloc'
fixincl.o(.text+0xb64): In function `create_file':
: undefined reference to `xstrerror'
fixincl.o(.text+0xd76): In function `quoted_file_exists':
: undefined reference to `_sch_istable'
fixincl.o(.text+0xd7a): In function `quoted_file_exists':
: undefined reference to `_sch_istable'
fixincl.o(.text+0x10e0): In function `internal_fix':
: undefined reference to `xstrerror'
fixincl.o(.text+0x1294): In function `start_fixer':
: undefined reference to `xmalloc'
fixincl.o(.text+0x130c): In function `start_fixer':
: undefined reference to `xstrerror'
fixincl.o(.text+0x17e4): In function `process':
: undefined reference to `xstrerror'
fixincl.o(.text+0x191c): In function `process':
: undefined reference to `xstrerror'
fixfixes.o(.text+0x52): In function `emit_gnu_type':
: undefined reference to `_sch_toupper'
fixfixes.o(.text+0x56): In function `emit_gnu_type':
: undefined reference to `_sch_toupper'
fixfixes.o(.text+0x13a): In function `format_write':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0x13e): In function `format_write':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0x4da): In function `char_macro_use_fix':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0x4de): In function `char_macro_use_fix':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0x51e): In function `char_macro_use_fix':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0x522): more undefined references to `_sch_istable'  
follow
fixfixes.o(.text+0xa68): In function `wrap_fix':
: undefined reference to `xmalloc'
fixfixes.o(.text+0xa8e): In function `wrap_fix':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0xa92): In function `wrap_fix':
: undefined reference to `_sch_istable'
fixfixes.o(.text+0xa9a): In function `wrap_fix':
: undefined reference to `_sch_toupper'
fixfixes.o(.text+0xa9e): In function `wrap_fix':
: undefined reference to `_sch_toupper'
server.o(.text+0x44): In function `load_data':
: undefined reference to `xmalloc'
server.o(.text+0xd0): In function `load_data':
: undefined reference to `xrealloc'
server.o(.text+0x12a): In function `load_data':
: undefined reference to `_sch_istable'
server.o(.text+0x12e): In function `load_data':
: undefined reference to `_sch_istable'
server.o(.text+0x13e): In function `load_data':
: undefined reference to `_sch_istable'
server.o(.text+0x142): In function `load_data':
: undefined reference to `_sch_istable'
server.o(.text+0x17c): In function `load_data':
: undefined reference to `xrealloc'
server.o(.text+0x4a4): In function `run_shell':
: undefined reference to `xcalloc'
procopen.o(.text+0x170): In function `chain_open':
: undefined reference to `xstrerror'
gnu-regex.o(.text+0x1226): In function `regex_compile':
: undefined reference to `_sch_istable'
gnu-regex.o(.text+0x122a): In function `regex_compile':
: undefined reference to `_sch_istable'
gnu-regex.o(.text+0x1c82): In function `regex_compile':
: undefined reference to `_sch_istable'
gnu-regex.o(.text+0x1c86): In function `regex_compile':
: undefined reference to `_sch_istable'
gnu-regex.o(.text+0x1c9a): In function `regex_compile':
: undefined reference to `_sch_istable'
gnu-regex.o(.text+0x1c9e): more undefined references to `_sch_istable'  
follow
gnu-regex.o(.text+0x6046): In function `regcomp':
: undefined reference to `_sch_tolower'
gnu-regex.o(.text+0x604a): In function `regcomp':
: undefined reference to `_sch_tolower'
fixlib.o(.text+0x50): In function `load_file_data':
: undefined reference to `xrealloc'
fixlib.o(.text+0x9c): In function `load_file_data':
: undefined reference to `xstrerror'
fixlib.o(.text+0xec): In function `load_file_data':
: undefined reference to `xrealloc'

*** Failed target:  full-stamp
*** Failed command: cc -DIN_GCC -DHAVE_CONFIG_H -O -DIN_GCC  
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes  
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  
-DHAVE_CONFIG_H -DGENERATOR_FILE -DNETBSD_TOOLS -I. -I..  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc/..  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc/../config  
-I/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc/../../include -o  
fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o gnu-regex.o  
fixlib.o
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/tools/gcc/build/gcc/fixinc

*** Failed target:  fixinc.sh
*** Failed command: (SHELL="/bin/sh"; MAKE="/usr/not_X/bin/nbmake -f  
/usr/src/tools/gcc/../Makefile.gnuwrap"; srcdir=`cd  
/usr/src/tools/gcc/../../gnu/dist/gcc/gcc/fixinc && ${PWDCMD-pwd}` ;  
CC="cc"; CFLAGS=" -O -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings  
-Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic  
-Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE"; LDFLAGS="";  
WARN_CFLAGS="-W -Wall -Wwrite-strings -Wstrict-prototypes  
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long ";  
LIBERTY=`pwd`/"../libiberty/libiberty.a"; export SHELL MAKE srcdir CC  
CFLAGS LDFLAGS WARN_CFLAGS LIBERTY; cd ./fixinc && /bin/sh  
${srcdir}/mkfixinc.sh powerpc-unknown-netbsd2.99.9 powerpc--netbsd)
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/tools/gcc/build/gcc

*** Failed target:  install-gcc
*** Failed command: if [ -f ./gcc/Makefile ] ; then r=`${PWDCMD-pwd}`;  
export r; s=`cd /usr/src/tools/gcc/../../gnu/dist/gcc; ${PWDCMD-pwd}`;  
export s; (cd gcc; /usr/not_X/bin/nbmake -f  
/usr/src/tools/gcc/../Makefile.gnuwrap "AR_FLAGS=rc" "AR_FOR_TARGET=`  
if [ -f $r/binutils/ar ] ; then echo $r/binutils/ar ; else if [  
'powerpc-unknown-netbsd2.99.9' = 'powerpc--netbsd' ] ; then echo ar;  
else t='-e s,^,powerpc--netbsd-,'; echo ar | sed -e 's/x/x/' $t ; fi;  
fi`" "AS_FOR_TARGET=` if [ -f $r/gas/as-new ] ; then echo $r/gas/as-new  
; elif [ -f $r/gcc/xgcc ]; then $r/gcc/xgcc -B$r/gcc/  
-B/usr/not_X/powerpc--netbsd/bin/ -B/usr/not_X/powerpc--netbsd/lib/  
-isystem /usr/not_X/powerpc--netbsd/include -print-prog-name=as ; else  
if [ 'powerpc-unknown-netbsd2.99.9' = 'powerpc--netbsd' ] ; then echo  
as; else t='-e s,^,powerpc--netbsd-,'; echo as | sed -e 's/x/x/' $t ;  
fi; fi`" "BISON=true" "CC_FOR_BUILD=cc" "CC_FOR_TARGET= $r/gcc/xgcc  
-B$r/gcc/ -B/usr/not_X/powerpc--netbsd/bin/  
-B/usr/not_X/powerpc--netbsd/lib/ -isystem  
/usr/not_X/powerpc--netbsd/include" "CFLAGS=-O" "CFLAGS_FOR_TARGET=-O2  
-O" "GCJ_FOR_TARGET= $r/gcc/gcj -B$r/gcc/  
-B/usr/not_X/powerpc--netbsd/bin/ -B/usr/not_X/powerpc--netbsd/lib/  
-isystem /usr/not_X/powerpc--netbsd/include" "CXX_FOR_BUILD=c++"  
"CXXFLAGS=-O" "CXXFLAGS_FOR_TARGET=-O" "CXX_FOR_TARGET= $r/gcc/`case  
$dir in libstdc++-v3 | libjava) echo xgcc -shared-libgcc ;; *) echo g++  
;; esac` -B$r/gcc/ -nostdinc++ `case $dir in libstdc++-v3 | libjava) ;;  
*) test ! -f $r/powerpc--netbsd/libstdc++-v3/testsuite_flags || /bin/sh  
$r/powerpc--netbsd/libstdc++-v3/testsuite_flags --build-includes;;  
esac` -L$r/powerpc--netbsd/libstdc++-v3/src  
-L$r/powerpc--netbsd/libstdc++-v3/src/.libs  
-B/usr/not_X/powerpc--netbsd/bin/ -B/usr/not_X/powerpc--netbsd/lib/  
-isystem /usr/not_X/powerpc--netbsd/include" "DESTDIR="  
"DLLTOOL_FOR_TARGET=` if [ -f $r/binutils/dlltool ] ; then echo  
$r/binutils/dlltool ; else if [ 'powerpc-unknown-netbsd2.99.9' =  
'powerpc--netbsd' ] ; then echo dlltool; else t='-e  
s,^,powerpc--netbsd-,'; echo dlltool | sed -e 's/x/x/' $t ; fi; fi`"  
"INSTALL=/usr/not_X/bin/nbinstall -c -r"  
"INSTALL_DATA=/usr/not_X/bin/nbinstall -c -r -m 644"  
"INSTALL_PROGRAM=/usr/not_X/bin/nbinstall -c -r "  
"INSTALL_SCRIPT=/usr/not_X/bin/nbinstall -c -r" "LDFLAGS=" "LEX=`if [  
-f $r/flex/flex ] ; then echo $r/flex/flex ; else echo flex ; fi`"  
"LD_FOR_TARGET=` if [ -f $r/ld/ld-new ] ; then echo $r/ld/ld-new ; elif  
[ -f $r/gcc/xgcc ]; then $r/gcc/xgcc -B$r/gcc/  
-B/usr/not_X/powerpc--netbsd/bin/ -B/usr/not_X/powerpc--netbsd/lib/  
-isystem /usr/not_X/powerpc--netbsd/include -print-prog-name=ld ; else  
if [ 'powerpc-unknown-netbsd2.99.9' = 'powerpc--netbsd' ] ; then echo  
ld; else t='-e s,^,powerpc--netbsd-,'; echo ld | sed -e 's/x/x/' $t ;  
fi; fi`" "LIBCFLAGS=-O" "LIBCFLAGS_FOR_TARGET=-O2 -O" "LIBCXXFLAGS=-O  
-fno-implicit-templates" "LIBCXXFLAGS_FOR_TARGET=-O  
-fno-implicit-templates" "M4=`if [ -f $r/m4/m4 ] ; then echo $r/m4/m4 ;  
else echo m4 ; fi`" "MAKE=/usr/not_X/bin/nbmake -f  
/usr/src/tools/gcc/../Makefile.gnuwrap"  
"MAKEINFO=/usr/not_X/bin/nbmakeinfo --no-split" "NM_FOR_TARGET=` if [  
-f $r/binutils/nm-new ] ; then echo $r/binutils/nm-new ; elif [ -f  
$r/gcc/xgcc ]; then $r/gcc/xgcc -B$r/gcc/  
-B/usr/not_X/powerpc--netbsd/bin/ -B/usr/not_X/powerpc--netbsd/lib/  
-isystem /usr/not_X/powerpc--netbsd/include -print-prog-name=nm ; else  
if [ 'powerpc-unknown-netbsd2.99.9' = 'powerpc--netbsd' ] ; then echo  
nm; else t='-e s,^,powerpc--netbsd-,'; echo nm | sed -e 's/x/x/' $t ;  
fi; fi`" "RANLIB_FOR_TARGET=` if [ -f $r/binutils/ranlib ] ; then echo  
$r/binutils/ranlib ; else if [ 'powerpc-unknown-netbsd2.99.9' =  
'powerpc--netbsd' ] ; then if [ x'ranlib' != x ]; then echo ranlib;  
else echo ranlib; fi; else t='-e s,^,powerpc--netbsd-,'; echo ranlib |  
sed -e 's/x/x/' $t ; fi; fi`" "RPATH_ENVVAR=LD_LIBRARY_PATH"  
"SHELL=/bin/sh" "EXPECT=`if [ -f $r/expect/expect ] ; then echo  
$r/expect/expect ; else echo expect ; fi`" "RUNTEST=`if [ -f  
$s/dejagnu/runtest ] ; then echo $s/dejagnu/runtest ; else echo runtest  
; fi`" "RUNTESTFLAGS=" "TARGET_SUBDIR=powerpc--netbsd"  
"WINDRES_FOR_TARGET=` if [ -f $r/binutils/windres ] ; then echo  
$r/binutils/windres ; else if [ 'powerpc-unknown-netbsd2.99.9' =  
'powerpc--netbsd' ] ; then echo windres; else t='-e  
s,^,powerpc--netbsd-,'; echo windres | sed -e 's/x/x/' $t ; fi; fi`"  
"YACC=`if [ -f $r/bison/bison ] ; then echo $r/bison/bison -y -L  
$s/bison/ ; elif [ -f $r/byacc/byacc ] ; then echo $r/byacc/byacc ;  
else echo yacc ; fi`" "bindir=/usr/not_X/bin"  
"datadir=/usr/not_X/share" "exec_prefix=/usr/not_X"  
"includedir=/usr/not_X/include" "infodir=/usr/not_X/info"  
"libdir=/usr/not_X/lib" "libexecdir=/usr/not_X/libexec" "lispdir="  
"libstdcxx_incdir="  
"libsubdir=/usr/not_X/lib/gcc-lib/powerpc--netbsd/3.3.3"  
"localstatedir=/usr/not_X/var" "mandir=/usr/not_X/man"  
"oldincludedir=/usr/include" "prefix=/usr/not_X"  
"sbindir=/usr/not_X/sbin" "sharedstatedir=/usr/not_X/com"  
"sysconfdir=/usr/not_X/etc" "tooldir=/usr/not_X/powerpc--netbsd"  
"build_tooldir=/usr/not_X/powerpc--netbsd"  
"gxx_include_dir=/usr/not_X/include/c++/3.3.3" "gcc_version=3.3.3"  
"gcc_version_trigger=/usr/src/gnu/dist/gcc/gcc/version.c"  
"target_alias=powerpc--netbsd" 'AR=ar' 'AS=as' 'CC=cc' 'CXX=c++'  
'DLLTOOL=$(DLLTOOL_FOR_TARGET)' 'HOST_CC=cc' 'BUILD_PREFIX='  
'BUILD_PREFIX_1=loser-' 'NM=nm' "`echo 'RANLIB=ranlib' | sed -e  
s/.*=$/XFOO=/`" 'WINDRES=$(WINDRES_FOR_TARGET)' "GCC_FOR_TARGET=  
$r/gcc/xgcc -B$r/gcc/ -B/usr/not_X/powerpc--netbsd/bin/  
-B/usr/not_X/powerpc--netbsd/lib/ -isystem  
/usr/not_X/powerpc--netbsd/include" "CFLAGS_FOR_BUILD=-O" "`echo  
'LANGUAGES=' | sed -e s/.*=$/XFOO=/`" "`echo 'STMP_FIXPROTO=' | sed -e  
s/.*=$/XFOO=/`" "`echo 'LIMITS_H_TEST=' | sed -e s/.*=$/XFOO=/`" "`echo  
'LIBGCC2_CFLAGS=' | sed -e s/.*=$/XFOO=/`" "`echo  
'LIBGCC2_DEBUG_CFLAGS=' | sed -e s/.*=$/XFOO=/`" "`echo  
'LIBGCC2_INCLUDES=' | sed -e s/.*=$/XFOO=/`" "`echo 'ENQUIRE=' | sed -e  
s/.*=$/XFOO=/`" "`echo 'STAGE1_CFLAGS=' | sed -e s/.*=$/XFOO=/`" "`echo  
'BOOT_CFLAGS=' | sed -e s/.*=$/XFOO=/`" install); else true; fi
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/tools/gcc/build

*** Failed target:  .install_done
*** Failed command: (cd /usr/obj/tools/gcc/build &&  
/usr/not_X/bin/nbmake -f /usr/src/tools/gcc/../Makefile.gnuwrap  
MACHINE= MAKEINFO=/usr/not_X/bin/nbmakeinfo LIBGCC= LIBGCC1=  
LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= EXTRA_PARTS=  
CPPFLAGS=-DNETBSD_TOOLS BISON=true DESTDIR=  
INSTALL=/usr/not_X/bin/nbinstall\ -c\ \ -r install-gcc)
*** Error code 1

Stop.
nbmake: stopped in /usr/src/tools/gcc

*** Failed target:  install-gcc
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1";  
shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .)  
this=""; real="/usr/src/tools" ;; *) this="${dir}/";  
real="/usr/src/tools/${dir}" ;; esac; show=${this:-.}; echo "${target}  
===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/not_X/bin/nbmake  
_THISDIR_="${this}" "$@" ${target}; }; _makedirtarget gcc install
*** Error code 1

Stop.
nbmake: stopped in /usr/src/tools

ERROR: Failed to make tools
*** BUILD ABORTED ***

-- 
:x!

timo