Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build gem5 on Ubuntu 17.10 with GCC 7.2, dealing with issues in C++ compilation?

I am having lots of issues with building gem5 as directed in the official documentation.

These are the commands I have used:

git clone https://gem5.googlesource.com/public/gem5
cd gem5
python2 `which scons` build/MIPS/gem5.opt

Which results in this output:

scons: Reading SConscript files ...
Warning: Your compiler doesn't support incremental linking and lto at the same time, so lto is being disabled. To force lto on anyway, use the --force-lto option. That will disable partial linking.
Checking for C header file Python.h... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... (cached) yes
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... (cached) yes
Checking for C library tcmalloc... (cached) yes
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None... (cached) yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) yes
Checking for C header file linux/kvm.h... (cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /home/j/gem5/build/MIPS
Using saved variables file /home/j/gem5/build/variables/MIPS
scons: done reading SConscript files.
scons: Building targets ...
 [     CXX] MIPS/dev/serial/serial.cc -> .o
In file included from build/MIPS/sim/sim_object.hh:57:0,
                 from build/MIPS/dev/serial/serial.hh:44,
                 from build/MIPS/dev/serial/serial.cc:40:
build/MIPS/sim/eventq.hh:806:12: error: 'function' in namespace 'std' does not name a template type
       std::function<void(void)> callback;
            ^~~~~~~~
build/MIPS/sim/eventq.hh:810:37: error: 'function' in namespace 'std' does not name a template type
     EventFunctionWrapper(const std::function<void(void)> &callback,
                                     ^~~~~~~~
build/MIPS/sim/eventq.hh:810:45: error: expected ',' or '...' before '<' token
     EventFunctionWrapper(const std::function<void(void)> &callback,
                                             ^
build/MIPS/sim/eventq.hh: In constructor 'EventFunctionWrapper::EventFunctionWrapper(int)':
build/MIPS/sim/eventq.hh:814:17: error: 'p' was not declared in this scope
         : Event(p), callback(callback), _name(name)
                 ^
build/MIPS/sim/eventq.hh:814:21: error: class 'EventFunctionWrapper' does not have any field named 'callback'
         : Event(p), callback(callback), _name(name)
                     ^~~~~~~~
build/MIPS/sim/eventq.hh:814:30: error: 'callback' was not declared in this scope
         : Event(p), callback(callback), _name(name)
                              ^~~~~~~~
build/MIPS/sim/eventq.hh:814:30: note: suggested alternative: 'Callback'
         : Event(p), callback(callback), _name(name)
                              ^~~~~~~~
                              Callback
build/MIPS/sim/eventq.hh:814:51: error: invalid use of non-static member function 'virtual const string EventFunctionWrapper::name() const'
         : Event(p), callback(callback), _name(name)
                                                   ^
build/MIPS/sim/eventq.hh:823:5: note: declared here
     name() const
     ^~~~
build/MIPS/sim/eventq.hh:816:13: error: 'del' was not declared in this scope
         if (del)
             ^~~
build/MIPS/sim/eventq.hh: In member function 'virtual void EventFunctionWrapper::process()':
build/MIPS/sim/eventq.hh:820:22: error: 'callback' was not declared in this scope
     void process() { callback(); }
                      ^~~~~~~~
build/MIPS/sim/eventq.hh:820:22: note: suggested alternative: 'Callback'
     void process() { callback(); }
                      ^~~~~~~~
                      Callback
scons: *** [build/MIPS/dev/serial/serial.o] Error 1
scons: building terminated because of errors.

gcc & g++ versions:

gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0

Hardware:

OS: Ubuntu 17.10 x86_64
Host: XPS 15 9560
Kernel: 4.13.0-16-generic
CPU: Intel i7-7700HQ (8) @ 3.800GHz
GPU: NVIDIA GeForce GTX 1050 Mobile
GPU: Intel Integrated Graphics
Memory: 4688MiB / 15771MiB
GPU: Intel Integrated Memory: 4688MiB / 15771MiB

I tried adding

#include <functional>

to ~/gem5/build/MIPS/sim/eventq.hh after reading that gcc7 is a lot less lenient on headers than previous versions, but I am unsure if this helps as it just creates a different issue:

scons: Reading SConscript files ...
Warning: Your compiler doesn't support incremental linking and lto at the same time, so lto is being disabled. To force lto on anyway, use the --force-lto option. That will disable partial linking.
Checking for C header file Python.h... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... (cached) yes
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... (cached) yes
Checking for C library tcmalloc... (cached) yes
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None... (cached) yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) yes
Checking for C header file linux/kvm.h... (cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /home/j/gem5/build/MIPS
Using saved variables file /home/j/gem5/build/variables/MIPS
scons: done reading SConscript files.
scons: Building targets ...
 [     CXX] MIPS/dev/serial/serial.cc -> .o
 [ TRACING]  -> MIPS/debug/Terminal.hh
 [ TRACING]  -> MIPS/debug/TerminalVerbose.hh
 [SO PARAM] Platform -> MIPS/params/Platform.hh
 [SO PARAM] Terminal -> MIPS/params/Terminal.hh
 [SO PARAM] Uart -> MIPS/params/Uart.hh
 [SO PARAM] IntrControl -> MIPS/params/IntrControl.hh
 [SO PARAM] BasicPioDevice -> MIPS/params/BasicPioDevice.hh
 [SO PARAM] PioDevice -> MIPS/params/PioDevice.hh
 [GENERATE] mips -> MIPS/arch/isa_traits.hh
 [ CFG ISA]  -> MIPS/config/the_isa.hh
 [ENUMDECL] MemoryMode -> MIPS/enums/MemoryMode.hh
 [SO PARAM] System -> MIPS/params/System.hh
 [SO PARAM] MemObject -> MIPS/params/MemObject.hh
 [ENUMDECL] PwrState -> MIPS/enums/PwrState.hh
 [SO PARAM] ClockedObject -> MIPS/params/ClockedObject.hh
 [GENERATE] mips -> MIPS/arch/registers.hh
 [GENERATE] mips -> MIPS/arch/types.hh
 [SO PARAM] ClockDomain -> MIPS/params/ClockDomain.hh
 [SO PARAM] DerivedClockDomain -> MIPS/params/DerivedClockDomain.hh
 [SO PARAM] SrcClockDomain -> MIPS/params/SrcClockDomain.hh
 [SO PARAM] AbstractMemory -> MIPS/params/AbstractMemory.hh
 [SO PARAM] ThermalModel -> MIPS/params/ThermalModel.hh
 [SO PARAM] PowerModel -> MIPS/params/PowerModel.hh
 [SO PARAM] VoltageDomain -> MIPS/params/VoltageDomain.hh
 [ISA DESC] MIPS/arch/mips/isa/main.isa -> generated/decoder-g.cc.inc, generated/decoder-ns.cc.inc, generated/decode-method.cc.inc, generated/decoder.hh, generated/decoder-g.hh.inc, generated/decoder-ns.hh.inc, generated/exec-g.cc.inc, generated/exec-ns.cc.inc, generated/max_inst_regs.hh, generated/decoder.cc, generated/inst-constrs.cc, generated/generic_cpu_exec.cc
 [SO PARAM] PowerModelState -> MIPS/params/PowerModelState.hh
 [SO PARAM] SubSystem -> MIPS/params/SubSystem.hh
 [SO PARAM] ThermalDomain -> MIPS/params/ThermalDomain.hh
 [     CXX] MIPS/dev/serial/terminal.cc -> .o
 [     CXX] MIPS/dev/serial/uart.cc -> .o
 [ TRACING]  -> MIPS/debug/Uart.hh
 [SO PARAM] Uart8250 -> MIPS/params/Uart8250.hh
 [     CXX] MIPS/dev/serial/uart8250.cc -> .o
 [    LINK]  -> MIPS/dev/serial/lib.o.partial
 [GENERATE] mips -> MIPS/arch/decoder.hh
 [ENUMDECL] StaticInstFlags -> MIPS/enums/StaticInstFlags.hh
 [ENUMDECL] OpClass -> MIPS/enums/OpClass.hh
 [     CXX] MIPS/arch/generic/decode_cache.cc -> .o
 [     CXX] MIPS/arch/generic/mmapped_ipr.cc -> .o
 [GENERATE] mips -> MIPS/arch/tlb.hh
 [SO PARAM] MipsTLB -> MIPS/params/MipsTLB.hh
 [SO PARAM] BaseTLB -> MIPS/params/BaseTLB.hh
 [     CXX] MIPS/arch/generic/tlb.cc -> .o
 [     CXX] MIPS/arch/generic/pseudo_inst.cc -> .o
 [    LINK]  -> MIPS/arch/generic/lib.o.partial
 [   SLICC] src/mem/protocol/MI_example.slicc -> MIPS/mem/protocol/AccessPermission.cc, MIPS/mem/protocol/AccessPermission.hh, MIPS/mem/protocol/AccessType.cc, MIPS/mem/protocol/AccessType.hh, MIPS/mem/protocol/CacheRequestType.cc, MIPS/mem/protocol/CacheRequestType.hh, MIPS/mem/protocol/CacheResourceType.cc, MIPS/mem/protocol/CacheResourceType.hh, MIPS/mem/protocol/CoherenceRequestType.cc, MIPS/mem/protocol/CoherenceRequestType.hh, MIPS/mem/protocol/CoherenceResponseType.cc, MIPS/mem/protocol/CoherenceResponseType.hh, MIPS/mem/protocol/DMARequestMsg.cc, MIPS/mem/protocol/DMARequestMsg.hh, MIPS/mem/protocol/DMARequestType.cc, MIPS/mem/protocol/DMARequestType.hh, MIPS/mem/protocol/DMAResponseMsg.cc, MIPS/mem/protocol/DMAResponseMsg.hh, MIPS/mem/protocol/DMAResponseType.cc, MIPS/mem/protocol/DMAResponseType.hh, MIPS/mem/protocol/DMASequencerRequestType.cc, MIPS/mem/protocol/DMASequencerRequestType.hh, MIPS/mem/protocol/DMA_Controller.cc, MIPS/mem/protocol/DMA_Controller.hh, MIPS/mem/protocol/DMA_Controller.py, MIPS/mem/protocol/DMA_Event.cc, MIPS/mem/protocol/DMA_Event.hh, MIPS/mem/protocol/DMA_State.cc, MIPS/mem/protocol/DMA_State.hh, MIPS/mem/protocol/DMA_TBE.cc, MIPS/mem/protocol/DMA_TBE.hh, MIPS/mem/protocol/DMA_Transitions.cc, MIPS/mem/protocol/DMA_Wakeup.cc, MIPS/mem/protocol/DirectoryRequestType.cc, MIPS/mem/protocol/DirectoryRequestType.hh, MIPS/mem/protocol/Directory_Controller.cc, MIPS/mem/protocol/Directory_Controller.hh, MIPS/mem/protocol/Directory_Controller.py, MIPS/mem/protocol/Directory_Entry.cc, MIPS/mem/protocol/Directory_Entry.hh, MIPS/mem/protocol/Directory_Event.cc, MIPS/mem/protocol/Directory_Event.hh, MIPS/mem/protocol/Directory_State.cc, MIPS/mem/protocol/Directory_State.hh, MIPS/mem/protocol/Directory_TBE.cc, MIPS/mem/protocol/Directory_TBE.hh, MIPS/mem/protocol/Directory_Transitions.cc, MIPS/mem/protocol/Directory_Wakeup.cc, MIPS/mem/protocol/HSAScope.cc, MIPS/mem/protocol/HSAScope.hh, MIPS/mem/protocol/HSASegment.cc, MIPS/mem/protocol/HSASegment.hh, MIPS/mem/protocol/InvalidateGeneratorStatus.cc, MIPS/mem/protocol/InvalidateGeneratorStatus.hh, MIPS/mem/protocol/L1Cache_Controller.cc, MIPS/mem/protocol/L1Cache_Controller.hh, MIPS/mem/protocol/L1Cache_Controller.py, MIPS/mem/protocol/L1Cache_Entry.cc, MIPS/mem/protocol/L1Cache_Entry.hh, MIPS/mem/protocol/L1Cache_Event.cc, MIPS/mem/protocol/L1Cache_Event.hh, MIPS/mem/protocol/L1Cache_State.cc, MIPS/mem/protocol/L1Cache_State.hh, MIPS/mem/protocol/L1Cache_TBE.cc, MIPS/mem/protocol/L1Cache_TBE.hh, MIPS/mem/protocol/L1Cache_Transitions.cc, MIPS/mem/protocol/L1Cache_Wakeup.cc, MIPS/mem/protocol/LinkDirection.cc, MIPS/mem/protocol/LinkDirection.hh, MIPS/mem/protocol/LockStatus.cc, MIPS/mem/protocol/LockStatus.hh, MIPS/mem/protocol/MachineType.cc, MIPS/mem/protocol/MachineType.hh, MIPS/mem/protocol/MaskPredictorIndex.cc, MIPS/mem/protocol/MaskPredictorIndex.hh, MIPS/mem/protocol/MaskPredictorTraining.cc, MIPS/mem/protocol/MaskPredictorTraining.hh, MIPS/mem/protocol/MaskPredictorType.cc, MIPS/mem/protocol/MaskPredictorType.hh, MIPS/mem/protocol/MemoryControlRequestType.cc, MIPS/mem/protocol/MemoryControlRequestType.hh, MIPS/mem/protocol/MemoryMsg.cc, MIPS/mem/protocol/MemoryMsg.hh, MIPS/mem/protocol/MemoryRequestType.cc, MIPS/mem/protocol/MemoryRequestType.hh, MIPS/mem/protocol/MessageSizeType.cc, MIPS/mem/protocol/MessageSizeType.hh, MIPS/mem/protocol/PrefetchBit.cc, MIPS/mem/protocol/PrefetchBit.hh, MIPS/mem/protocol/RequestMsg.cc, MIPS/mem/protocol/RequestMsg.hh, MIPS/mem/protocol/RequestStatus.cc, MIPS/mem/protocol/RequestStatus.hh, MIPS/mem/protocol/ResponseMsg.cc, MIPS/mem/protocol/ResponseMsg.hh, MIPS/mem/protocol/RubyAccessMode.cc, MIPS/mem/protocol/RubyAccessMode.hh, MIPS/mem/protocol/RubyRequestType.cc, MIPS/mem/protocol/RubyRequestType.hh, MIPS/mem/protocol/SequencerMsg.cc, MIPS/mem/protocol/SequencerMsg.hh, MIPS/mem/protocol/SequencerRequestType.cc, MIPS/mem/protocol/SequencerRequestType.hh, MIPS/mem/protocol/SequencerStatus.cc, MIPS/mem/protocol/SequencerStatus.hh, MIPS/mem/protocol/SeriesRequestGeneratorStatus.cc, MIPS/mem/protocol/SeriesRequestGeneratorStatus.hh, MIPS/mem/protocol/TesterStatus.cc, MIPS/mem/protocol/TesterStatus.hh, MIPS/mem/protocol/TransitionResult.cc, MIPS/mem/protocol/TransitionResult.hh, MIPS/mem/protocol/Types.hh
MI_example-cache.sm:179: Warning: Non-void return ignored, return type is 'bool'
MI_example-cache.sm:181: Warning: Non-void return ignored, return type is 'bool'
MI_example-cache.sm:336: Warning: Non-void return ignored, return type is 'Tick'
MI_example-cache.sm:350: Warning: Non-void return ignored, return type is 'Scalar'
MI_example-cache.sm:354: Warning: Non-void return ignored, return type is 'Scalar'
MI_example-dir.sm:183: Warning: Non-void return ignored, return type is 'bool'
MI_example-dir.sm:398: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dir.sm:402: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dir.sm:482: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dir.sm:277: Warning: Unused action: a_sendWriteBackAck, Send writeback ack to requestor
MI_example-dma.sm:189: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dma.sm:193: Warning: Non-void return ignored, return type is 'Tick'
 [     CXX] MIPS/mem/ruby/profiler/AccessTraceForAddress.cc -> .o
 [MAKE INC] MIPS/mem/ruby/slicc_interface/Message.hh -> protocol/Message.hh
 [SO PARAM] RubySystem -> MIPS/params/RubySystem.hh
 [SO PARAM] RubyController -> MIPS/params/RubyController.hh
 [ TRACING]  -> MIPS/debug/RubyQueue.hh
 [SO PARAM] MessageBuffer -> MIPS/params/MessageBuffer.hh
 [SO PARAM] SimpleMemory -> MIPS/params/SimpleMemory.hh
 [MAKE INC] MIPS/mem/ruby/slicc_interface/RubyRequest.hh -> protocol/RubyRequest.hh
 [     CXX] MIPS/mem/ruby/profiler/AddressProfiler.cc -> .o
 [SO PARAM] RubyNetwork -> MIPS/params/RubyNetwork.hh
 [SO PARAM] RubySequencer -> MIPS/params/RubySequencer.hh
 [SO PARAM] RubyCache -> MIPS/params/RubyCache.hh
 [SO PARAM] RubyPort -> MIPS/params/RubyPort.hh
 [SO PARAM] BasicExtLink -> MIPS/params/BasicExtLink.hh
 [SO PARAM] BasicIntLink -> MIPS/params/BasicIntLink.hh
 [SO PARAM] BasicLink -> MIPS/params/BasicLink.hh
 [SO PARAM] ReplacementPolicy -> MIPS/params/ReplacementPolicy.hh
 [SO PARAM] BasicRouter -> MIPS/params/BasicRouter.hh
 [SO PARAM] RubyDirectoryMemory -> MIPS/params/RubyDirectoryMemory.hh
 [     CXX] MIPS/mem/ruby/profiler/Profiler.cc -> .o
 [     CXX] MIPS/mem/ruby/profiler/StoreTrace.cc -> .o
 [    LINK]  -> MIPS/mem/ruby/profiler/lib.o.partial
 [GENERATE] mips -> MIPS/arch/utility.hh
 [ TRACING]  -> MIPS/debug/Branch.hh
 [SO PARAM] BranchPredictor -> MIPS/params/BranchPredictor.hh
 [     CXX] MIPS/cpu/pred/bpred_unit.cc -> .o
 [ TRACING]  -> MIPS/debug/Fetch.hh
 [SO PARAM] LocalBP -> MIPS/params/LocalBP.hh
 [     CXX] MIPS/cpu/pred/2bit_local.cc -> .o
 [     CXX] MIPS/cpu/pred/btb.cc -> .o
 [ TRACING]  -> MIPS/debug/Indirect.hh
 [     CXX] MIPS/cpu/pred/indirect.cc -> .o
 [     CXX] MIPS/cpu/pred/ras.cc -> .o
 [SO PARAM] TournamentBP -> MIPS/params/TournamentBP.hh
 [     CXX] MIPS/cpu/pred/tournament.cc -> .o
 [SO PARAM] BiModeBP -> MIPS/params/BiModeBP.hh
 [     CXX] MIPS/cpu/pred/bi_mode.cc -> .o
 [ TRACING]  -> MIPS/debug/LTage.hh
 [SO PARAM] LTAGE -> MIPS/params/LTAGE.hh
 [     CXX] MIPS/cpu/pred/ltage.cc -> .o
 [    LINK]  -> MIPS/cpu/pred/lib.o.partial
 [ TRACING]  -> MIPS/debug/TraceCPUData.hh
 [ TRACING]  -> MIPS/debug/TraceCPUInst.hh
 [SO PARAM] TraceCPU -> MIPS/params/TraceCPU.hh
 [  PROTOC] MIPS/proto/inst_dep_record.proto -> MIPS/proto/inst_dep_record.pb.cc, MIPS/proto/inst_dep_record.pb.h
 [  PROTOC] MIPS/proto/packet.proto -> MIPS/proto/packet.pb.cc, MIPS/proto/packet.pb.h
 [GENERATE] mips -> MIPS/arch/interrupts.hh
 [GENERATE] mips -> MIPS/arch/microcode_rom.hh
 [ TRACING]  -> MIPS/debug/Mwait.hh
 [SO PARAM] BaseCPU -> MIPS/params/BaseCPU.hh
 [SO PARAM] MipsInterrupts -> MIPS/params/MipsInterrupts.hh
 [ TRACING]  -> MIPS/debug/MipsPRA.hh
 [SO PARAM] InstTracer -> MIPS/params/InstTracer.hh
 [SO PARAM] MipsISA -> MIPS/params/MipsISA.hh
 [SO PARAM] Process -> MIPS/params/Process.hh
 [SO PARAM] EmulatedDriver -> MIPS/params/EmulatedDriver.hh
 [     CXX] MIPS/cpu/trace/trace_cpu.cc -> .o
 [    LINK]  -> MIPS/cpu/trace/lib.o.partial
 [     CXX] MIPS/sim/arguments.cc -> .o
 [     CXX] MIPS/sim/async.cc -> .o
 [     CXX] MIPS/sim/backtrace_glibc.cc -> .o
 [     CXX] MIPS/sim/core.cc -> .o
 [VER TAGS]  -> MIPS/sim/tags.cc
 [     CXX] MIPS/sim/tags.cc -> .o
 [     CXX] MIPS/sim/cxx_config.cc -> .o
 [ TRACING]  -> MIPS/debug/CxxConfig.hh
 [     CXX] MIPS/sim/cxx_manager.cc -> .o
 [     CXX] MIPS/sim/cxx_config_ini.cc -> .o
 [     CXX] MIPS/sim/debug.cc -> .o
 [     CXX] MIPS/sim/py_interact.cc -> .o
 [ TRACING]  -> MIPS/debug/Checkpoint.hh
 [     CXX] MIPS/sim/eventq.cc -> .o
 [     CXX] MIPS/sim/global_event.cc -> .o
 [CONFIG H] HAVE_PROTOBUF, 1 -> MIPS/config/have_protobuf.hh
 [     CXX] MIPS/sim/init.cc -> .o
 [     CXX] MIPS/sim/init_signals.cc -> .o
 [ TRACING]  -> MIPS/debug/TimeSync.hh
 [SO PARAM] Root -> MIPS/params/Root.hh
 [     CXX] MIPS/sim/root.cc -> .o
 [     CXX] MIPS/sim/serialize.cc -> .o
 [ TRACING]  -> MIPS/debug/Drain.hh
 [     CXX] MIPS/sim/drain.cc -> .o
 [     CXX] MIPS/sim/sim_events.cc -> .o
 [     CXX] MIPS/sim/sim_object.cc -> .o
 [     CXX] MIPS/sim/sub_system.cc -> .o
 [SO PARAM] TickedObject -> MIPS/params/TickedObject.hh
 [     CXX] MIPS/sim/ticked_object.cc -> .o
 [     CXX] MIPS/sim/simulate.cc -> .o
 [     CXX] MIPS/sim/stat_control.cc -> .o
 [     CXX] MIPS/sim/stat_register.cc -> .o
 [ TRACING]  -> MIPS/debug/ClockDomain.hh
 [     CXX] MIPS/sim/clock_domain.cc -> .o
 [ TRACING]  -> MIPS/debug/VoltageDomain.hh
 [     CXX] MIPS/sim/voltage_domain.cc -> .o
 [     CXX] MIPS/sim/se_signal.cc -> .o
 [     CXX] MIPS/sim/linear_solver.cc -> .o
 [GENERATE] mips -> MIPS/arch/remote_gdb.hh
 [CONFIG H] USE_KVM, 0 -> MIPS/config/use_kvm.hh
 [ TRACING]  -> MIPS/debug/Loader.hh
 [ TRACING]  -> MIPS/debug/WorkItems.hh
 [CONFIG H] HAVE_PERF_ATTR_EXCLUDE_HOST, 1 -> MIPS/config/have_perf_attr_exclude_host.hh
 [GENERATE] mips -> MIPS/arch/isa.hh
 [ TRACING]  -> MIPS/debug/CCRegs.hh
 [ TRACING]  -> MIPS/debug/FloatRegs.hh
 [ TRACING]  -> MIPS/debug/IntRegs.hh
 [ TRACING]  -> MIPS/debug/VecRegs.hh
 [GENERATE] mips -> MIPS/arch/stacktrace.hh
 [ TRACING]  -> MIPS/debug/Stack.hh
 [     CXX] MIPS/sim/system.cc -> .o
 [ TRACING]  -> MIPS/debug/DVFS.hh
 [SO PARAM] DVFSHandler -> MIPS/params/DVFSHandler.hh
 [     CXX] MIPS/sim/dvfs_handler.cc -> .o
 [     CXX] MIPS/sim/clocked_object.cc -> .o
 [     CXX] MIPS/sim/mathexpr.cc -> .o
 [     CXX] MIPS/sim/aux_vector.cc -> .o
 [ TRACING]  -> MIPS/debug/Fault.hh
 [     CXX] MIPS/sim/faults.cc -> .o
 [     CXX] MIPS/sim/process.cc -> .o
 [     CXX] MIPS/sim/fd_array.cc -> .o
build/MIPS/sim/fd_array.cc: In member function 'void FDArray::restoreFileOffsets()':
build/MIPS/sim/fd_array.cc:139:5: internal compiler error: in assign_temp, at function.c:968
     };
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
scons: *** [build/MIPS/sim/fd_array.o] Error 1
scons: building terminated because of errors.

I have also attempted using gcc-6 insead of the ubuntu 17.10 default of 7.2, and received complaints that scrons does not trust anything but default gcc and clang.

like image 969
jlc Avatar asked Nov 08 '22 14:11

jlc


1 Answers

This was raised on the mailing list today: https://www.mail-archive.com/[email protected]/msg15116.html

One workaround that does not require modifying the code is:

sudo apt-get install g++-6 gcc-6
CC=gcc-6 CXX=g++-6 scons

Also:

  • there is already a related fix at: https://github.com/gem5/gem5/commit/5c41076bd7610d03431fd0dd89bd0fdc7f30d6bd
  • there is a pending patch that tries to fix some further errors: https://gem5-review.googlesource.com/c/public/gem5/+/8541
like image 195
Ciro Santilli Avatar answered Nov 10 '22 06:11

Ciro Santilli