If I remember correctly, this is because there is a mistake in the way the
cxx config support handles Param structs and SimObjects that works most of
the time, but fails when it encounters some of the tricks necessary for
gem5's built in systemc kernel. If you disable that (USE_SYSTEMC=False, I
think), then it will leave out that code and should build successfully. If
you plan to use gem5 as a library with other systemc code, for instance as
a black box within a simulation that uses Accellera's systemc kernel, then
you'll want to turn off gem5's built in systemc kernel anyway, since it
would conflict with the other one and wouldn't link properly.

Gabe

On Thu, Nov 19, 2020 at 3:09 AM Michele Marazzi via gem5-dev <
[email protected]> wrote:

> Dear gem5 folks,
>
> I am trying to compile the most updated (master) version of gem5 as a
> library. (note: I've also tried the same with the develop branch,
> hoping it would work).
>
> The architecture I need is x86, so I simply run:
>
> > scons --no-cache --with-cxx-config --without-python --without-tcmalloc
> build/X86/libgem5_opt.so -j 2
>
> After I have - successfully - compiled gem5 with only
>
> > scons build/X86/gem5.opt -j 2
>
> No matter what different configurations of compilers/python checkout I
> use, if I keep the flag --with-cxx-config, the compilation results in
> the following error:
>
>  [   SHCXX] X86/cxx_config/Gem5ToTlmBridge32.cc -> .os
> build/X86/cxx_config/Gem5ToTlmBridge32.cc: In member function 'virtual
> SimObject* Gem5ToTlmBridge32CxxConfigParams::simObjectCreate()':
> build/X86/cxx_config/Gem5ToTlmBridge32.cc:136:25: error: cannot
> convert 'sc_gem5::Gem5ToTlmBridge<32>*' to 'SimObject*' in return
>      return this->create();
>                          ^
>  [   SHCXX] X86/cxx_config/Gem5ToTlmBridge64.cc -> .os
> scons: *** [build/X86/cxx_config/Gem5ToTlmBridge32.os] Error 1
> build/X86/cxx_config/Gem5ToTlmBridge64.cc: In member function 'virtual
> SimObject* Gem5ToTlmBridge64CxxConfigParams::simObjectCreate()':
> build/X86/cxx_config/Gem5ToTlmBridge64.cc:136:25: error: cannot
> convert 'sc_gem5::Gem5ToTlmBridge<64>*' to 'SimObject*' in return
>      return this->create();
>                          ^
>
> I'm running Ubuntu 18.
>
> user@pc-10744:~/gem5$ uname -a
> Linux pc-10744 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC
> 2020 x86_64 x86_64 x86_64 GNU/Linux
>
> I have tried gcc version 7.5 and 9.3, python is version 3.8.5
>
> Is there any way of fixing this? Do you have any suggestion, or thing to
> try?
>
> Thank you very much for your time
> Michele
> _______________________________________________
> gem5-dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to