3

I encountered this error:

g++: internal compiler error: Killed (program cc1plus)

When I'm following the instructions given by the site http://gem5.org for building gem5 on Ubuntu Linux by using this command :

scons build/ARM/gem5.opt

What should I do to fix this error?

Kristopher Ives
  • 5,419
  • 2
  • 27
  • 36
  • What version of g++ and scons are you using? Were there any compiler warnings before the compiler error? –  Aug 04 '17 at 01:42
  • Try to gear down compiler's optimization level in the build system. –  Aug 04 '17 at 03:40

1 Answers1

2

upgrade to the latest release of a still supported major version of gcc (as of writing, 5,6, and 7), and try again. and if it crashes on the newest version, file a bugreport. what you're experiencing is a compiler bug. luckily, in my experience, compiling gcc on ubuntu is a breeze. run sudo apt-get build-dep gcc , and basically follow this guide https://gcc.gnu.org/wiki/InstallingGCC (protip: speed up the compilation by using make -j $(nproc) - compiling it will take quite some time! )

hanshenrik
  • 256
  • 1
  • 13