You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
llvm+clang are installed from the official deb repo apt.llvm.org. clang++ of version 10 (and other llvm 10 tools) are selected using update-alternatives.
The result is the error:
[1/4] /usr/bin/clang++ --target=x86_64-pc-w64-mingw32 -isystem ../include -isystem ../ -Wall -Wshadow -Werror -Wconversion -DGTEST_HAS_PTHREAD=1 -fexceptions -W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls -MD -MT CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj -MF CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj.d -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj -c ../src/gtest_main.cc
FAILED: CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj
/usr/bin/clang++ --target=x86_64-pc-w64-mingw32 -isystem ../include -isystem ../ -Wall -Wshadow -Werror -Wconversion -DGTEST_HAS_PTHREAD=1 -fexceptions -W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls -MD -MT CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj -MF CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj.d -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj -c ../src/gtest_main.cc
In file included from ../src/gtest_main.cc:31:
In file included from ../include/gtest/gtest.h:62:
In file included from ../include/gtest/internal/gtest-internal.h:40:
../include/gtest/internal/gtest-port.h:1487:3: error: unknown type name 'AutoHandle'
AutoHandle thread_;
^
1 error generated.
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered:
I meet this problem in v1.8.0, and after I upgrade to 1.11.0, the problem disappeared.
THis is a bug tracked in #606 and solved by #721 and #856, which merged in version v1.8.1.
So setting gtest_disable_pthreads to OFF is just a workaround with version less or equal than v1.8.0. But in most cases you do not really need multi-thread for testing.
I had the same issue. The problem was the CMake-installation I used. I installed CMake in MSYS2. But instead of installing the clang64-environment version I installed the "normal" version. Just removing cmake an install the right version via pacboy- S cmake:p resolved my issue.
Why this helped? Maybe because the clang64-env version does not find pthread thus the find_package will not be set. Just a guess...
toolchain.cmake
The distro is Ubuntu Eoan.
llvm+clang are installed from the official deb repo apt.llvm.org. clang++ of version 10 (and other llvm 10 tools) are selected using
update-alternatives
.The result is the error:
The text was updated successfully, but these errors were encountered: