Hello Abdelrahman,

Unfortunately, it's incredibly difficult to keep the development
environment for older versions of gem5 working. You may be able to find an
old dockerfile in those gem5 repositories that could help to recreate the
build environment. (I'm not sure if we were using docker at the time or
not.)

Another thing you can try is specifying a python version when running
scons. You can use
```
python2 `which scons` build/X86_MESI_Two_Level/gem5.opt
```
That should force scons to use python2. However, you might find that the
scons version that you installed only works with python3. Again, it's
really hard to get these older gem5's to build on modern systems.

If those two ideas don't work, a final suggestion would be to create a
docker container (or install) Ubuntu 16.04 and try with that. 16.04
should have everything python2 by default.

Good luck!

Cheers,
Jason

On Tue, Mar 22, 2022 at 3:19 AM Abdelrahman S. Hussein via gem5-users <
gem5-users@gem5.org> wrote:

> Hello,
>
> I am trying to build older version(s) of gem5 (specifically, the ones used
> for InvisiSpec and STT). I understand that this version of gem5 requires
> python2, thus, I build a virtual environment based on python2 and
> re-installed scons. However, when I run this command:
> scons build/X86_MESI_Two_Level/gem5.opt -j16
>
> I got the following error:
>
> AttributeError: 'NoneType' object has no attribute 'group':
>   File "stt/SConstruct", line 435:
>     *if not as_version or compareVersions(as_version, "2.23") < 0:*
>   File "stt/src/python/m5/util/__init__.py", line 133:
>     v1 = make_version_list(v1)
>   File "stt/src/python/m5/util/__init__.py", line 127:
>     return map(lambda x: int(re.match('\d+', x).group()), v.split('.'))
>   File "stt/src/python/m5/util/__init__.py", line 127:
>     return map(lambda x: int(re.match('\d+', x).group()), v.split('.'))
>
> Same with InvisiSpec.
>
> Before line 435@stt/SConstruct, which is underlined above, line 433 has
> the following:
> as_version = as_version_raw[-1].split('-')[0] if as_version_raw else None
>
> When I printed as_version, its value was:
> same
>
> How can I solve this problem? Or, what further information do you need me
> to share?
>
> Thank you!
>
> --
>
> *Best,Abdelrahman Hussein*
> _______________________________________________
> 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