This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Bootstrap errors when linking in recent GCC builds
- From: "Art Haas" <ahaas at airmail dot net>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 13 May 2006 13:05:35 -0500
- Subject: Bootstrap errors when linking in recent GCC builds
Hi.
I've been seeing bootstrap errors over the last several days with my
builds of SVN GCC on both Debian and Fedora machines. The builds fail
with a link error when linking one of the 'gen' programs that the build
process creates. The output below was taken off my Debian machine which
is an i586-pc-linux-gnu box according to config.guess. The Fedora
machine is a SMP PIII machine running Rawhide - very nicely I might add.
My bootstrap 'gcc' compiler is a development snapshot build
that the build environment sees before the system compiler thanks to
adjusting the PATH.
My builds succeed, however, if the bootstrap GCC is the system compiler,
which on my Debian machine is their latest gcc-4.0 package, and on Fedora
it is the Rawhide GCC. After successfully building the compiler, I've
installed it and built numerous programs without problems, though I
build these programs without the '-g' flag for debugging. It seems like
the '-g' flag is tickling a bug in the current SVN code, but that is
just a guess as others are not seeing the problem.
The 'gcc -v' output from the development compiler that was used to
bootstrap my latest build on Debian is the following:
$ gcc -v
Using built-in specs.
Target: i586-pc-linux-gnu
Configured with: /mnt/src/gcc/configure --prefix=/opt/gnu
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-languages=c,c++,objc --disable-checking --with-system-zlib
--with-gc=page
Thread model: posix
gcc version 4.2.0 20060511 (experimental)
$
I use the following small script to configure and build GCC:
$ cat ./cc_conf_script.sh
#!/bin/sh
params="-march=pentium-mmx"
CPPFLAGS="-DNDEBUG" CFLAGS="-O2 ${params}" CXXFLAGS="-O2 ${params} -fno-check-new" /mnt/src/gcc/configure --prefix=/opt/gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages="c,c++,objc" --disable-checking --with-system-zlib --with-gc=page
export _POSIX2_VERSION=199209
make bootstrap-lean BOOT_CFLAGS="-O2 ${params}" CXXFLAGS="-O2 ${params} -fno-check-new" > make_out 2>&1
# make -k check > check_out 2>&1
$
Yes, I am building on a Pentium-MMX machine. My build above takes about
9 hours, so I usually start them at night and see how things ended up
the next morning. The '_POSIX2_VERSION' variable was set because the
environment has the CVS builds of coreutils, and without this variable
being set the builds would fail on 'head' or 'tail' commands, I forget
which at the moment.
Here's the output from my build log when things fail. The 'gcc' doing
the initial build is the one listed above:
gcc -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genconstants \
build/genconstants.o build/rtl.o build/read-rtl.o build/ggc-none.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/errors.o ../build-i586-pc-linux-gnu/libiberty/libiberty.a
build/genconstants.o: In function `VEC_rtx_heap_alloc':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/genconstants.o: In function `VEC_rtx_heap_copy':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/genconstants.o: In function `VEC_rtx_heap_reserve':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/genconstants.o: In function `VEC_rtx_gc_alloc':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/genconstants.o: In function `VEC_rtx_gc_copy':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/genconstants.o: In function `VEC_rtx_gc_reserve':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/rtl.o: In function `VEC_rtx_heap_alloc':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/rtl.o: In function `VEC_rtx_heap_copy':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/rtl.o: In function `VEC_rtx_heap_reserve':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/rtl.o: In function `VEC_rtx_gc_alloc':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/rtl.o: In function `VEC_rtx_gc_copy':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/rtl.o: In function `VEC_rtx_gc_reserve':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/read-rtl.o: In function `VEC_rtx_heap_alloc':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/read-rtl.o: In function `VEC_rtx_heap_copy':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/read-rtl.o: In function `VEC_rtx_heap_reserve':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/read-rtl.o: In function `VEC_rtx_gc_alloc':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/read-rtl.o: In function `VEC_rtx_gc_copy':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/read-rtl.o: In function `VEC_rtx_gc_reserve':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/gensupport.o: In function `VEC_rtx_heap_alloc':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/gensupport.o: In function `VEC_rtx_heap_copy':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/gensupport.o: In function `VEC_rtx_heap_reserve':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/gensupport.o: In function `VEC_rtx_gc_alloc':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/gensupport.o: In function `VEC_rtx_gc_copy':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/gensupport.o: In function `VEC_rtx_gc_reserve':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/print-rtl.o: In function `VEC_rtx_heap_alloc':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/print-rtl.o: In function `VEC_rtx_heap_copy':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/print-rtl.o: In function `VEC_rtx_heap_reserve':/mnt/src/gcc/gcc/rtl.h:195: undefined reference to `vec_heap_p_reserve'
build/print-rtl.o: In function `VEC_rtx_gc_alloc':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/print-rtl.o: In function `VEC_rtx_gc_copy':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
build/print-rtl.o: In function `VEC_rtx_gc_reserve':/mnt/src/gcc/gcc/rtl.h:196: undefined reference to `vec_gc_p_reserve'
collect2: ld returned 1 exit status
make[3]: *** [build/genconstants] Error 1
make[3]: Leaving directory `/usr/src/gcc_svn/objdir-0513/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/usr/src/gcc_svn/objdir-0513'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/src/gcc_svn/objdir-0513'
make: *** [bootstrap-lean] Error 2
The output above was on my Debian machine; the Fedora machine (Rawhide)
fails in a similiar manner, and likewise bootstrap succeeds if the
initial compiler is the system compiler and not my most recent GCC
build.
Anyone else seeing this problem?
Art Haas
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822