compiling error for version 4.9.0 and 4.9.2
Pengcheng Yang
yangpc@mail.biols.ac.cn
Tue Mar 31 13:16:00 GMT 2015
Hi Jonathan Wakely,
Following the instructions on https://gcc.gnu.org/wiki/InstallingGCC, I
have tested using the following command:
cd /panfs/home/kang/yangpc/soft/lib/packages
tar -zxf gcc-4.9.2.tar.gz
cd gcc-4.9.2
./contrib/download_prerequisites
mkdir /panfs/home/kang/yangpc/soft/lib/packages/gcc-build
cd /panfs/home/kang/yangpc/soft/lib/packages/gcc-build
/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/configure
--prefix=/panfs/home/kang/yangpc/soft/lib/gcc-4.9.2 --disable-multilib
make
but still got the following error message.
=========================================
rm -f include-fixed/README
cp
/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/../fixincludes/README-fixinc
include-fixed/README
chmod a+r include-fixed/README
echo timestamp > stmp-int-hdrs
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="USED_FOR_TARGET " \
/bin/sh
/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/mkconfig.sh
tconfig.h
g++ -c -DSTANDARD_STARTFILE_PREFIX=\"../../../\"
-DSTANDARD_EXEC_PREFIX=\"/panfs/home/kang/yangpc/soft/lib/gcc-4.9.2/lib/gcc/\"
-DSTANDARD_LIBEXEC_PREFIX=\"/panfs/home/kang/yangpc/soft/lib/gcc-4.9.2/libexec/gcc/\"
-DDEFAULT_TARGET_VERSION=\"4.9.2\"
-DDEFAULT_TARGET_MACHINE=\"x86_64-unknown-linux-gnu\"
-DSTANDARD_BINDIR_PREFIX=\"/panfs/home/kang/yangpc/soft/lib/gcc-4.9.2/bin/\"
-DTOOLDIR_BASE_PREFIX=\"../../../../\" -DENABLE_SHARED_LIBGCC
-DCONFIGURE_SPECS="\"\"" -DIN_GCC_FRONTEND -g -DIN_GCC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common
-DHAVE_CONFIG_H -I. -Icp
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/cp
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/../include
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/../libcpp/include
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-build/./gmp
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gmp
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-build/./mpfr
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/mpfr
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/mpc/src
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/../libdecnumber -I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/../libdecnumber/bid
-I../libdecnumber
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/../libbacktrace -DCLOOG_INT_GMP
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-build/./cloog/include
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/cloog/include
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/cloog/include
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-build/./isl/include
-I/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/isl/include -o
cp/g++spec.o -MT cp/g++spec.o -MMD -MP -MF cp/.deps/g++spec.TPo
/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/gcc/cp/g++spec.c
g++ -g -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual
-Wno-format -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common
-DHAVE_CONFIG_H -o xg++ \
gcc.o ggc-none.o cp/g++spec.o driver-i386.o libcommon-target.a \
libcommon.a ../libcpp/libcpp.a
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a
g++: 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 '%'
make[3]: *** [xg++] Error 1
make[3]: Leaving directory
`/panfs/home/kang/yangpc/soft/lib/packages/gcc-build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory
`/panfs/home/kang/yangpc/soft/lib/packages/gcc-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory
`/panfs/home/kang/yangpc/soft/lib/packages/gcc-build'
make: *** [all] Error 2
On 2015/3/31 18:43, Jonathan Wakely wrote:
> On 31 March 2015 at 11:17, Pengcheng Yang <yangpc@mail.biols.ac.cn> wrote:
>> Hi all,
>>
>> I have compiled gcc-4.9.2, but the same error reoccurred.
>>
>> the command is:
>> ./configure --prefix=/panfs/home/kang/yangpc/soft/lib/gcc-4.9.2/
> Firstly, don't use ./configure to build GCC, see
> https://gcc.gnu.org/wiki/FAQ#configure
>
>
>> --with-gmp=/panfs/home/kang/yangpc/soft/lib/gmp-5.1.3/
>> --with-mpfr=/panfs/home/kang/yangpc/soft/lib/packages/mpfr-3.1.2/
>> --with-mpc=/panfs/home/kang/yangpc/soft/lib/mpc/ --disable-multilib
> Secondly, it is much easier to build gmp, mpfr and mpc directly in the
> GCC tree, instead of installing them separately, see
> https://gcc.gnu.org/wiki/InstallingGCC for how to use the
> contrib/download_prerequisites script that means you don't need to use
> --with-gmp and --with-mpfr and --with-mpc.
>
> Thirdly, your paths look suspicious. The prefix for gcc, gmp and mpc
> is .../soft/lib/ but the prefix for mpfr is .../soft/lib/packages ...
> which is also the build path shown below. Make sure you are not trying
> to build in the source tree, and are not trying to build in the
> install location specified with --prefix.
>
>
>> g++: 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 '%'
>> make[3]: *** [xg++] Error 1
>> make[3]: Leaving directory
>> `/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/host-x86_64-unknown-linux-gnu/gcc'
>> make[2]: *** [all-stage1-gcc] Error 2
>> make[2]: Leaving directory
>> `/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2'
>> make[1]: *** [stage1-bubble] Error 2
>> make[1]: Leaving directory
>> `/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2'
>> make: *** [all] Error 2
>
More information about the Gcc-help
mailing list