我是靠谱客的博主 大气早晨,最近开发中收集的这篇文章主要介绍Gem5编译ARM错误记录Gem5模拟ARM FS错误记录,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Gem5模拟ARM FS错误记录

gem5源码地址:https://gem5.googlesource.com/public/gem5
GitHub镜像:https://github.com/gem5/gem5
安装参考:
http://www.gem5.org/documentation/learning_gem5/part1/building/
http://www.gem5.org/documentation/general_docs/building#dependencies

一、编译gem.opt出现的错误

1 检查环境依赖是否全部安装


2 编译所需python、gcc等版本是否正确

参考官网的依赖推荐:
http://www.gem5.org/documentation/general_docs/building#dependencies

3 遇见问题说lto version与expected lto version 4.1不符

如果expected的版本比前者低,说明可能需要提高gcc的版本。
一般不会出现这种问题,基本上系统默认的gcc版本是没问题的。


4 遇见问题类似如下 undefined reference to `H5:: ……

build/ARM/arch/arm/lib.o.partial: In function `ArmSemihosting::callTmpNam(ThreadContext*, unsigned long, unsigned long, unsigned long)':
xxx/build/ARM/arch/arm/semihosting.cc:453: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::begin()':
xxx/build/ARM/base/stats/hdf5.cc:82: undefined reference to `H5::CommonFG::openGroup(char const*) const'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::beginGroup(char const*)':
xxx/build/ARM/base/stats/hdf5.cc:109: undefined reference to `H5::CommonFG::openGroup(char const*) const'
xxx/build/ARM/base/stats/hdf5.cc:113: undefined reference to `H5::CommonFG::createGroup(char const*, unsigned long) const'
xxx/build/ARM/base/stats/hdf5.cc:111: undefined reference to `H5::CommonFG::createGroup(char const*, unsigned long) const'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::addMetaData(H5::DataSet&, char const*, double)':
xxx/build/ARM/base/stats/hdf5.cc:310: undefined reference to `H5::H5Location::createAttribute(char const*, H5::DataType const&, H5::DataSpace const&, H5::PropList const&) const'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::addMetaData(H5::DataSet&, char const*, std::vector<char const*, std::allocator<char const*> > const&)':
xxx/build/ARM/base/stats/hdf5.cc:278: undefined reference to `H5::H5Location::createAttribute(char const*, H5::DataType const&, H5::DataSpace const&, H5::PropList const&) const'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::addMetaData(H5::DataSet&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
xxx/build/ARM/base/stats/hdf5.cc:300: undefined reference to `H5::H5Location::createAttribute(char const*, H5::DataType const&, H5::DataSpace const&, H5::PropList const&) const'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::appendStat(Stats::Info const&, int, unsigned long long*, double const*)':
xxx/build/ARM/base/stats/hdf5.cc:228: undefined reference to `H5::CommonFG::openDataSet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
xxx/build/ARM/base/stats/hdf5.cc:251: undefined reference to `H5::CommonFG::createDataSet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, H5::DataType const&, H5::DataSpace const&, H5::DSetCreatPropList const&) const'
build/ARM/base/lib.o.partial: In function `Stats::Hdf5::addMetaData(H5::DataSet&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
xxx/build/ARM/base/stats/hdf5.cc:300: undefined reference to `H5::H5Location::createAttribute(char const*, H5::DataType const&, H5::DataSpace const&, H5::PropList const&) const'
collect2: error: ld returned 1 exit status
scons: *** [build/ARM/gem5.opt] Error 1
scons: building terminated because of errors.



一般来说,warning的问题是可以忽略(不绝对),尝试过的方法有:
(1) 在编译命令后面加上“-wno-deprecated-copy”,即

scons build/ARM/gem5.opt -j8 -wno-deprecated-copy

虽然没有报错,但实际上编译不成功,可以看到gem5/build目录下没有生成gem5.opt文件。
参考:
【1】https://stackoverflow.com/questions/58932201/having-hdf5-cc-causes-errors-in-gem5-build
【2】https://gem5-review.googlesource.com/c/public/gem5/+/31754


(2) 在编译命令后面加上“USE_HDF5=0”,即:

scons build/ARM/gem5.opt -j10 USE_HDF5=0

编译成功了,可以看到gem5/build目录下生成gem5.opt文件。

(3) 重新下载源码

git clone https://gem5.googlesource.com/public/gem5


(4) python-config的版本不是自己想要的
因为是在服务器上进行编译的,所以可能会出现总是识别成python的其他版本,那么可以尝试使用venv搭建一个虚拟环境之后再进行编译。

二、使用gem5.opt出现问题

1 核心转储

已放弃 (核心已转储)

大多原因是kernel、bootloader、disk的路径不正确,仔细检查路径拼写是否正确。

2

fatal condition domain_id == SrcClockDomain::emptyDomainID occurred: DVFS: Controlled domain system.littleCluster.clk_domain needs to have a properly  assigned ID.

安装官网教程
http://www.gem5.org/documentation/learning_gem5/part2/arm_dvfs_support/

最后

以上就是大气早晨为你收集整理的Gem5编译ARM错误记录Gem5模拟ARM FS错误记录的全部内容,希望文章能够帮你解决Gem5编译ARM错误记录Gem5模拟ARM FS错误记录所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(35)

评论列表共有 0 条评论

立即
投稿
返回
顶部