I just built the gem5 library following the instructions in the README and
it built fine. What namespace errors did you see? That sounds to me like
some part of your code base isn't up to date, since gem5 reworked its
namespaces a little while ago. I do see that the errors in your
undefined-refence-error.txt were for the RISCV build of gem5, and not the
ARM version like you have above.

When you build gem5 to integrate into systemc, then you need to enable CXX
configuration since it won't be able to run python to set up the
simulation, and you need to disable the internal systemc kernel with
USE_SYSTEMC=0, since it will conflict with the external one otherwise.

I have no idea what's causing that run time error.

Gabe

On Tue, Mar 22, 2022 at 2:32 AM Peng, Ziyang via gem5-users <
gem5-users@gem5.org> wrote:

> Hi,
>
> I am working on combine external sc_models to Gem5. So I try to follow the
> tlm tutorial in gem5/util/tlm/README.
>
> Following the building steps in the REDME file, there is no issue on the
> first two line and end with normal gem5.opt output:
>
> >cd ../../
>
> >/usr/bin/env python3 `which scons` build/ARM/gem5.opt
>
>
>
> During the next command, serval error reported such as namespace error.
> After I fixed them, the shared library can be generated correctly, but new
> link errors happened in next command. (See undefined-reference-error.txt)
>
> > scons --with-cxx-config --without-python --without-tcmalloc
> USE_SYSTEMC=0 build/ARM/libgem5_opt.so
>
> > cd util/tlm && /usr/bin/env python3 `which scons`
>
>
>
> I tried hard walking arround and have no ideal on how to get throught. In
> README, it told me –with-cxx-config and USE_SYSTEMC are mutually exclusive.
> So I tried build libgemt5_opt.so in this command, and build util/tlm again.
> It passed build.
>
> > scons  --without-tcmalloc USE_SYSTEMC=1 build/ARM/libgem5_opt.so
>
> > cd util/tlm && /usr/bin/env python3 `which scons`
>
> (I also updated util/tlm/src/sim_control.cc, comment line76:
>  gem5::cxxConfigInit();)
>
>
>
> Gem5.sc which should be the target file for scons is generated. So I moved
> to next step.
>
> > ../../build/ARM/gem5.opt conf/tlm_{master,slave}.py
>
> > build/examples/{master,slave}_port/gem5.sc m5out/config.ini -e 1000000
>
>
>
> Then I meet a new question, here is the output: (see run-time-error.txt
> for detail)
>
>  EventQueue Dump  (cycle 0)
>
> ------------------------------------------------------------
>
> <No Events>
>
> ============================================================
>
> Config problem in sim object root: Can't find sim object
>
> double free or corruption (fasttop)
>
> Program aborted at tick 0 --- END LIBC BACKTRACE ---
>
> Aborted
>
> --- BEGIN LIBC BACKTRACE ---
>
> …
>
> --- END LIBC BACKTRACE ---
>
> Aborted
>
>
>
> I think it might be caused by cxx-config is disabled? But I have no ideal to 
> fix it. I guess it may be a common issue for those who’s trying to get 
> through this tutorial. Any advice on using the tlm utility of Gem5 will be 
> great helpful.
>
>
>
> Thanks + regards,
>
>
>
>
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to