我正在尝试根据 LLVM's Test Suite Guide使用 llvm testsuite 运行 SPEC2017 基准测试。我的 cmake 命令成功,但使用 make,我在包含文件(如 numeric_traits.h)中出现错误。每次出现__is_signal
innumeric_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