I am trying to compile https://github.com/LuisaGroup/LuisaCompute.
During make
, I got
[ 0%] Built target compute
[ 1%] Built target EASTL
[ 2%] Built target stb
[ 3%] Built target glad
[ 15%] Built target glfw
[ 16%] Built target imgui
[ 17%] Built target luisa-compute-ext
[ 17%] Built target luisa-compute-ext-copy
[ 21%] Built target spdlog
[ 26%] Built target luisa-compute-core
[ 26%] Building CXX object src/vstl/CMakeFiles/luisa-compute-vstl.dir/ThreadPool.cpp.o
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:22:21: error: ‘struct std::atomic_flag’ has no member named ‘test’
22 | enabled.test(std::memory_order_acquire) && taskList.Length() == 0) {
| ^~~~
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:29:24: error: ‘struct std::atomic_flag’ has no member named ‘test’
29 | while (enabled.test(std::memory_order_acquire)) {
| ^~~~
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:40:24: error: ‘struct std::atomic_flag’ has no member named ‘test’
40 | while (enabled.test(std::memory_order_acquire)) {
| ^~~~
make[2]: *** [src/vstl/CMakeFiles/luisa-compute-vstl.dir/build.make:160: src/vstl/CMakeFiles/luisa-compute-vstl.dir/ThreadPool.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:925: src/vstl/CMakeFiles/luisa-compute-vstl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Cppreference says there should be a member called test
if c++20 is enabled, and I checked that CMakeLists.txt does specified
set(CMAKE_CXX_STANDARD 20)
What is the problem? I have both g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
and g++-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
installed and /usr/bin/g++
links to g++-10