Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /storage/hpc/44/alrawass/test1/1/build/CMakeFiles/CMakeTmp Run Build Command(s):/bin/gmake -f Makefile cmTC_20382/fast && /bin/gmake -f CMakeFiles/cmTC_20382.dir/build.make CMakeFiles/cmTC_20382.dir/build gmake[1]: Entering directory `/mmfs1/storage/users/alrawass/test1/1/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_20382.dir/src.c.o /usr/shared_apps/packages/gcc-8.2.0/bin/gcc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_20382.dir/src.c.o -c /storage/hpc/44/alrawass/test1/1/build/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_20382 /mmfs1/shared_apps/packages/cmake-3.24.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_20382.dir/link.txt --verbose=1 /usr/shared_apps/packages/gcc-8.2.0/bin/gcc CMakeFiles/cmTC_20382.dir/src.c.o -o cmTC_20382 CMakeFiles/cmTC_20382.dir/src.c.o: In function `main': src.c:(.text+0x2d): undefined reference to `pthread_create' src.c:(.text+0x39): undefined reference to `pthread_detach' src.c:(.text+0x45): undefined reference to `pthread_cancel' src.c:(.text+0x56): undefined reference to `pthread_join' src.c:(.text+0x6a): undefined reference to `pthread_atfork' collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_20382] Error 1 gmake[1]: Leaving directory `/mmfs1/storage/users/alrawass/test1/1/build/CMakeFiles/CMakeTmp' gmake: *** [cmTC_20382/fast] Error 2 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; }