I've seen this problem on and off several times now (including with the
4.8.0 release). Bootstrap fails linking xgcc in stage 2 with a linker
assertion:
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]),
function parse, file
/SourceCache/ld64/ld64-136/src/ld/parsers/macho_relocatable_file.cpp,
line 1555.
System is running MacOS X 10.8.3 with Xcode 4.6.1. Has anybody else
seen this error? Unfortunately it comes and goes seemingly at random.
Thanks,
Dara
$ ../gcc-trunk/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto --disable-checking
--with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk
--with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk
--prefix=/usr/local/gcc-trunk
$ make -j2 bootstrap
...
/Users/dara/Downloads/objdir/./prev-gcc/xg++
-B/Users/dara/Downloads/objdir/./prev-gcc/
-B/usr/local/gcc-trunk/x86_64-apple-darwin12.3.0/bin/ -nostdinc++
-B/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/src/.libs
-B/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/libsupc++/.libs
-I/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/include/x86_64-apple-darwin12.3.0
-I/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/include
-I/Users/dara/Downloads/gcc-trunk/libstdc++-v3/libsupc++
-L/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/src/.libs
-L/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/libsupc++/.libs
-g -O2 -mdynamic-no-pic -gtoggle -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -Wl,-no_pie -o gengtype \
gengtype.o gengtype-lex.o gengtype-parse.o gengtype-state.o
version.o errors.o libcommon.a ../libcpp/libcpp.a
../libiberty/libiberty.a ../intl/libintl.a
../libdecnumber/libdecnumber.a ../libbacktrace/.libs/libbacktrace.a
libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a -liconv
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a
/Users/dara/Downloads/objdir/./prev-gcc/xg++
-B/Users/dara/Downloads/objdir/./prev-gcc/
-B/usr/local/gcc-trunk/x86_64-apple-darwin12.3.0/bin/ -nostdinc++
-B/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/src/.libs
-B/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/libsupc++/.libs
-I/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/include/x86_64-apple-darwin12.3.0
-I/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/include
-I/Users/dara/Downloads/gcc-trunk/libstdc++-v3/libsupc++
-L/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/src/.libs
-L/Users/dara/Downloads/objdir/prev-x86_64-apple-darwin12.3.0/libstdc++-v3/libsupc++/.libs
-g -O2 -mdynamic-no-pic -gtoggle -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -Wl,-no_pie -o xgcc gcc.o ggc-none.o \
c/gccspec.o driver-i386.o darwin-driver.o libcommon-target.a \
libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a -liconv
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a
0 0x1093a9098 __assert_rtn + 144
1 0x1093c0334
mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions
const&) + 1044
2 0x1093aff4b mach_o::relocatable::Parser<x86_64>::parse(unsigned char
const*, unsigned long long, char const*, long, ld::File::Ordinal,
mach_o::relocatable::ParserOptions const&) + 313
3 0x1093adadc mach_o::relocatable::parse(unsigned char const*,
unsigned long long, char const*, long, ld::File::Ordinal,
mach_o::relocatable::ParserOptions const&) + 208
4 0x1093cf74c
archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry
const*) const + 794
5 0x1093cf261 archive::File<x86_64>::justInTimeforEachAtom(char
const*, ld::File::AtomHandler&) const + 139
6 0x1093dfb06 ld::tool::InputFiles::searchLibraries(char const*, bool,
bool, bool, ld::File::AtomHandler&) const + 210
7 0x1093e6978 ld::tool::Resolver::resolveUndefines() + 200
8 0x1093e88a3 ld::tool::Resolver::resolve() + 75
9 0x1093a9380 main + 370
A linker snapshot was created at:
/tmp/xgcc-2013-04-15-160056.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]),
function parse, file
/SourceCache/ld64/ld64-136/src/ld/parsers/macho_relocatable_file.cpp,
line 1555.
collect2: error: ld returned 1 exit status
make[3]: *** [xgcc] Error 1
make[3]: *** Waiting for unfinished jobs....
rm gcov.pod gcc.pod cpp.pod gfortran.pod gfdl.pod fsf-funding.pod
make[2]: *** [all-stage2-gcc] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [bootstrap] Error 2