Advertisement
rajhlinux

Untitled

Sep 25th, 2022
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
  2. Change Dir: /home/user/caffe/build/CMakeFiles/CMakeTmp
  3.  
  4. Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_684f7/fast && /usr/local/bin/gmake -f CMakeFiles/cmTC_684f7.dir/build.make CMakeFiles/cmTC_684f7.dir/build
  5. gmake[1]: Entering directory '/usr/home/user/caffe/build/CMakeFiles/CMakeTmp'
  6. Building C object CMakeFiles/cmTC_684f7.dir/src.c.o
  7. /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -MD -MT CMakeFiles/cmTC_684f7.dir/src.c.o -MF CMakeFiles/cmTC_684f7.dir/src.c.o.d -o CMakeFiles/cmTC_684f7.dir/src.c.o -c /home/user/caffe/build/CMakeFiles/CMakeTmp/src.c
  8. Linking C executable cmTC_684f7
  9. /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_684f7.dir/link.txt --verbose=1
  10. /usr/bin/cc CMakeFiles/cmTC_684f7.dir/src.c.o -o cmTC_684f7
  11. ld: error: undefined symbol: pthread_create
  12. >>> referenced by src.c
  13. >>> CMakeFiles/cmTC_684f7.dir/src.c.o:(main)
  14. cc: error: linker command failed with exit code 1 (use -v to see invocation)
  15. gmake[1]: *** [CMakeFiles/cmTC_684f7.dir/build.make:100: cmTC_684f7] Error 1
  16. gmake[1]: Leaving directory '/usr/home/user/caffe/build/CMakeFiles/CMakeTmp'
  17. gmake: *** [Makefile:127: cmTC_684f7/fast] Error 2
  18.  
  19.  
  20. Source file was:
  21. #include <pthread.h>
  22.  
  23. static void* test_func(void* data)
  24. {
  25. return data;
  26. }
  27.  
  28. int main(void)
  29. {
  30. pthread_t thread;
  31. pthread_create(&thread, NULL, test_func, NULL);
  32. pthread_detach(thread);
  33. pthread_cancel(thread);
  34. pthread_join(thread, NULL);
  35. pthread_atfork(NULL, NULL, NULL);
  36. pthread_exit(NULL);
  37.  
  38. return 0;
  39. }
  40.  
  41. Determining if the function pthread_create exists in the pthreads failed with the following output:
  42. Change Dir: /home/user/caffe/build/CMakeFiles/CMakeTmp
  43.  
  44. Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_213ee/fast && /usr/local/bin/gmake -f CMakeFiles/cmTC_213ee.dir/build.make CMakeFiles/cmTC_213ee.dir/build
  45. gmake[1]: Entering directory '/usr/home/user/caffe/build/CMakeFiles/CMakeTmp'
  46. Building C object CMakeFiles/cmTC_213ee.dir/CheckFunctionExists.c.o
  47. /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_213ee.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_213ee.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_213ee.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake/Modules/CheckFunctionExists.c
  48. Linking C executable cmTC_213ee
  49. /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_213ee.dir/link.txt --verbose=1
  50. /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_213ee.dir/CheckFunctionExists.c.o -o cmTC_213ee -lpthreads
  51. ld: error: unable to find library -lpthreads
  52. cc: error: linker command failed with exit code 1 (use -v to see invocation)
  53. gmake[1]: *** [CMakeFiles/cmTC_213ee.dir/build.make:100: cmTC_213ee] Error 1
  54. gmake[1]: Leaving directory '/usr/home/user/caffe/build/CMakeFiles/CMakeTmp'
  55. gmake: *** [Makefile:127: cmTC_213ee/fast] Error 2
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement