首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在MacOS High Sierra 10.13.6上构建gem5

无法在MacOS High Sierra 10.13.6上构建gem5
EN

Stack Overflow用户
提问于 2018-08-28 23:41:19
回答 1查看 532关注 0票数 2

我安装了所有依赖项(git、g++、python、zlib、m4、protobuf、swig和pydot),并从"https://raw.githubusercontent.com/arm-university/arm-gem5-rsk/master/clone.sh$ bash clone.sh“中克隆了gem5项目。当我尝试使用"scons build/ARM/gem5.opt“来构建它时,它会给出以下错误:

代码语言:javascript
复制
In file included from build/ARM/arch/arm/semihosting.cc:40:
build/ARM/arch/arm/semihosting.hh:267:31: error: constexpr function 
never produces a constant expression
  [-Winvalid-constexpr]
static constexpr RetErrno retError(SemiErrno e) {
                          ^
build/ARM/arch/arm/semihosting.hh:268:16: note: non-constexpr 
constructor 'pair<unsigned long long, unsigned long
  long &, false>' cannot be used in a constant expression
    return RetErrno((uint64_t)-1, e);
           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/utility:436:5: 
note: declared here
pair(_U1&& __u1, _U2&& __u2)
^
In file included from build/ARM/arch/arm/semihosting.cc:40:
build/ARM/arch/arm/semihosting.hh:271:31: error: constexpr function 
never produces a constant expression
  [-Winvalid-constexpr]
static constexpr RetErrno retOK(uint64_t r) {
                          ^
build/ARM/arch/arm/semihosting.hh:272:16: note: non-constexpr 
constructor 'pair<unsigned long long &, int, false>'
  cannot be used in a constant expression
    return RetErrno(r, 0);
           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/utility:436:5: 
note: declared here
pair(_U1&& __u1, _U2&& __u2)
^
build/ARM/arch/arm/semihosting.cc:474:18: warning: 'tmpnam' is 
deprecated: This function is provided for
  compatibility reasons only. Due to security concerns inherent in the 
design of tmpnam(3), it is highly
  recommended that you use mkstemp(3) instead. [-Wdeprecated- 
declarations]
char *path = tmpnam(buf.data());
             ^
/usr/include/stdio.h:186:1: note: 'tmpnam' has been explicitly marked 
deprecated here
__deprecated_msg("This function is provided for compatibility reasons 
only.  Due to security concerns inheren...
^
/usr/include/sys/cdefs.h:180:48: note: expanded from macro 
'__deprecated_msg'
    #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))

我需要安装gem5模拟器,如何修复它们?

EN

回答 1

Stack Overflow用户

发布于 2018-09-12 14:47:16

我通过在文件5/src/arch//semihosting.hh中将arm常量表达式更改为常量修复了这个错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52061726

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档