Raw File
CMakeError.log
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_d98dc/fast && /usr/bin/make  -f CMakeFiles/cmTC_d98dc.dir/build.make CMakeFiles/cmTC_d98dc.dir/build
make[1]: Entering directory '/home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d98dc.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_d98dc.dir/src.c.o -c /home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_d98dc
/home/zhengdw/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d98dc.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_d98dc.dir/src.c.o -o cmTC_d98dc 
CMakeFiles/cmTC_d98dc.dir/src.c.o: In function `main':
src.c:(.text+0x3c): undefined reference to `pthread_create'
src.c:(.text+0x48): undefined reference to `pthread_detach'
src.c:(.text+0x54): undefined reference to `pthread_cancel'
src.c:(.text+0x65): undefined reference to `pthread_join'
src.c:(.text+0x79): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_d98dc.dir/build.make:105: recipe for target 'cmTC_d98dc' failed
make[1]: *** [cmTC_d98dc] Error 1
make[1]: Leaving directory '/home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp'
Makefile:140: recipe for target 'cmTC_d98dc/fast' failed
make: *** [cmTC_d98dc/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;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_90426/fast && /usr/bin/make  -f CMakeFiles/cmTC_90426.dir/build.make CMakeFiles/cmTC_90426.dir/build
make[1]: Entering directory '/home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_90426.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_90426.dir/CheckFunctionExists.c.o -c /home/zhengdw/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.18/Modules/CheckFunctionExists.c
Linking C executable cmTC_90426
/home/zhengdw/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_90426.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_90426.dir/CheckFunctionExists.c.o -o cmTC_90426  -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_90426.dir/build.make:105: recipe for target 'cmTC_90426' failed
make[1]: *** [cmTC_90426] Error 1
make[1]: Leaving directory '/home/zhengdw/git/cgshop2021-gitastrophe/bin/CMakeFiles/CMakeTmp'
Makefile:140: recipe for target 'cmTC_90426/fast' failed
make: *** [cmTC_90426/fast] Error 2



back to top