构建失败的GEM5,当文件存在时找不到错误文件

发布于 2025-01-29 13:26:42 字数 4731 浏览 2 评论 0 原文

当我尝试在WSL2 Ubuntu_20.04上构建GEM5时,它失败了。

我在此 SCONS构建/x86/gem5.opt -j9

构建失败了:

scons: Reading SConscript files ...
Checking for linker -Wl,--as-needed support... (cached) yes
Checking for compiler -Wno-free-nonheap-object support... (cached) yes
Checking for compiler -gz support... (cached) yes
Checking for linker -gz support... (cached) yes
Info: Using Python config: python3-config
Checking for C header file Python.h... (cached) yes
Checking Python version... (cached) 3.8.10
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for C library tcmalloc... (cached) yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) no
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for C header file valgrind/valgrind.h... (cached) no
Warning: Deprecated namespaces are not supported by this compiler.
         Please make sure to check the mailing list for deprecation announcements.
Checking for H5Fcreate("", 0, 0, 0) in C library hdf5... (cached) no
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.
Checking for C header file linux/kvm.h... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking for shm_open("/test", 0, 0) in C library None... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... (cached) yes
Checking for char temp; backtrace_symbols_fd((void *)&temp, 0, 0) in C library None... (cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /root/gem5/build/X86
Using saved variables file /root/gem5/build/variables/X86
Checking for compiler -Wno-self-assign-overloaded support... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
 [     CXX] X86/mem/ruby/protocol/DMA_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/DMA_Wakeup.cc -> .o
 [     CXX] X86/mem/ruby/protocol/Directory_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/Directory_Wakeup.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L1Cache_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L1Cache_Wakeup.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L2Cache_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L2Cache_Wakeup.cc -> .o
 [VER TAGS]  -> X86/sim/tags.cc
build/libelf/native-elf-format > build/libelf/native-elf-format.h
: not foundf/native-elf-format: 10:
: not foundf/native-elf-format: 14:
: bad trap
: not foundf/native-elf-format: 16:
: not foundf/native-elf-format: 18:
: not foundf/native-elf-format: 20:
: No such file or directory
cc: fatal error: no input files
compilation terminated.
: Failed to read file's magic number
: not foundf/native-elf-format: 55:
scons: *** [build/libelf/native-elf-format.h] Error 127
 [      AR]  -> libfdt/libfdt.a
 [  RANLIB]  -> libfdt/libfdt.a
scons: building terminated because of errors.
*** Summary of Warnings ***
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Warning: Deprecated namespaces are not supported by this compiler.
         Please make sure to check the mailing list for deprecation announcements.
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.

但是当我检查错误文件IE build> build/libelf/libelf/andation-format 时,它存在于事实。

root@REALME-NUT:~/gem5# ls ./build/libelf | grep native
native-elf-format
native-elf-format.h

我的环境如下:

Ubuntu-20.04 on wsl2 win11
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
SCons by Steven Knight et al.:
        script: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
        engine: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
        engine path: ['/usr/lib/scons/SCons']
Copyright (c) 2001 - 2019 The SCons Foundation

也许有人有相同或相似的问题?

如果您能提供帮助,我将不胜感激。

:)

When I try to build gem5 on wsl2 Ubuntu_20.04, it failed.

I use the steps in this page, and after I command the
scons build/X86/gem5.opt -j9

The build failed with:

scons: Reading SConscript files ...
Checking for linker -Wl,--as-needed support... (cached) yes
Checking for compiler -Wno-free-nonheap-object support... (cached) yes
Checking for compiler -gz support... (cached) yes
Checking for linker -gz support... (cached) yes
Info: Using Python config: python3-config
Checking for C header file Python.h... (cached) yes
Checking Python version... (cached) 3.8.10
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for C library tcmalloc... (cached) yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) no
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for C header file valgrind/valgrind.h... (cached) no
Warning: Deprecated namespaces are not supported by this compiler.
         Please make sure to check the mailing list for deprecation announcements.
Checking for H5Fcreate("", 0, 0, 0) in C library hdf5... (cached) no
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.
Checking for C header file linux/kvm.h... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking for shm_open("/test", 0, 0) in C library None... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... (cached) yes
Checking for char temp; backtrace_symbols_fd((void *)&temp, 0, 0) in C library None... (cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /root/gem5/build/X86
Using saved variables file /root/gem5/build/variables/X86
Checking for compiler -Wno-self-assign-overloaded support... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
 [     CXX] X86/mem/ruby/protocol/DMA_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/DMA_Wakeup.cc -> .o
 [     CXX] X86/mem/ruby/protocol/Directory_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/Directory_Wakeup.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L1Cache_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L1Cache_Wakeup.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L2Cache_Controller.cc -> .o
 [     CXX] X86/mem/ruby/protocol/L2Cache_Wakeup.cc -> .o
 [VER TAGS]  -> X86/sim/tags.cc
build/libelf/native-elf-format > build/libelf/native-elf-format.h
: not foundf/native-elf-format: 10:
: not foundf/native-elf-format: 14:
: bad trap
: not foundf/native-elf-format: 16:
: not foundf/native-elf-format: 18:
: not foundf/native-elf-format: 20:
: No such file or directory
cc: fatal error: no input files
compilation terminated.
: Failed to read file's magic number
: not foundf/native-elf-format: 55:
scons: *** [build/libelf/native-elf-format.h] Error 127
 [      AR]  -> libfdt/libfdt.a
 [  RANLIB]  -> libfdt/libfdt.a
scons: building terminated because of errors.
*** Summary of Warnings ***
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Warning: Deprecated namespaces are not supported by this compiler.
         Please make sure to check the mailing list for deprecation announcements.
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.

But when I check the error file i.e. build/libelf/native-elf-format, it exists in fact.

root@REALME-NUT:~/gem5# ls ./build/libelf | grep native
native-elf-format
native-elf-format.h

And my environment is as followed:

Ubuntu-20.04 on wsl2 win11
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
SCons by Steven Knight et al.:
        script: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
        engine: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
        engine path: ['/usr/lib/scons/SCons']
Copyright (c) 2001 - 2019 The SCons Foundation

Maybe anyone has the same or similar problem?

If u can help, I would appreciate it.

:)

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情感失落者 2025-02-05 13:26:42

我对Gem5的SCONS的使用不太熟悉。

也就是说,我认为他们使用的是AutoConfigure逻辑,在这种情况下,应该有一个名为Config.log的文件,该文件可能会有更多(有用的)有关失败的信息。

I'm not very familiar with gem5's SCons usage.

That said I think they're using the autoconfigure logic, in which case there should be a file named config.log which may have more (useful) information about what failed.

若沐 2025-02-05 13:26:42

我是Gem5的新手。但是在构建Gem5时,

python3` scons` build/x86/gem5.opt -j 8

此命令更好地照顾错误和依赖关系

I am new to gem5. But when it comes to building gem5,

python3 `which scons` build/X86/gem5.opt -j 8

this command works better taking care of errors and dependencies

戴着白色围巾的女孩 2025-02-05 13:26:42

很好,我发现了关键问题。我在窗口上下载了GEM5拉链,然后将其CP CP下载到WSL系统。也许下载Windows将文件送至DOS格式,当我从一开始就使用VMware重新启动时,它可以正常工作。
thx所有答案。

Fine, I have found the key problem. I download the gem5 zip on the windows and cp it to the wsl system. Maybe the windows downloading make the files to a dos format and when I restart from the beginning on a vmware, it works correctly.
Thx for all answers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文