当前位置:   article > 正文

ubuntu安装opencv3.10遇到的坑_-- detected version of gnu gcc: 110 (1100) cmake e

-- detected version of gnu gcc: 110 (1100) cmake error at cmake/opencvcompil

1. ubuntu编译opencv3.10的过程可以参考下面博客

http://blog.csdn.net/cumt08113684/article/details/53006376#

2. make过程中可能会出现以下问题

fatal error: Eigen/Eigenvalues: No such file or directory

在cmake的时候可以加上WITH_EGEN=OFF

 

sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_EIGEN=OFF -D CMAKE_INSTALL_PREFIX=/usr/local/opencv/3.10 .. 

今天试了开源代码(KFsion)但是opencv要2.4.8,所以安装流一下,但是opencv2.4.8运行报错了,如下:

  1. flycloud@E60-Server:~/下载/opencv-2.4.8/build$ cmake .. -Wno-dev
  2. CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list):
  3. list GET given empty list
  4. Call Stack (most recent call first):
  5. CMakeLists.txt:77 (include)
  6. CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:86 (list):
  7. list GET given empty list
  8. Call Stack (most recent call first):
  9. CMakeLists.txt:77 (include)
  10. CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:89 (math):
  11. math cannot parse the expression: "*100 + ": syntax error, unexpected
  12. exp_TIMES, expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER
  13. (1)
  14. Call Stack (most recent call first):
  15. CMakeLists.txt:77 (include)
  16. -- Detected version of GNU GCC: ()
  17. -- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
  18. -- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
  19. -- checking for module 'gstreamer-base-0.10'
  20. -- package 'gstreamer-base-0.10' not found
  21. -- checking for module 'libv4l1'
  22. -- package 'libv4l1' not found
  23. -- Looking for linux/videodev.h
  24. -- Looking for linux/videodev.h - not found
  25. -- Looking for linux/videodev2.h
  26. -- Looking for linux/videodev2.h - found
  27. -- Looking for sys/videoio.h
  28. -- Looking for sys/videoio.h - not found
  29. -- Looking for libavformat/avformat.h
  30. -- Looking for libavformat/avformat.h - found
  31. -- Looking for ffmpeg/avformat.h
  32. -- Looking for ffmpeg/avformat.h - not found
  33. -- CUDA detected: 8.0
  34. -- CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
  35. -- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
  36. --
  37. -- General configuration for OpenCV 2.4.8 =====================================
  38. -- Version control: unknown
  39. --
  40. -- Platform:
  41. -- Host: Linux 4.13.0-46-generic x86_64
  42. -- CMake: 3.9.1
  43. -- CMake generator: Unix Makefiles
  44. -- CMake build tool: /usr/bin/make
  45. -- Configuration: Release
  46. --
  47. -- C/C++:
  48. -- Built as dynamic libs?: YES
  49. -- C++ Compiler: /usr/bin/c++ (ver 7.2.0)
  50. -- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
  51. -- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
  52. -- C Compiler: /usr/bin/cc
  53. -- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
  54. -- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
  55. -- Linker flags (Release):
  56. -- Linker flags (Debug):
  57. -- Precompiled headers: YES
  58. --
  59. -- OpenCV modules:
  60. -- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab
  61. -- Disabled: world
  62. -- Disabled by dependency: -
  63. -- Unavailable: androidcamera dynamicuda java
  64. --
  65. -- GUI:
  66. -- QT: NO
  67. -- GTK+ 2.x: YES (ver 2.24.31)
  68. -- GThread : YES (ver 2.54.1)
  69. -- GtkGlExt: NO
  70. -- OpenGL support: NO
  71. --
  72. -- Media I/O:
  73. -- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
  74. -- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
  75. -- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
  76. -- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.8)
  77. -- JPEG 2000: build (ver 1.900.1)
  78. -- OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.2.0)
  79. --
  80. -- Video I/O:
  81. -- DC1394 1.x: NO
  82. -- DC1394 2.x: YES (ver 2.2.5)
  83. -- FFMPEG: YES
  84. -- codec: YES (ver 57.89.100)
  85. -- format: YES (ver 57.71.100)
  86. -- util: YES (ver 55.58.100)
  87. -- swscale: YES (ver 4.6.100)
  88. -- gentoo-style: YES
  89. -- GStreamer: NO
  90. -- OpenNI: NO
  91. -- OpenNI PrimeSensor Modules: NO
  92. -- PvAPI: NO
  93. -- GigEVisionSDK: NO
  94. -- UniCap: NO
  95. -- UniCap ucil: NO
  96. -- V4L/V4L2: NO/YES
  97. -- XIMEA: NO
  98. -- Xine: NO
  99. --
  100. -- Other third-party libraries:
  101. -- Use IPP: NO
  102. -- Use Eigen: YES (ver 3.3.4)
  103. -- Use TBB: NO
  104. -- Use OpenMP: NO
  105. -- Use GCD NO
  106. -- Use Concurrency NO
  107. -- Use C=: NO
  108. -- Use Cuda: YES (ver 8.0)
  109. -- Use OpenCL: YES
  110. --
  111. -- NVIDIA CUDA
  112. -- Use CUFFT: YES
  113. -- Use CUBLAS: NO
  114. -- USE NVCUVID: NO
  115. -- NVIDIA GPU arch: 11 12 13 20 21 30 35
  116. -- NVIDIA PTX archs: 30
  117. -- Use fast math: NO
  118. --
  119. -- OpenCL:
  120. -- Version: dynamic
  121. -- Include path: /home/flycloud/下载/opencv-2.4.8/3rdparty/include/opencl/1.2
  122. -- Use AMD FFT: NO
  123. -- Use AMD BLAS: NO
  124. --
  125. -- Python:
  126. -- Interpreter: /usr/bin/python2 (ver 2.7.14)
  127. -- Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.14)
  128. -- numpy: /home/flycloud/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.14.0)
  129. -- packages path: lib/python2.7/dist-packages
  130. --
  131. -- Java:
  132. -- ant: NO
  133. -- JNI: NO
  134. -- Java tests: NO
  135. --
  136. -- Documentation:
  137. -- Build Documentation: NO
  138. -- Sphinx: NO
  139. -- PdfLaTeX compiler: NO
  140. --
  141. -- Tests and samples:
  142. -- Tests: YES
  143. -- Performance tests: YES
  144. -- C/C++ Examples: NO
  145. --
  146. -- Install path: /usr/local
  147. --
  148. -- cvconfig.h is in: /home/flycloud/下载/opencv-2.4.8/build
  149. -- -----------------------------------------------------------------
  150. --
  151. -- Configuring incomplete, errors occurred!
  152. See also "/home/flycloud/下载/opencv-2.4.8/build/CMakeFiles/CMakeOutput.log".
  153. See also "/home/flycloud/下载/opencv-2.4.8/build/CMakeFiles/CMakeError.log".

官方链接:

  1. sir, this error puzzled me for some hours and i found this github page. i will take OpenCV2.4.13 as example, in file opencv2.4.13/cmake/ OpenCVDetectCXXCompiler.cmake, u have to change "dumpversion" to "dumpfullversion"
  2. explanation is that in gcc with higher version, dumpversion function can't get true full version number of compiler so that cmake progress will fail.

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/119855
推荐阅读
相关标签
  

闽ICP备14008679号