运行GEM5的问题:Gem5.opt ISN不在运行后产生/usr/bin/env Python3.9 $(scons)build/riscv/gem5.opt -no -pie

发布于 2025-01-22 11:14:15 字数 1028 浏览 4 评论 0原文

我正在尝试在Ubuntu上为RISCV设置Gem5 18.04。我首先运行以下命令:

sudo apt install build-essential
apt install m4 zlib1g-dev scons python-six python-dev
git clone https://gem5.googlesource.com/public/gem5

然后我尝试运行以下命令:

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

一切都可以完美地启动,但后来有一个错误,没有工作的python环境。因此,我必须在第521行上的Gem5目录下编辑文件sconstruction从:

py_version = conf.CheckPythonLib()

到:

vi = sys.version_info
py_version = (vi.major, vi.minor, vi.micro)

这样做之后,它开始工作,但随后对Pie对象抱怨:

/usr/bin/ld: /usr/local/lib/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.a(myreadline.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC

因此,我终于使用以下命令运行了它,没有完成它任何错误:

/usr/bin/env python3.9 $(which scons) build/RISCV/gem5.opt -no-pie

但是,我找不到build/riscv下的gem5.opt,因此无法运行GEM5。如果有人有任何建议可以解决这个问题,我将非常感谢。谢谢你!

I am trying to set up gem5 for RISCV on Ubuntu 18.04. I first ran the following commands:

sudo apt install build-essential
apt install m4 zlib1g-dev scons python-six python-dev
git clone https://gem5.googlesource.com/public/gem5

Then I tried running the following command:

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

Everything starts perfectly but then it gives an error that there is no working python environment. So, I had to edit the file SConstruct under gem5 directory on line 521 from:

py_version = conf.CheckPythonLib()

to:

vi = sys.version_info
py_version = (vi.major, vi.minor, vi.micro)

After I did this, it started to work but it then complained about PIE objects:

/usr/bin/ld: /usr/local/lib/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.a(myreadline.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC

So, I finally ran it with the following command and it finished without any errors:

/usr/bin/env python3.9 $(which scons) build/RISCV/gem5.opt -no-pie

However, I can not find gem5.opt under build/RISCV and therefore can not run gem5. I would really appreciate it if anyone has any suggestion that might fix the issue. Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文