Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. Determining if the pthread_create exist failed with the following output:
  2. Change Dir: /home/pi/build/CMakeFiles/CMakeTmp
  3.  
  4. Run Build Command:"/usr/bin/make" "cmTC_53864/fast"
  5. /usr/bin/make -f CMakeFiles/cmTC_53864.dir/build.make CMakeFiles/cmTC_53864.dir/build
  6. make[1]: Entering directory '/home/pi/build/CMakeFiles/CMakeTmp'
  7. Building C object CMakeFiles/cmTC_53864.dir/CheckSymbolExists.c.o
  8. /usr/bin/cc -o CMakeFiles/cmTC_53864.dir/CheckSymbolExists.c.o -c /home/pi/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
  9. Linking C executable cmTC_53864
  10. /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_53864.dir/link.txt --verbose=1
  11. /usr/bin/cc -rdynamic CMakeFiles/cmTC_53864.dir/CheckSymbolExists.c.o -o cmTC_53864
  12. /usr/bin/ld: CMakeFiles/cmTC_53864.dir/CheckSymbolExists.c.o: in function `main':
  13. CheckSymbolExists.c:(.text+0x38): undefined reference to `pthread_create'
  14. collect2: error: ld returned 1 exit status
  15. make[1]: *** [CMakeFiles/cmTC_53864.dir/build.make:87: cmTC_53864] Error 1
  16. make[1]: Leaving directory '/home/pi/build/CMakeFiles/CMakeTmp'
  17. make: *** [Makefile:121: cmTC_53864/fast] Error 2
  18.  
  19. File /home/pi/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
  20. /* */
  21. #include <pthread.h>
  22.  
  23. int main(int argc, char** argv)
  24. {
  25. (void)argv;
  26. #ifndef pthread_create
  27. return ((int*)(&pthread_create))[argc];
  28. #else
  29. (void)argc;
  30. return 0;
  31. #endif
  32. }
  33.  
  34. Determining if the function pthread_create exists in the pthreads failed with the following output:
  35. Change Dir: /home/pi/build/CMakeFiles/CMakeTmp
  36.  
  37. Run Build Command:"/usr/bin/make" "cmTC_86f8c/fast"
  38. /usr/bin/make -f CMakeFiles/cmTC_86f8c.dir/build.make CMakeFiles/cmTC_86f8c.dir/build
  39. make[1]: Entering directory '/home/pi/build/CMakeFiles/CMakeTmp'
  40. Building C object CMakeFiles/cmTC_86f8c.dir/CheckFunctionExists.c.o
  41. /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_86f8c.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
  42. Linking C executable cmTC_86f8c
  43. /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_86f8c.dir/link.txt --verbose=1
  44. /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_86f8c.dir/CheckFunctionExists.c.o -o cmTC_86f8c -lpthreads
  45. /usr/bin/ld: cannot find -lpthreads
  46. collect2: error: ld returned 1 exit status
  47. make[1]: *** [CMakeFiles/cmTC_86f8c.dir/build.make:87: cmTC_86f8c] Error 1
  48. make[1]: Leaving directory '/home/pi/build/CMakeFiles/CMakeTmp'
  49. make: *** [Makefile:121: cmTC_86f8c/fast] Error 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement