Performing C++ SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f6a42/fast && gmake[1]: Entering directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' /usr/bin/gmake -f CMakeFiles/cmTC_f6a42.dir/build.make CMakeFiles/cmTC_f6a42.dir/build gmake[2]: Entering directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_f6a42.dir/src.cxx.o /products/gcc/v9_3_0/Linux64bit+3.10-2.17/bin/c++ -DCMAKE_HAVE_LIBC_PTHREAD -std=c++17 -o CMakeFiles/cmTC_f6a42.dir/src.cxx.o -c /home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp/src.cxx Linking CXX executable cmTC_f6a42 /products/cmake/v3_20_0/Linux64bit+3.10-2.17/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f6a42.dir/link.txt --verbose=1 /products/gcc/v9_3_0/Linux64bit+3.10-2.17/bin/c++ CMakeFiles/cmTC_f6a42.dir/src.cxx.o -o cmTC_f6a42 CMakeFiles/cmTC_f6a42.dir/src.cxx.o: In function `main': src.cxx:(.text+0x2d): undefined reference to `pthread_create' src.cxx:(.text+0x39): undefined reference to `pthread_detach' src.cxx:(.text+0x45): undefined reference to `pthread_cancel' src.cxx:(.text+0x56): undefined reference to `pthread_join' src.cxx:(.text+0x6a): undefined reference to `pthread_atfork' collect2: error: ld returned 1 exit status gmake[2]: *** [cmTC_f6a42] Error 1 gmake[2]: Leaving directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' gmake[1]: *** [cmTC_f6a42/fast] Error 2 gmake[1]: Leaving directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' Source file was: #include static void* test_func(void* data) { return data; } int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); pthread_cancel(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL); return 0; } Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_998c6/fast && gmake[1]: Entering directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' /usr/bin/gmake -f CMakeFiles/cmTC_998c6.dir/build.make CMakeFiles/cmTC_998c6.dir/build gmake[2]: Entering directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_998c6.dir/CheckFunctionExists.cxx.o /products/gcc/v9_3_0/Linux64bit+3.10-2.17/bin/c++ -DCHECK_FUNCTION_EXISTS=pthread_create -std=c++17 -o CMakeFiles/cmTC_998c6.dir/CheckFunctionExists.cxx.o -c /home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx Linking CXX executable cmTC_998c6 /products/cmake/v3_20_0/Linux64bit+3.10-2.17/bin/cmake -E cmake_link_script CMakeFiles/cmTC_998c6.dir/link.txt --verbose=1 /products/gcc/v9_3_0/Linux64bit+3.10-2.17/bin/c++ -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_998c6.dir/CheckFunctionExists.cxx.o -o cmTC_998c6 -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status gmake[2]: *** [cmTC_998c6] Error 1 gmake[2]: Leaving directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp' gmake[1]: *** [cmTC_998c6/fast] Error 2 gmake[1]: Leaving directory `/home/yuhw/wc/wct-analysis/csi-kokkos/wcgk-local/build/kokkos/CMakeFiles/CMakeTmp'