Hello gcc community!
I'm trying to compile gcc 7.1.0 from source. I used gcc 5.1.0 and gcc
6.1.0 and got the same error. these are the steps I'm doing:
tar -zxvf gcc-7.1.0.tar.gz
mkdir gcc_obj
cd gcc_obj/
CC=gcc6 CXX=g++6 ../gcc-7.1.0/configure
--prefix=$HOME/installed/gcc-7.1/ --enable-languages=c,c++,fortran
--program-suffix=7 --with-gmp=$HOME/installed/
--with-mpc=$HOME/installed/ --with-mpfr=$HOME/installed/
however, I got an illegal instruction error. Here is the output:
/bin/sh ./libtool --tag=CC --mode=compile
/home/hector/dwnld_prog/gcc_obj/./gcc/xgcc
-B/home/hector/dwnld_prog/gcc_obj/./gcc/
-B/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/bin/
-B/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/lib/ -isystem
/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/include -isystem
/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/sys-include
-DHAVE_CONFIG_H -I. -I../../../gcc-7.1.0/libgfortran
-iquote../../../gcc-7.1.0/libgfortran/io
-I../../../gcc-7.1.0/libgfortran/../gcc
-I../../../gcc-7.1.0/libgfortran/../gcc/config
-I../../../gcc-7.1.0/libgfortran/../libquadmath -I../.././gcc
-I../../../gcc-7.1.0/libgfortran/../libgcc -I../libgcc
-I../../../gcc-7.1.0/libgfortran/../libbacktrace -I../libbacktrace
-I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules
-ffunction-sections -fdata-sections -g -O2 -MT write.lo -MD -MP -MF
.deps/write.Tpo -c -o write.lo `test -f 'io/write.c' || echo
'../../../gcc-7.1.0/libgfortran/'`io/write.c
libtool: compile: /home/hector/dwnld_prog/gcc_obj/./gcc/xgcc
-B/home/hector/dwnld_prog/gcc_obj/./gcc/
-B/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/bin/
-B/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/lib/ -isystem
/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/include -isystem
/home/hector/installed/gcc-7.1/x86_64-pc-linux-gnu/sys-include
-DHAVE_CONFIG_H -I. -I../../../gcc-7.1.0/libgfortran
-iquote../../../gcc-7.1.0/libgfortran/io
-I../../../gcc-7.1.0/libgfortran/../gcc
-I../../../gcc-7.1.0/libgfortran/../gcc/config
-I../../../gcc-7.1.0/libgfortran/../libquadmath -I../.././gcc
-I../../../gcc-7.1.0/libgfortran/../libgcc -I../libgcc
-I../../../gcc-7.1.0/libgfortran/../libbacktrace -I../libbacktrace
-I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules
-ffunction-sections -fdata-sections -g -O2 -MT write.lo -MD -MP -MF
.deps/write.Tpo -c ../../../gcc-7.1.0/libgfortran/io/write.c -fPIC
-DPIC -o .libs/write.o
In file included from ../../../gcc-7.1.0/libgfortran/io/write.c:53:0:
../../../gcc-7.1.0/libgfortran/io/write_float.def: In function
‘get_float_string’:
../../../gcc-7.1.0/libgfortran/io/write_float.def:1054:1: internal
compiler error: Illegal instruction
get_float_string (st_parameter_dt *dtp, const fnode *f, const char
*source,
^~~~~~~~~~~~~~~~
0x9d0e6f crash_signal
../../gcc-7.1.0/gcc/toplev.c:337
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make[3]: *** [write.lo] Error 1
make[3]: Leaving directory
`/home/hector/dwnld_prog/gcc_obj/x86_64-pc-linux-gnu/libgfortran'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/hector/dwnld_prog/gcc_obj/x86_64-pc-linux-gnu/libgfortran'
make[1]: *** [all-target-libgfortran] Error 2
make[1]: Leaving directory `/home/hector/dwnld_prog/gcc_obj'
make: *** [all] Error 2
What could be the problem?
Thank you very much for you help,
Hector