CMakeError.log 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Determining if the pthread_create exist failed with the following output:
  2. Change Dir: /home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp
  3. Run Build Command:"/usr/bin/make" "cmTC_44d7e/fast"
  4. /usr/bin/make -f CMakeFiles/cmTC_44d7e.dir/build.make CMakeFiles/cmTC_44d7e.dir/build
  5. make[1]: 进入目录“/home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp”
  6. Building C object CMakeFiles/cmTC_44d7e.dir/CheckSymbolExists.c.o
  7. /usr/bin/cc -o CMakeFiles/cmTC_44d7e.dir/CheckSymbolExists.c.o -c /home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c
  8. Linking C executable cmTC_44d7e
  9. /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_44d7e.dir/link.txt --verbose=1
  10. /usr/bin/cc -rdynamic CMakeFiles/cmTC_44d7e.dir/CheckSymbolExists.c.o -o cmTC_44d7e
  11. CMakeFiles/cmTC_44d7e.dir/CheckSymbolExists.c.o:在函数‘main’中:
  12. CheckSymbolExists.c:(.text+0x1b):对‘pthread_create’未定义的引用
  13. collect2: error: ld returned 1 exit status
  14. CMakeFiles/cmTC_44d7e.dir/build.make:97: recipe for target 'cmTC_44d7e' failed
  15. make[1]: *** [cmTC_44d7e] Error 1
  16. make[1]: 离开目录“/home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp”
  17. Makefile:126: recipe for target 'cmTC_44d7e/fast' failed
  18. make: *** [cmTC_44d7e/fast] Error 2
  19. File /home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
  20. /* */
  21. #include <pthread.h>
  22. int main(int argc, char** argv)
  23. {
  24. (void)argv;
  25. #ifndef pthread_create
  26. return ((int*)(&pthread_create))[argc];
  27. #else
  28. (void)argc;
  29. return 0;
  30. #endif
  31. }
  32. Determining if the function pthread_create exists in the pthreads failed with the following output:
  33. Change Dir: /home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp
  34. Run Build Command:"/usr/bin/make" "cmTC_d414b/fast"
  35. /usr/bin/make -f CMakeFiles/cmTC_d414b.dir/build.make CMakeFiles/cmTC_d414b.dir/build
  36. make[1]: 进入目录“/home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp”
  37. Building C object CMakeFiles/cmTC_d414b.dir/CheckFunctionExists.c.o
  38. /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_d414b.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
  39. Linking C executable cmTC_d414b
  40. /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d414b.dir/link.txt --verbose=1
  41. /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_d414b.dir/CheckFunctionExists.c.o -o cmTC_d414b -lpthreads
  42. /usr/bin/ld: 找不到 -lpthreads
  43. collect2: error: ld returned 1 exit status
  44. CMakeFiles/cmTC_d414b.dir/build.make:97: recipe for target 'cmTC_d414b' failed
  45. make[1]: *** [cmTC_d414b] Error 1
  46. make[1]: 离开目录“/home/lenotary/work/code/lidar_to_camera/cmake-build-debug/CMakeFiles/CMakeTmp”
  47. Makefile:126: recipe for target 'cmTC_d414b/fast' failed
  48. make: *** [cmTC_d414b/fast] Error 2