# Linux Kernel Module Cheat

##### 24.22.9.2. gem5 build broken on recent compiler version

gem5 moves a bit slowly, and if your host compiler is very new, the gem5 build might be broken for it, e.g. this was the case for Ubuntu 19.10 with GCC 9 and gem5 62d75e7105fe172eb906d4f80f360ff8591d4178 from Dec 2019.

This happens mostly because GCC keeps getting more strict with warnings and gem5 uses `-Werror`.

The specific problem mentioned above was later fixed, but if it ever happens again, you can work around it by either by or by disabling `-Werror`:

    ./build-gem5 -- CCFLAGS=-Wno-error

or by installing an older compiler and using it with something like:

    ./build-gem5 -- CC=gcc-8 CXX=g++-8