2

I was helping my friend installing gem5 simulator on Linux for thesis work. I know Linux a little bit. Somehow I managed to install that simulator on my laptop with Ubuntu 12.04, but when I tried to install that simulator on her laptop it didn't go well. I gave the same commands on her laptop but it gave this error.

$ scons build/ALPHA/gem5.opt
scons: Reading SConscript files ...
Error Don't know what compiler options to use for your compiler.
compiler: None
version: COMMAND NOT FOUND!
If you're trying to use a compiler other than GCC
or clang, there appears to be something wrong with your
environment.

If you are trying to use a compiler other than those listed
above you will need to ease fix SConstruct and 
src/SConscript to support that compiler.

I tried same commands to install gem5 simulator by re installing ubuntu on her laptop. But same error. Then I tried on Linux Mint 15 and Fedora but got the same error. What am I doing wrong? Can somebody provide step by step guide to perform installation of gem5 simulator or can anybody can provide me a .deb file of it?

If not please at-least guide me how to create deb file of that sim, but please consider my skills are of beginner's level.

1
  • I believe you have to install gcc-arm-linux-gnueabi and libc6-dev-armel-cross before.
    – Braiam
    Sep 26, 2013 at 18:58

4 Answers 4

1

This worked for me !! Thanks !!!

 sudo apt-get install swig gcc m4 python python-dev libgoogle-perftools-dev mercurial scons g++ build-essential
 hg clone http://repo.gem5.org/gem5
 cd gem5/
 scons build/ARM/gem5.opt -j2
 build/ARM/gem5.opt configs/example/se.py -c tests/test-progs/hello/bin/arm/linux/hel­lo
1
1-sudo apt-get update
2-sudo apt-get install swig gcc m4 python python-dev libgoogle-perftools-dev  g++  scons  mercurial  zlib1g-dev protobuf-compiler libprotobuf-dev
3-hg clone http://repo.gem5.org/gem5
4-cd gem5/
5-scons build/ARM/gem5.opt

in 5 instruction You can type(SPARC,Alpha,...) or other
if 5's step was OK that's means is your installation is complete. good Lucks

1

Have a look at the gem5 in-tree Docker files used in the CI tests

gem5 currently runs precommits with Docker and an in-tree Dockerfile, so I don't think anything can be more reliable than looking at those.

E.g.: the logs of this precommit run say:

latest: Pulling from gem5-test/ubuntu-20.04_all-dependencies

and in-tree we see the corresponding Dockerfile which contains the packages it depends on:

RUN apt -y install build-essential git m4 scons zlib1g zlib1g-dev \
    libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev \
    python3-dev python3-six python-is-python3 doxygen libboost-all-dev \
    libhdf5-serial-dev python3-pydot libpng-dev libelf-dev

Then the usual build command such as:

scons -j`nproc` build/ARM/gem5.opt

Of course, building gem5 itself is the easy part. Much harder potentially will be to setup your test content of interest. Here are some pointers:

1
  • 1
    Thanks for valuable info. Oct 26, 2020 at 0:29
0

Well I checked out the dev tree and ran scons and it just worked™. I would guess from the error you're seeing that means you don't have a compiler (scons is only a replacement for make, not gcc). This is where reading the README file or the dependencies page comes in handy.

sudo apt-get install build-essential scons swig zlib1g-dev m4 protobuf{-c,}-compiler

I compile other stuff, so apart from scons I was already good to go.

1
  • I think when I tried this software years ago, there was not much documentation. Thanks for your suggestion, I will keep this in mind. ;) Oct 26, 2020 at 0:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .