opencv: I am having problems trying to build opencv-3.2.0 using the text module from opencv-contrib-3.2.0
System information (version)
- OpenCV => :3.2.0:
- Operating System / Platform => :Ubuntu16.04 64 Bit:
- Compiler => ❔
Detailed description
I am trying to build opencv-3.2.0 with the opencv-contrib modules but i have an error. I am installing the version for python.
Steps to reproduce
I am running the following steps to build opencv:
cmake -D CMAKE_BUILD_TYPE=RELEASE -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DOPENCV_EXTRA_MODULES_PATH=/home/rodrigo/opencv_contrib-3.2.0/modules -D BUILD_EXAMPLES=ON ..
Error Log
rodrigo@garage:~/OpenCV/build$ make -j8
-- Detected version of GNU GCC: 49 (409)
-- FP16: Feature disabled
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
-- Checking for module 'gstreamer-video-1.0'
-- No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
-- No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
-- No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
-- No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
-- No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
-- No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
-- No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
-- No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
-- No package 'gstreamer-pbutils-0.10' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libavresample'
-- No package 'libavresample' found
-- Checking for module 'libgphoto2'
-- No package 'libgphoto2' found
-- Found TBB: /usr/lib/x86_64-linux-gnu/libtbb.so
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /home/rodrigo/OpenCV/build/3rdparty/ippicv/ippicv_lnx
-- CUDA detected: 8.0
-- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES
-- LAPACK_IMPL: OpenBLAS, LAPACK_LIBRARIES: /usr/lib/libopenblas.so
-- Found apache ant 1.9.7: /usr/bin/ant
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.
-- The imported target "vtk" references the file
"/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.
-- Found VTK ver. 6.3.0 (usefile: /usr/lib/cmake/vtk-6.3/UseVTK.cmake)
-- Caffe: NO
-- Protobuf: YES
-- Glog: NO
-- freetype2: YES
-- harfbuzz: YES
-- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
-- freetype2: YES
-- harfbuzz: YES
-- Tesseract: YES
-- Check contents of vgg_generated_48.i ...
-- Check contents of vgg_generated_64.i ...
-- Check contents of vgg_generated_80.i ...
-- Check contents of vgg_generated_120.i ...
-- Check contents of boostdesc_bgm.i ...
-- Check contents of boostdesc_bgm_bi.i ...
-- Check contents of boostdesc_bgm_hd.i ...
-- Check contents of boostdesc_binboost_064.i ...
-- Check contents of boostdesc_binboost_128.i ...
-- Check contents of boostdesc_binboost_256.i ...
-- Check contents of boostdesc_lbgm.i ...
--
-- General configuration for OpenCV 3.2.0 =====================================
-- Version control: unknown
--
-- Extra modules:
-- Location (extra): /home/rodrigo/opencv_contrib-3.2.0/modules
-- Version control (extra): unknown
--
-- Platform:
-- Timestamp: 2017-03-14T14:30:40Z
-- Host: Linux 4.8.0-41-generic x86_64
-- CMake: 3.5.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 4.9.4)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -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 -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -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 -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: Qt5::Test Qt5::Concurrent Qt5::OpenGL /usr/lib/x86_64-linux-gnu/libwebp.so /usr/lib/x86_64-linux-gnu/libjasper.so /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 /usr/lib/libgdal.so gstbase-1.0 gstreamer-1.0 gobject-2.0 glib-2.0 dc1394 xine avcodec avformat avutil swscale Qt5::Core Qt5::Gui Qt5::Widgets /usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libsz.so /usr/lib/x86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libm.so vtkRenderingOpenGL vtkImagingHybrid vtkIOImage vtkCommonDataModel vtkCommonMath vtkCommonCore vtksys vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkCommonExecutionModel vtkDICOMParser vtkIOCore /usr/lib/x86_64-linux-gnu/libz.so vtkmetaio /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libtiff.so vtkImagingCore vtkRenderingCore vtkCommonColor vtkFiltersExtraction vtkFiltersCore vtkFiltersGeneral vtkCommonComputationalGeometry vtkFiltersStatistics vtkImagingFourier vtkalglib vtkFiltersGeometry vtkFiltersSources vtkInteractionStyle vtkRenderingLOD vtkFiltersModeling vtkIOPLY vtkIOGeometry vtkFiltersTexture vtkRenderingFreeType /usr/lib/x86_64-linux-gnu/libfreetype.so vtkftgl vtkIOExport vtkRenderingAnnotation vtkImagingColor vtkRenderingContext2D vtkRenderingGL2PS vtkRenderingContextOpenGL /usr/lib/x86_64-linux-gnu/libgl2ps.so vtkRenderingLabel tesseract lept dl m pthread rt /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so tbb /usr/lib/libopenblas.so cudart nppc nppi npps cufft -L/usr/lib/x86_64-linux-gnu
-- 3rdparty dependencies: libprotobuf
--
-- OpenCV modules:
-- To be built: cudev core cudaarithm flann hdf imgproc ml reg surface_matching video viz cudabgsegm cudafilters cudaimgproc cudawarping dnn freetype fuzzy imgcodecs photo shape videoio cudacodec highgui objdetect plot ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo cvv datasets rgbd stereo superres tracking videostab xfeatures2d ximgproc aruco optflow phase_unwrapping stitching structured_light java python2 python3
-- Disabled: world contrib_world
-- Disabled by dependency: -
-- Unavailable: cnn_3dobj matlab sfm
--
-- GUI:
-- QT 5.x: YES (ver 5.6.1)
-- QT OpenGL support: YES (Qt5::OpenGL 5.6.1)
-- OpenGL support: YES (/usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so)
-- VTK support: YES (ver 6.3.0)
--
-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
-- WEBP: /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0209)
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.25)
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.6)
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
-- 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)
-- GDAL: /usr/lib/libgdal.so
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.4)
-- FFMPEG: YES
-- avcodec: YES (ver 57.24.102)
-- avformat: YES (ver 57.25.100)
-- avutil: YES (ver 55.17.103)
-- swscale: YES (ver 4.0.100)
-- avresample: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: YES (ver 1.2.6)
-- gPhoto2: NO
--
-- Parallel framework: TBB (ver 4.4 interface 9005)
--
-- Other third-party libraries:
-- Use IPP: 9.0.1 [9.0.1]
-- at: /home/rodrigo/OpenCV/build/3rdparty/ippicv/ippicv_lnx
-- Use IPP Async: NO
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: YES (/usr/lib/libopenblas.so)
-- Use Eigen: YES (ver 3.2.93)
-- Use Cuda: YES (ver 8.0)
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- NVIDIA CUDA
-- Use CUFFT: YES
-- Use CUBLAS: NO
-- USE NVCUVID: NO
-- NVIDIA GPU arch: 20 30 35 37 50 52 60 61
-- NVIDIA PTX archs:
-- Use fast math: NO
--
-- OpenCL: <Dynamic loading of OpenCL library>
-- Include path: /home/rodrigo/OpenCV/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.12)
-- Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12+)
-- numpy: /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.11.3)
-- packages path: lib/python2.7/dist-packages
--
-- Python 3:
-- Interpreter: /usr/bin/python3 (ver 3.5.2)
-- Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2+)
-- numpy: /home/rodrigo/.local/lib/python3.5/site-packages/numpy/core/include (ver 1.12.0)
-- packages path: lib/python3.5/dist-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: /usr/bin/ant (ver 1.9.7)
-- JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
-- Java wrappers: YES
-- Java tests: YES
--
-- Matlab: Matlab not found or implicitly disabled
--
-- Documentation:
-- Doxygen: /usr/bin/doxygen (ver 1.8.11)
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: YES
--
-- Install path: /usr/local
--
-- cvconfig.h is in: /home/rodrigo/OpenCV/build
-- -----------------------------------------------------------------
--
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Tesseract_INCLUDE_DIR
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
used as include directory in directory /home/rodrigo/opencv_contrib-3.2.0/modules/text
-- Configuring incomplete, errors occurred!
See also "/home/rodrigo/OpenCV/build/CMakeFiles/CMakeOutput.log".
See also "/home/rodrigo/OpenCV/build/CMakeFiles/CMakeError.log".
Makefile:6376: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (1 by maintainers)
I found bug is completely related to opencv and opencv_contrib branch, I have solved by checking out both of them to same branch such as
then
after this building cmake working fine.
sudo apt-get install libgstreamer-plugins-base1.0-dev
By clean directory he means that he wants you to delete the build and mkdir build cd build and run cmake again
It turned out that, as you pointed out, building from a clean directory solved the problem.
Thanks a lot for your answer.
@rodrigocesar HI,how do you solve the the question of “videoio.h”, thanks for your reply
This is the correct answer.
This may be also helpful and absolutely seems to be sth. one should do.
same problem. how to solve. should i remove open cv 3.1.0 or how to build from a cleandirectory