> On 06.12.2014 21:50, Michael Freitag wrote: > > I am trying to build GCC 4.9.2 from the SVN sources, but the bootstrap > > build always fails with the same error (see below). I configured with > > > > ../gcc-4.9.2/configure -v --prefix=/usr/local/gcc-4.9.2 --enable-shared > > --disable-multilib --program-suffix=-4.9.2 > > > > and I am using GCC 4.8.3 on my system. Any ideas whats wrong here? > > > > make[3]: Entering directory `<stripped>/gcc-4.9.2-build/gcc' > > > > g++ -c -DIN_GCC_FRONTEND -g -DIN_GCC -fno-exceptions -fno-rtti > > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings > > -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual > > -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings > > -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.9.2/gcc > > -I../../gcc-4.9.2/gcc/. -I../../gcc-4.9.2/gcc/../include > > -I../../gcc-4.9.2/gcc/../libcpp/include > > -I../../gcc-4.9.2/gcc/../libdecnumber > > -I../../gcc-4.9.2/gcc/../libdecnumber/bid -I../libdecnumber > > -I../../gcc-4.9.2/gcc/../libbacktrace -o cc1-checksum.o -MT > > cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c > > g++ -g -DIN_GCC -fno-exceptions -fno-rtti > > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings > > -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual > > -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings > > -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1 > > c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o > > c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o > > c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o > > c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o > > c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o > > c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o > > c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o > > c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o > > i386-c.o glibc-c.o \ > > cc1-checksum.o libbackend.a main.o tree-browser.o > > libcommon-target.a libcommon.a ../libcpp/libcpp.a > > ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a > > ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a > > ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -rdynamic -ldl > > -L../zlib -lz > > g++: fatal error: braced spec > > ‘%:sanitize(address):%{!shared:libasan_preinit%O%s} > > %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan > > --no-whole-archive -Bdynamic}}%{!static-libasan:-lasan}} > > %{%:sanitize(thread):%{static-libtsan:%{!shared:-Bstatic --whole-archive > > -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:-ltsan}} > > %{%:sanitize(leak):%{static-liblsan:%{!shared:-Bstatic --whole-archive > > -llsan --no-whole-archive -Bdynamic}}%{!static-liblsan:-llsan}}’ is > > invalid at ‘%’ > > compilation terminated. > > make[3]: *** [cc1] Error 1 Just spent half a day debugging that problem. For me, it was caused by bad values of some environment variables. I had actually been debugging an ICE in an lto test case, running the compiler with -v fo figure out the actual command that caused the problem. So I copied the commands setting the environment variables COLLECT_GCC, COLLECT_GCC_OPTIONS and COMPILER_PATH to the shell and then forgot about them. After that, the gcc build failed with the above error message. Closing the shell and staring a new one fixed the problem. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany