尝试在util/tlm中执行scons时出现编译错误



我试图遵循util/tlm下的README。以下是完成的步骤:

  1. 您构建/胳膊/gem5。opt -completed
  2. scons——with-cxx-config——without-python——without-tcmalloc USE_SYSTEMC=0 build/ARM/libgem5_opt。so -completed
  3. cd util/tlm
  4. scons -error

当我在util/tlm内执行scons时,我看到以下错误:

scons: Reading SConscript files ...
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/tlm/sc_master_port.o -c -std=c++17 -DSC_INCLUDE_DYNAMIC_PROCESSES -DTRACING_ON -I/home/gem5/build/ARM -I/home/gem5/util/systemc/gem5_within_systemc -I/home/gem5/ext/systemc/src -Isrc -Iexamples/common build/tlm/sc_master_port.cc
build/tlm/sc_master_port.cc: In member function 'void Gem5SystemC::SCMasterPort::b_transport(tlm::tlm_generic_payload&, sc_core::sc_time&)':
build/tlm/sc_master_port.cc:278:32: error: 'gem5::sim_clock' has not been declared
(double)(ticks / gem5::sim_clock::as_int::ps), sc_core::SC_PS);
^~~~~~~~~
scons: *** [build/tlm/sc_master_port.o] Error 1
scons: building terminated because of errors.

你能帮我解决这个问题吗?

对于上述错误,我在文件"util/tlm/src/sc_master_port.cc"中添加了#include "sim/core.hh"。在几个不同的文件中有一些命名空间错误,我通过添加"using namespace gem5">

最新更新