尝试在ubuntu 22上构建Gem5:本机elf格式:权限被拒绝或未找到

lmvvr0a8  于 2023-03-29  发布在  其他
关注(0)|答案(1)|浏览(195)

我第一次尝试Gem 5,我使用X1 E0 F1 X作为指南。我有一个双 Boot 系统(Windows 11和Ubuntu 22. 04. 2),我在Ubuntu上这样做。
当我走到这一步

python3 `which scons` build/X86/gem5.opt -j9

我遇到一个错误,终止了建筑。

scons: Building targets ...
 [VER TAGS]  -> X86/sim/tags.cc
/usr/bin/env: ‘python3\r’: No such file or directory
 [     CXX] X86/sim/root.cc -> .o
 [     CXX] X86/sim/sim_object.cc -> .o
 [     CXX] X86/sim/sub_system.cc -> .o
 [     CXX] X86/sim/ticked_object.cc -> .o
 [     CXX] X86/sim/simulate.cc -> .o
 [     CXX] X86/sim/stat_control.cc -> .o
 [     CXX] X86/sim/stat_register.cc -> .o
scons: *** [build/X86/sim/tags.cc] Error 127
 [ TRACING]  -> X86/debug/ClockDomain.hh
scons: building terminated because of errors.

我搜索了一下,发现了一些关于链接到python目录和从CRLF和LF更改的东西,但我不知道发生了什么,我应该怎么做。
任何帮助都是感激的!

**更新:**Barmar是对的。我用了

dos2unix cpt_upgrader.py

而且已经修好了。但是我遇到了另一个问题:(

scons: Building targets ...
 [VER TAGS]  -> X86/sim/tags.cc
build/X86/ext/libelf/native-elf-format > build/X86/ext/libelf/native-elf-format.h
/tmp/tmpiwxnwoqi: 1: build/X86/ext/libelf/native-elf-format: Permission denied
 [    SHCC] X86/ext/softfloat/f64_to_i64_r_minMag.c -> .os
 [    SHCC] X86/ext/softfloat/f64_to_ui32.c -> .os
 [    SHCC] X86/ext/softfloat/f64_to_ui32_r_minMag.c -> .os
 [    SHCC] X86/ext/softfloat/f64_to_ui64.c -> .os
 [    SHCC] X86/ext/softfloat/f64_to_ui64_r_minMag.c -> .os
 [    SHCC] X86/ext/softfloat/i32_to_f128.c -> .os
 [    SHCC] X86/ext/softfloat/i32_to_f16.c -> .os
scons: *** [build/X86/ext/libelf/native-elf-format.h] Error 126
scons: building terminated because of errors.

它说“native-elf-format.h”没有执行权限。当我给予权限时,它说:

scons: Building targets ...
 [VER TAGS]  -> X86/sim/tags.cc
build/X86/ext/libelf/native-elf-format > build/X86/ext/libelf/native-elf-format.h
/tmp/tmpu4ahur8f: 1: build/X86/ext/libelf/native-elf-format: not found
 [    SHCC] X86/ext/softfloat/f64_classify.c -> .os
 [    SHCC] X86/ext/softfloat/f64_div.c -> .os
 [    SHCC] X86/ext/softfloat/f64_eq.c -> .os
 [    SHCC] X86/ext/softfloat/f64_eq_signaling.c -> .os
 [    SHCC] X86/ext/softfloat/f64_isSignalingNaN.c -> .os
 [    SHCC] X86/ext/softfloat/f64_le.c -> .os
 [    SHCC] X86/ext/softfloat/f64_le_quiet.c -> .os
scons: *** [build/X86/ext/libelf/native-elf-format.h] Error 127
scons: building terminated because of errors.

有什么想法吗

egmofgnx

egmofgnx1#

我找到了解决方案!我使用了this link,并在存储库中的所有文件上运行了dos 2unix。

相关问题