Subject: Re: Building netbsd-3 on Current fails
To: None <current-users@netbsd.org>
From: Mark Weinem <mark.weinem@onlinehome.de>
List: current-users
Date: 07/25/2006 16:46:36
--Boundary-00=_M7ixEhbqivGw85v
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Bill Studenmund:

> Unfortunately the important part was just above the text you posted,
> where the compiler said what was wrong. Everything else is just a
> sequence of Makefiles complaining about what was wrong.
>
> Off the top of my head, I expect the problem is that you're using gcc4
> which dislikes the old gas source. I ran into this, but I've forgotten
> how I hacked around it.

Hi Bill,

Many thanks for your reply! 

Do you mean these lines?

./build.sh -O ../obj -T ../tools -U -u tools
[...]
cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I../bfd 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/.. 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../intl -I../intl -DLOCALEDIR="\"/usr/src/../tools/share/locale\""    
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c
In file included 
from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:94,
                 
from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include/getopt.h:116:warning:function 
declaration isn't a prototype 

In file included from ./targ-cpu.h:1, 
from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/obj-elf.h:42,
	from ./obj-format.h:1,             
from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/te-nbsd.h:24,
                 from ./targ-env.h:1,          
from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:626,               
from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/tc-i386.h:451: 
error: array type has incomplete element type
--------

Greetings, Mark


--Boundary-00=_M7ixEhbqivGw85v
Content-Type: text/plain;
  charset="iso-8859-6";
  name="error.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="error.txt"

cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I../bfd 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/.. 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../intl -I../intl -DLOCALEDIR="\"/usr/src/../tools/share/locale\""    
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c
In file included from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:94,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include/getopt.h:116: warning: function declaration isn't a prototype
In file included from ./targ-cpu.h:1,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/obj-elf.h:42,
                 from ./obj-format.h:1,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/te-nbsd.h:24,
                 from ./targ-env.h:1,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:626,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/tc-i386.h:451: error: array type has incomplete element type

*** Failed target:  app.o
*** Failed command: cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I../bfd 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/.. 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../intl -I../intl -DLOCALEDIR="\"/usr/src/../tools/share/locale\"" 
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c
*** Error code 1

Stop.
configure: creating ./config.status
config.status: creating .gdbinit
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
/usr/src/../tools/bin/nbmake  -f /usr/src/tools/binutils/../Makefile.gnuwrap  all-recursive
Making all in doc
NOT REBUILDING asconfig.texi
NOT REBUILDING /usr/src/tools/binutils/../../gnu/dist/binutils/gas/doc/gasver.texi
NOT REBUILDING /usr/src/tools/binutils/../../gnu/dist/binutils/gas/doc/as.1
Making all in po
cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I../bfd 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/.. 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../intl -I../intl -DLOCALEDIR="\"/usr/src/../tools/share/locale\""    
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c
In file included from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:94,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include/getopt.h:116: warning: function declaration isn't a prototype
In file included from ./targ-cpu.h:1,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/obj-elf.h:42,
                 from ./obj-format.h:1,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/te-nbsd.h:24,
                 from ./targ-env.h:1,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:626,
                 from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/tc-i386.h:451: error: array type has incomplete element type

*** Failed target:  app.o
*** Failed command: cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas -I../bfd 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/.. 
-I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../intl -I../intl -DLOCALEDIR="\"/usr/src/../tools/share/locale\"" 
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/tools/binutils/build/gas

*** Failed target:  all-recursive
*** Failed command: set fnord $MAKEFLAGS; amf=$2; dot_seen=no; target=`echo all-recursive | sed s/-recursive//`; list='doc po'; for subdir in $list; do echo "Making $target in 
$subdir"; if test "$subdir" = "."; then dot_seen=yes; local_target="$target-am"; else local_target="$target"; fi; (cd $subdir && /usr/src/../tools/bin/nbmake -f 
/usr/src/tools/binutils/../Makefile.gnuwrap $local_target) || case "$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; done; if test "$dot_seen" = "no"; then 
/usr/src/../tools/bin/nbmake -f /usr/src/tools/binutils/../Makefile.gnuwrap "$target-am" || exit 1; fi; test -z "$fail"
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/tools/binutils/build/gas

*** Failed target:  all
*** Failed command: /usr/src/../tools/bin/nbmake -f /usr/src/tools/binutils/../Makefile.gnuwrap all-recursive
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/tools/binutils/build/gas

*** Failed target:  all-gas
*** Failed command: r=`${PWDCMD-pwd}`; export r; s=`cd /usr/src/tools/binutils/../../gnu/dist/binutils; ${PWDCMD-pwd}`; export s; (cd gas && /usr/src/../tools/bin/nbmake -f 
/usr/src/tools/binutils/../Makefile.gnuwrap "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH" "TARGET_SUBDIR=i386--netbsdelf" "bindir=/usr/src/../tools/bin" "datadir=/usr/src/../tools/share" 
"exec_prefix=/usr/src/../tools" "includedir=/usr/src/../tools/include" "infodir=/usr/src/../tools/info" "libdir=/usr/src/../tools/lib" "libexecdir=/usr/src/../tools/libexec" 
"lispdir=" "libstdcxx_incdir=c++/4.1.2" "libsubdir=/usr/src/../tools/lib/gcc/i386--netbsdelf/4.1.2" "localstatedir=/usr/src/../tools/var" "mandir=/usr/src/../tools/man" 
"oldincludedir=/usr/include" "prefix=/usr/src/../tools" "sbindir=/usr/src/../tools/sbin" "sharedstatedir=/usr/src/../tools/com" "sysconfdir=/usr/src/../tools/etc" 
"tooldir=/usr/src/../tools/i386--netbsdelf" "build_tooldir=/usr/src/../tools/i386--netbsdelf" "gxx_include_dir=/usr/src/../tools/include/c++/4.1.2" "gcc_version=4.1.2" 
"gcc_version_trigger=" "target_alias=i386--netbsdelf" "BISON=true" "CC_FOR_BUILD=cc" "CXX_FOR_BUILD=c++" "EXPECT=`if [ -f $r/expect/expect ] ; then echo $r/expect/expect ; else echo 
expect ; fi`" "INSTALL=/usr/src/../tools/bin/nbinstall -c -p -r" "INSTALL_DATA=/usr/src/../tools/bin/nbinstall -c -p -r -m 644" "INSTALL_PROGRAM=/usr/src/../tools/bin/nbinstall -c -p 
-r" "INSTALL_SCRIPT=/usr/src/../tools/bin/nbinstall -c -p -r" "LEX=`if [ -f $r/flex/flex ] ; then echo $r/flex/flex ; else echo flex ; fi`" "M4=`if [ -f $r/m4/m4 ] ; then echo 
$r/m4/m4 ; else echo m4 ; fi`" "MAKE=/usr/src/../tools/bin/nbmake -f /usr/src/tools/binutils/../Makefile.gnuwrap" "RUNTEST=`if [ -f $s/dejagnu/runtest ] ; then echo $s/dejagnu/runtest 
; else echo runtest ; fi`" "RUNTESTFLAGS=" "SHELL=/bin/sh" "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`" "AR_FLAGS=rc" "CFLAGS=-O" "CXXFLAGS=-O" "LDFLAGS=" "LIBCFLAGS=-O" "LIBCXXFLAGS=-O -fno-implicit-templates" "AR_FOR_TARGET=` if [ -f 
$r/binutils/ar ] ; then echo $r/binutils/ar ; else if [ 'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then echo ar; else echo ar | sed 's,^,i386--netbsdelf-,' ; fi; fi`" 
"AS_FOR_TARGET=` if [ -f $r/gas/as-new ] ; then echo $r/gas/as-new ; elif [ -f $r/gcc/xgcc ]; then i386--netbsdelf-gcc -L$r/ld -print-prog-name=as ; else if [ 
'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then echo as; else echo as | sed 's,^,i386--netbsdelf-,' ; fi; fi`" "CC_FOR_TARGET= i386--netbsdelf-gcc -L$r/ld" 
"CFLAGS_FOR_TARGET=-O2 -O" "CXX_FOR_TARGET= i386--netbsdelf-c++ -L$r/ld" "CXXFLAGS_FOR_TARGET=-O" "DLLTOOL_FOR_TARGET=` if [ -f $r/binutils/dlltool ] ; then echo $r/binutils/dlltool ; 
else if [ 'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then echo dlltool; else echo dlltool | sed 's,^,i386--netbsdelf-,' ; fi; fi`" "GCJ_FOR_TARGET= i386--netbsdelf-gcj 
-L$r/ld" "LD_FOR_TARGET=` if [ -f $r/ld/ld-new ] ; then echo $r/ld/ld-new ; elif [ -f $r/gcc/xgcc ]; then i386--netbsdelf-gcc -L$r/ld -print-prog-name=ld ; else if [ 
'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then echo ld; else echo ld | sed 's,^,i386--netbsdelf-,' ; fi; fi`" "LIBCFLAGS_FOR_TARGET=-O2 -O" "LIBCXXFLAGS_FOR_TARGET=-O 
-fno-implicit-templates" "NM_FOR_TARGET=` if [ -f $r/binutils/nm-new ] ; then echo $r/binutils/nm-new ; elif [ -f $r/gcc/xgcc ]; then i386--netbsde
lf-gcc -L$r/ld -print-prog-name=nm ; else if [ 'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then echo nm; else echo nm | sed 's,^,i386--netbsdelf-,' ; fi; fi`" 
"RANLIB_FOR_TARGET=` if [ -f $r/binutils/ranlib ] ; then echo $r/binutils/ranlib ; else if [ 'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then if [ x'ranlib' != x ]; then 
echo ranlib; else echo ranlib; fi; else echo ranlib | sed 's,^,i386--netbsdelf-,' ; fi; fi`" "WINDRES_FOR_TARGET=` if [ -f $r/binutils/windres ] ; then echo $r/binutils/windres ; else 
if [ 'i386-unknown-netbsdelf3.99.21' = 'i386--netbsdelf' ] ; then echo windres; else echo windres | sed 's,^,i386--netbsdelf-,' ; fi; fi`" "CONFIG_SHELL=/bin/sh" 
"MAKEINFO=/usr/src/../tools/bin/nbmakeinfo --split-size=5000000" 'AR=ar' 'AS=as' 'CC=cc' 'CXX=c++' 'DLLTOOL=dlltool' 'LD=ld' 'NM=nm' 'RANLIB=ranlib' 'WINDRES=windres' all)
*** Error code 1

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

*** Failed target:  .build_done
*** Failed command: (cd build && CC=cc CFLAGS=-O CPPFLAGS= CXX=c++ CXXFLAGS=-O INSTALL=/usr/src/../tools/bin/nbinstall\ -c\ -p\ -r LDFLAGS= AR=ar RANLIB=ranlib 
LEX=/usr/src/../tools/bin/nblex MAKE=/usr/src/../tools/bin/nbmake PATH="/usr/src/../tools/bin:$PATH" YACC=/usr/src/../tools/bin/nbyacc /usr/src/../tools/bin/nbmake -f 
/usr/src/tools/binutils/../Makefile.gnuwrap MACHINE= MAKEINFO=/usr/src/../tools/bin/nbmakeinfo BISON=true DESTDIR= INSTALL=/usr/src/../tools/bin/nbinstall\ -c\ -p\ -r all-binutils 
all-gas all-ld)
*** Error code 1

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

*** Failed target:  dependall
*** Failed command: cd /usr/src/tools/binutils; /usr/src/../tools/bin/nbmake realall
*** Error code 1

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

*** Failed target:  dependall-binutils
*** 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/src/../tools/bin/nbmake 
_THISDIR_="${this}" "$@" ${target}; }; _makedirtarget binutils dependall
*** Error code 1

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

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

--Boundary-00=_M7ixEhbqivGw85v--