Невозможно собрать gem5 на MacOS High Sierra 10.13.6 - PullRequest
0 голосов
/ 28 августа 2018

Я установил все зависимости (git, g ++, python, zlib, m4, protobuf, swig и pydot) и клонировал проект gem5 из "https://raw.githubusercontent.com/arm-university/arm-gem5-rsk/master/clone.sh$ bash clone.sh". И когда я пытаюсь собрать его с помощью "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. Как я могу их исправить?

1 Ответ

0 голосов
/ 12 сентября 2018

Я исправил ошибку, изменив constexpr на const в filegem5 / src / arch / arm / semihosting .hh.

...