Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build no longer works since Python3 is required #3

Open
kassieclaire opened this issue Nov 8, 2022 · 0 comments
Open

Build no longer works since Python3 is required #3

kassieclaire opened this issue Nov 8, 2022 · 0 comments

Comments

@kassieclaire
Copy link

kassieclaire commented Nov 8, 2022

The following error occurs as a result of Python 2.7 being used for scons when Python 3.6 or newer scons must be used:

command from script:
"scons build/ARM/arch/arm/generated/inst-constrs-3.o"

Error:
Python 3.6 or greater required, but you have Python 2.7.17

Python 3 is now required.

The following are steps to compile gem5 in Python 3 environment,

Step 1: ensure Python 3 is installed. On Ubuntu like systems, you can try this command:

sudo apt-get install python3 python-is-python3 python3-pydot

To run Python 3 from a container, you can try the Docker files in util/dockerfiles folder.

Step 2: ensure that scons is run in the Python 3 environment. If scons isn't run automatically with Python 3, you can force it by replacing scons by the following phrase,

/usr/bin/env python3 $(which scons)

For example, the following command will let scons compile gem5/X86 in the Python 3 environment,

/usr/bin/env python3 $(which scons) build/X86/gem5.opt

(Optional) For convenience reasons, you can set up an alias for the Python3 scons phrase in your environment.

Fix
Make sure that python3 is installed in the docker image and that the specific scons used is for python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant