【问题标题】:Unable to build gem5 on MacOS High Sierra 10.13.6无法在 MacOS High Sierra 10.13.6 上构建 gem5
【发布时间】:2019-02-03 07:33:30
【问题描述】:

我安装了所有依赖项(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”构建它时,它会出现以下错误:

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 模拟器,我该如何解决?

【问题讨论】:

  • 你的gem5版本和gcc版本是多少?还 ping 邮件列表。我在 gem5 200281b08ca21f0d2678e23063f088960d3c0819 GCC 6.4.0,Ubuntu 16.04 上工作。

标签: git scons macos-high-sierra build-error gem5


【解决方案1】:

我通过在 filegem5/src/arch 中将 constexpr 更改为 const 来修复错误/arm/semihosting.hh。

【讨论】:

    猜你喜欢
    • 2020-07-13
    • 1970-01-01
    • 2018-07-20
    • 1970-01-01
    • 2021-08-25
    • 2021-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多