system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /usr/local/src/build-dir/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_e4b24/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e4b24.dir/build.make CMakeFiles/cmTC_e4b24.dir/build
gmake[1]: Entering directory `/usr/local/src/build-dir/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e4b24.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -std=gnu99 -o CMakeFiles/cmTC_e4b24.dir/src.c.o -c /usr/local/src/build-dir/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_e4b24
/usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_e4b24.dir/link.txt --verbose=1
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_e4b24.dir/src.c.o -o cmTC_e4b24
CMakeFiles/cmTC_e4b24.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_e4b24] Error 1
gmake[1]: Leaving directory `/usr/local/src/build-dir/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_e4b24/fast] Error 2
Source file was:
#include <pthread.h>
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;
}