compilation – Installing GEM5 on Ubuntu 19.10 on my laptop (i5 CPU M520 -64bit)

I tried installing the GEM5 simulator according to the instructions provided at http://learning.gem5.org/book/part1/building.html and doing the following

sudo apt install build-essential git m4 scons zlib1g zlib1g-dev libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev python-dev python

git clone https://gem5.googlesource.com/public/gem5

sudo apt-get install python-six

sudo scons build / X86 / gem5.opt -j2

The result after the previous command is as follows:

scons: Reading SConscript files …
Warning: your compiler does not support incremental and lto links at the same time, so lto is being disabled. To force lto anyway, use the –force-lto option. That will disable partial linking.
Information: Using Python settings: /usr/bin/python2.7-config
Checking the C Python.h … header file (cached) yes
Checking the C python2.7 library … (cached) yes
Checking the pthread of the C … library (cached) yes
Checking library C dl … (cached) yes
Checking the utility of the C … library (cached) yes
Checking the library C m … (in cache) yes
Checking to accept (0,0,0) in the C ++ library None … (cached) yes
Checking zlibVersion () in the C ++ library z … (in cache) yes
Checking GOOGLE_PROTOBUF_VERIFY_VERSION in the protobuf of the C ++ library … (in cache) yes
Checking the C header file valgrind / valgrind.h … (cached) no
Checking clock_nanosleep (0,0, NULL, NULL) in library C None … (cached) yes
Checking if timer_create (CLOCK_MONOTONIC, NULL, NULL) in library C None … (cached) no
Checking timer_create (CLOCK_MONOTONIC, NULL, NULL) in the Crt library … (in cache) yes
Checking the C tcmalloc library … (cached) yes
Checking coal temperature; backtrace_symbols_fd ((void *) & temp, 0, 0) in library C None … (cached) yes
Checking the header file C fenv.h … (cached) yes
Checking the header file C png.h … (cached) no
Warning: header file not found.
This host has no libpng library.
Disable support for PNG framebuffers.
Checking the header file C linux / kvm.h … (cached) yes
Checking the C header file linux / if_tun.h … (in cache) yes
Checking the size of struct kvm_xsave … (in cache) yes
Checking the exclude_host member in struct perf_event_attr … (in cache) yes
The hdf5-serial package was not found in the pkg-config search path.
Maybe I should add the directory that contains hdf5-serial.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hdf5-serial' found
Checking for hdf5-serial using pkg-config... no
Package hdf5 was not found in the pkg-config search path.
Perhaps you should add the directory containing
hdf5.pc & # 39;
to the PKG_CONFIG_PATH environment variable
Package & # 39; hdf5 & # 39; was not found
Checking hdf5 using pkg-config … no
Checking H5Fcreate ("", 0, 0, 0) in library C hdf5 … (in cache) no
Warning: No HDF5 C ++ libraries were found. To disable
HDF5 support.
Checking if i386 declare … (in cache) no
Checking if x86_64 declare … (in cache) yes
Building in / home / murali / GEM5 / gem5 / build / X86
Use of the saved variables file / home / murali / GEM5 / gem5 / build / variables / X86
scons: finished reading SConscript files.
scons: Building goals …
(CXX) X86 / dev / x86 / pc.cc -> .o
(TRACKING) -> X86 / debug / I8254.hh
(CXX) X86 / dev / x86 / i8254.cc -> .o
In the file included from build / X86 / dev / x86 / pc.cc: 41:
build / X86 / arch / x86 / intmessage.hh: In the function & # 39; Packet * X86ISA :: buildIntTriggerPacket (int, X86ISA :: TriggerIntMessage) & # 39 ;:
build / X86 / arch / x86 / intmessage.hh: 84: 44: error: implicitly declared & # 39; constexpr BitfieldBackend :: BitUnionOperators :: BitUnionOperators (const BitfieldBackend :: BitUnionOperators &) & # 39; is deprecated (-Werror = deprecated-copy)
84 return buildIntPacket (addr, message);
The | ^
In the file included from build / X86 / sim / serialize.hh: 62,
from build / X86 / sim / eventq.hh: 53,
from build / X86 / sim / sim_object.hh: 58,
from build / X86 / dev / platform.hh: 44,
from build / X86 / dev / x86 / pc.hh: 40,
From build / X86 / dev / x86 / pc.cc: 35:
build / X86 / base / bitunion.hh: 262: 9: note: because & # 39; BitfieldBackend :: BitUnionOperators & # 39; provided the type name & # 39; Base :: __ StorageType BitfieldBackend :: BitUnionOperators :: operator = (const BitfieldBackend :: BitUnionOperators &) (with Base = X86ISA :: BitfieldUnderlyingClassesTriggerIntMessage; typename Base :: __ StorageType = unsigned int) & # 39;
262 operator = (BitUnionOperators const and others)
The | ^ ~~~~~~~
In the file included from build / X86 / arch / x86 / intmessage.hh: 37,
From build / X86 / dev / x86 / pc.cc: 41:
build / X86 / dev / x86 / intdev.hh: 87: 29: note: initializing argument 2 of & # 39; Packet * X86ISA :: buildIntPacket (Addr, T) (with T = BitfieldBackend :: BitUnionOperators; PacketPtr = Packet *; Addr = unsigned length int) & # 39;
87 | buildIntPacket (Addr addr, T payload)
The | ~~ ^ ~~~~~~
build / X86 / dev / x86 / intdev.hh: on instantiation of & # 39; Packet * X86ISA :: buildIntPacket (Addr, T) (with T = BitfieldBackend :: BitUnionOperators; PacketPtr = Packet *; Addr = long unsigned int ) & # 39 ;:
build / X86 / arch / x86 / intmessage.hh: 84: 44: required from here
build / X86 / dev / x86 / intdev.hh: 93: 5: error: implicitly declared & # 39; constexpr BitfieldBackend :: BitUnionOperators :: BitUnionOperators (const BitfieldBackend :: BitUnionOperators &) & # 39; is deprecated (-Werror = deprecated-copy)
93 | pkt-> setRaw (payload);
The | ^ ~~
In the file included from build / X86 / sim / serialize.hh: 62,
from build / X86 / sim / eventq.hh: 53,
from build / X86 / sim / sim_object.hh: 58,
from build / X86 / dev / platform.hh: 44,
from build / X86 / dev / x86 / pc.hh: 40,
From build / X86 / dev / x86 / pc.cc: 35:
build / X86 / base / bitunion.hh: 262: 9: note: because & # 39; BitfieldBackend :: BitUnionOperators & # 39; provided the type name & # 39; Base :: __ StorageType BitfieldBackend :: BitUnionOperators :: operator = (const BitfieldBackend :: BitUnionOperators &) (with Base = X86ISA :: BitfieldUnderlyingClassesTriggerIntMessage; typename Base :: __ StorageType = unsigned int) & # 39;
262 operator = (BitUnionOperators const and others)
The | ^ ~~~~~~~
In the file included from build / X86 / arch / x86 / intmessage.hh: 39,
From build / X86 / dev / x86 / pc.cc: 41:
build / X86 / mem / packet_access.hh: 62: 18: note: initializing argument 1 of & # 39; void Packet :: setRaw (T) (with T = BitfieldBackend :: BitUnionOperators) & # 39;
62 | Package :: setRaw (T v)
The | ~~ ^
(CXX) X86 / dev / x86 / i8237.cc -> .o
cc1plus: all warnings are treated as errors
scons: *** (build / X86 / dev / x86 / pc.o) Error 1

scons: construction finished due to errors.

Can anyone help me eliminate the above errors and in a successful compilation of the GEM5 simulator compilation? Thanks in advance