llvm-gcc bootstrap failure

I'm getting the following when building llvm-gcc with an optimized set of
LLVM libraries:

/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/./gcc/xgcc
-B/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/./gcc/
-B/cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/
-B/cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/lib/
-isystem /cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include
-isystem /cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-include
-O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/.
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../include
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../libcpp/include
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../libdecnumber
-I../libdecnumber
-I/ptmp/dag/build.llvm.trunk.official.opt/x86_64-unknown-linux-gnu/include
-I/ptmp/dag/llvm-project.official/llvm/trunk/include -DL_popcountsi2
-c /ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/libgcc2.c -o
libgcc/./_popcountsi2.o
cc1: /ptmp/dag/llvm-project.official/llvm/trunk/lib/Support/StringMap.cpp:177:
void llvm::StringMapImpl::RemoveKey(llvm::StringMapEntryBase*): Assertion `V
== V2 && "Didn't find key?"' failed.
/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/libgcc2.c:809: internal
compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter&gt; for instructions.
make[4]: *** [libgcc/./_popcountsi2.o] Error 1
make[4]: Leaving directory
`/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/gcc'
make[3]: *** [stmp-multilib] Error 2
make[3]: Leaving directory
`/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory
`/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory
`/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu'
make: *** [bootstrap] Error 2

I don't understand the reference to stmp-multilib since I configured with
--disable-multilib.

Is anyone else seeing this? This is affecting my ability to test patches I
want to commit.

                                           -Dave

David Greene wrote:

I'm getting the following when building llvm-gcc with an optimized set of
LLVM libraries:

/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/./gcc/xgcc
-B/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/./gcc/
-B/cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/
-B/cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/lib/
-isystem /cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include
-isystem /cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-include
-O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/.
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../include
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../libcpp/include
-I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../libdecnumber
-I../libdecnumber
-I/ptmp/dag/build.llvm.trunk.official.opt/x86_64-unknown-linux-gnu/include
-I/ptmp/dag/llvm-project.official/llvm/trunk/include -DL_popcountsi2
-c /ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/libgcc2.c -o
libgcc/./_popcountsi2.o
cc1: /ptmp/dag/llvm-project.official/llvm/trunk/lib/Support/StringMap.cpp:177:
void llvm::StringMapImpl::RemoveKey(llvm::StringMapEntryBase*): Assertion `V
== V2 && "Didn't find key?"' failed.
/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/libgcc2.c:809: internal
compiler error: Aborted

Unless this is in something like an inline asm, an internal compiler
error is always a gcc bug. You should probably upgrade your gcc: you
don't say exactly what version it is.

Andrew.

Hi Andrew,

> /ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/./gcc/xgcc
> -B/ptmp/dag/build.llvm-gcc-4.2.trunk.official.opt/x86_64-unknown-linux-gnu/./gcc/
> -B/cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/
> -B/cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/lib/
> -isystem /cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include
> -isystem /cray/iss/compiler/cost/tools/llvm-tools/llvm/install.trunk.official.opt/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-include
> -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g
> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.
> -I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc
> -I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/.
> -I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../include
> -I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../libcpp/include
> -I/ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/../libdecnumber
> -I../libdecnumber
> -I/ptmp/dag/build.llvm.trunk.official.opt/x86_64-unknown-linux-gnu/include
> -I/ptmp/dag/llvm-project.official/llvm/trunk/include -DL_popcountsi2
> -c /ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/libgcc2.c -o
> libgcc/./_popcountsi2.o
> cc1: /ptmp/dag/llvm-project.official/llvm/trunk/lib/Support/StringMap.cpp:177:
> void llvm::StringMapImpl::RemoveKey(llvm::StringMapEntryBase*): Assertion `V
> == V2 && "Didn't find key?"' failed.
> /ptmp/dag/llvm-project.official/llvm-gcc-4.2/trunk/gcc/libgcc2.c:809: internal
> compiler error: Aborted

Unless this is in something like an inline asm, an internal compiler
error is always a gcc bug. You should probably upgrade your gcc: you
don't say exactly what version it is.

after the new compiler is built (llvm-gcc, named xgcc at this point), it
is used to build various libraries. As you can see in the above line from
the build log, xgcc crashed while building libgcc2.c. Since our own compiler
crashed, it is up to us to fix it :slight_smile: The system compiler should not be
relevant, unless xgcc is crashing because it was miscompiled by the system
gcc.

Best wishes,

Duncan.