So I was trying to set up gem5 with the RISC-V with the following command:
sudo scons build/RISCV/gem5.opt -j 13( I hacce 12 CPU's )
This was inside gem5 file I cloned from a youtube video, in fact I was following his instructions, here is the link
https://www.youtube.com/watch?v=hMj-GB8BTd4
The error I get is the following:
build/RISCV/base/inet.hh:355:45: error: taking address of packed member of 'ip_opt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
355 | const uint32_t *addext() const { return &opt_data.addext[0]; }
and after that I get the following
scons: *** [build/RISCV/python/swig/pyobject.o] Error 1
scons: building terminated because of errors.
I tried using build-essentials and I tried to install the dependencies with the following command but did not work
apt-get install git build-essential python-dev scons swig m4 zlib1g-dev
So my dear friends, I got the solution, but the problem itself was really hard the occur in first place, in order to problem to occur, you shouldn't be cloning the repo from the link I gave in the problem. I think the repo has some unfinished parts, so you should clone the repo from official gem5 cite, and you should be fine I suppose!