0

我正在尝试根据 LLVM's Test Suite Guide使用 llvm testsuite 运行 SPEC2017 基准测试。我的 cmake 命令成功,但使用 make,我在包含文件(如 numeric_traits.h)中出现错误。每次出现__is_signalinnumeric_traits.h和时,我都会收到错误消息stl_algobase.h

CMake 命令:

$ cmake -DCMAKE_C_COMPILER:STRING="/usr/bin/clang-7" -DCMAKE_CXX_COMPILER:STRING="/usr/bin/clang++-7" -DCMAKE_C_FLAGS="-fPIC" -C../test-suite/cmake/caches/O3.cmake -DTEST_SUITE_SPEC2017_ROOT:STRING="../speccpu2017" ../test-suite
...
$ make
...
In file included from /home/speccpu2017/benchspec/CPU/526.blender_r/src/blender/source/blender/render/intern/raytrace/rayobject_qbvh.cpp:37:
In file included from /home/speccpu2017/benchspec/CPU/526.blender_r/src/blender/source/blender/render/intern/raytrace/vbvh.h:34:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/algorithm:61:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h:63:

/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/numeric_traits.h:63:25: error: expected member name or ';' after
      declaration specifiers
      static const bool __is_signed = __glibcxx_signed(_Value);
      ~~~~~~~~~~~~~~~~~ ^

/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/numeric_traits.h:74:50: error: expected unqualified-id
    const bool __numeric_traits_integer<_Value>::__is_signed;
                                                 ^    
[Long error. Truncated for clarity]

设置:

  • Clang 版本 7
  • 操作系统:Ubuntu 18.04
  • linux:4.18.0-25-通用
  • 规格版本:2017
4

1 回答 1

1

将此放入 CXX 的可移植性标志中https://www.spec.org/cpu2017/Docs/benchmarks/flags/526.blender_r.flags.html#b526.blender_r_D__BOOL_DEFINED

仅供参考,<SPEC_SRC>/config/Example-clang-llvm-linux-x86.cfg<SPEC_SRC>/config/Example-aocc-linux-x86.cfg包含特定于 Clang 的可移植性标志。

于 2019-12-18T22:31:38.777 回答