Discussion:
Problem building GCC 4.9.1 on x86_64
David Bernier
2014-07-16 23:07:56 UTC
Permalink
This is what happened after 40 minutes in
"make":
for:


gcc 4.9.1



error:
==========

using:internal compiler error
in "make" related to
gimple.h and ipa-split.c:


compiler:

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

on x86_64 architecture .



/home/david/scratch2/gcc-4.9.1/configure --disable-multilib

(configure line)



make


In file included from /home/david/scratch2/gcc-4.9.1/gcc/ipa-split.c:86:0:
/home/david/scratch2/gcc-4.9.1/gcc/gimple.h: In function ‘T* as_a(U*)
[with T = const gimple_statement_asm; U = const gimple_statement_base]’:
/home/david/scratch2/gcc-4.9.1/gcc/gimple.h:3197:42: internal compiler
error: Segmentation fault
as_a <const gimple_statement_asm> (gs);
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [ipa-split.o] Error 1
make[3]: Leaving directory `/home/david/Build/gcc'
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory `/home/david/Build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/david/Build'
make: *** [all] Error 2


==

David Bernier
David Bernier
2014-07-18 23:04:45 UTC
Permalink
I believe you need to configure and make from a directory outside the
package directory.
This is what happened after 40 minutes in
gcc 4.9.1
==========
using:internal compiler error
in "make" related to
Yes, thanks!

I chose
/home/david/scratch2/gcc-4.9.1/ as srcdir,

and
/home/david/scratch2/objdir/ as objdir.

I did the configuration as follows:


[***@localhost objdir]$ /home/david/scratch2/gcc-4.9.1/configure
--prefix=/home/david/ --disable-multilib --enable-languages=c

[...]

Then `make':


[***@localhost objdir]$ make
[...]
libtool: link: ( cd ".libs" && rm -f "libatomic.la" && ln -s
"../libatomic.la" "libatomic.la" )
true DO=all multi-do # make
make[4]: Leaving directory
`/home/david/scratch2/objdir/x86_64-unknown-linux-gnu/libatomic'
make[3]: Leaving directory
`/home/david/scratch2/objdir/x86_64-unknown-linux-gnu/libatomic'
make[2]: Leaving directory
`/home/david/scratch2/objdir/x86_64-unknown-linux-gnu/libatomic'
make[1]: Leaving directory `/home/david/scratch2/objdir'


Note: `make' finished without error.


[***@localhost objdir]$ pwd
/home/david/scratch2/objdir



I set:

PATH=$PATH:/usr/local/share/; export PATH

to include /usr/local/share/ in the PATH (includes tcl and dejagnu).

Am I ready to run the testsuite with
make -k check ?

P.S.: I'm not sure where the executable for the GCC C 4.9.1 compiler is
... Also, I'm not clear what --prefix= does.


Thanks,

David Bernier
Raghu L
2014-07-19 07:41:09 UTC
Permalink
Since 'make' finished without error, you may now proceed to run the testsuite.

Suggestion: Increase the stack size prior to running the tests using the following command:

$ ulimit -s 32768

Then, run the tests using the command below:


$ make -j 2 -k check

'make -j 2' is for parallel build. Replace '2' with the number of processor cores available on your system.

Currently, the gcc 4.9.1 'c' compiler executable for your build will be in 'objdir/gcc' with name 'xgcc'. In your case, exactly in the folder '/home/david/scratch2/objdir/gcc'.

The path you specify in '--prefix=<path>' is the installation path for the toolchain. After the successful build of the toolchain, you can install it using the command below:

$ make install


All executables will be installed in '<path>/bin', where <path> is the folder specified in --prefix. 
Also, directories 'lib' for libraries and 'include' for header files will be created appropriately in <path>.

Hope, this clarifies.

Best Regards,
Raghunath Lolur.

Loading...