Internal compiler error while compiling gcc 7.1.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Internal compiler error while compiling gcc 7.1.0

Hector E Barrios Molano
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Internal compiler error while compiling gcc 7.1.0

Jonathan Wakely-4
On 11 August 2017 at 22:43, Hector E Barrios Molano wrote:

> 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/

Where GMP, MPC and MPFR compiled for the same hardware as you are
building on? One possibility is that they were compiled for a newer
x86 processor, and so use instructions that are not supported by the
machine you're building on.

You would avoid that kind of problem by not installing those libs
separately. See https://gcc.gnu.org/wikiInstallingGCC for how to make
it much easier.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Internal compiler error while compiling gcc 7.1.0

Hector E Barrios Molano
Thanks Jonathan for your help!

It now compiles without problems.

However, when I run make -k check it get stuck for several hours at:

Running
/home/hector/dwnld_prog/gcc-7.1.0/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
...
Running
/home/hector/dwnld_prog/gcc-7.1.0/gcc/testsuite/gcc.dg/tsan/tsan.exp ...
WARNING: program timed out.

When I manually stop the program I get this summary:

got a INT signal, interrupted by user

                 === gcc Summary ===

# of expected passes            105253
# of unexpected failures        311
# of unexpected successes       22
# of expected failures          199
# of unresolved testcases       2
# of unsupported tests          1611

What could be causing this problem?

Thanks for your help,

Hector


On 08/11/2017 05:52 PM, Jonathan Wakely wrote:

> On 11 August 2017 at 22:43, Hector E Barrios Molano wrote:
>> 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/
> Where GMP, MPC and MPFR compiled for the same hardware as you are
> building on? One possibility is that they were compiled for a newer
> x86 processor, and so use instructions that are not supported by the
> machine you're building on.
>
> You would avoid that kind of problem by not installing those libs
> separately. See https://gcc.gnu.org/wikiInstallingGCC for how to make
> it much easier.

Loading...