New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX 10.11 cmake opencv3.1 errors #6066

Closed
vinllen opened this Issue Feb 5, 2016 · 18 comments

Comments

@vinllen

vinllen commented Feb 5, 2016

Opencv 2.4 works well in my mac, but i cannot pass the cmake step in opencv3.1.

vinllen@ ~/opt/opencv-3.1.0/build$ cmake ..
-- checking for module 'gstreamer-base-1.0'
--   package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
--   package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
--   package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
--   package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
--   package 'gstreamer-pbutils-1.0' not found
-- checking for module 'gstreamer-base-0.10'
--   package 'gstreamer-base-0.10' not found
-- checking for module 'gstreamer-video-0.10'
--   package 'gstreamer-video-0.10' not found
-- checking for module 'gstreamer-app-0.10'
--   package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-riff-0.10'
--   package 'gstreamer-riff-0.10' not found
-- checking for module 'gstreamer-pbutils-0.10'
--   package 'gstreamer-pbutils-0.10' not found
-- checking for module 'libdc1394-2'
--   package 'libdc1394-2' not found
-- checking for module 'libdc1394'
--   package 'libdc1394' not found
-- checking for module 'libv4l1'
--   package 'libv4l1' not found
-- checking for module 'libv4l2'
--   package 'libv4l2' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   package 'libavcodec' not found
-- checking for module 'libavformat'
--   package 'libavformat' not found
-- checking for module 'libavutil'
--   package 'libavutil' not found
-- checking for module 'libswscale'
--   package 'libswscale' not found
-- checking for module 'libavresample'
--   package 'libavresample' not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'libgphoto2'
--   package 'libgphoto2' not found
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /Users/vinllen/opt/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_osx
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
-- Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required is exact version "2.7.10" (found /usr/lib/libpython2.7.dylib)
-- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3.4" (found /usr/local/bin/python)
-- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3.2" (found /usr/local/bin/python)
-- 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)
-- Found VTK ver. 6.1.0 (usefile: /usr/local/lib/cmake/vtk-6.1/UseVTK.cmake)
CMake Error at cmake/OpenCVModule.cmake:295 (message):
  No extra modules found in folder: /Users/vinllen/opencv_contrib/modules

  Please provide path to 'opencv_contrib/modules' folder.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)


-- Assume that non-module dependency is available: -framework OpenCL (for module opencv_core)
CMake Error at samples/gpu/CMakeLists.txt:100 (list):
  list sub-command REMOVE_ITEM requires list to be present.


--
-- General configuration for OpenCV 3.1.0 =====================================
--   Version control:               unknown
--
--   Platform:
--     Host:                        Darwin 14.3.0 x86_64
--     CMake:                       3.3.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  (ver 6.1.0.6020053)
--     C++ flags (Release):         -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
--     C flags (Release):           -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):
--     Linker flags (Debug):
--     Precompiled headers:         NO
--     Extra dependencies:          -framework OpenCL -framework QTKit -framework QuartzCore -framework AppKit vtkRenderingOpenGL vtkImagingHybrid vtkIOImage vtkCommonDataModel vtkCommonMath vtkCommonCore vtksys vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkCommonExecutionModel vtkDICOMParser vtkIOCore vtkzlib vtkmetaio vtkjpeg vtkpng vtktiff vtkImagingCore vtkRenderingCore vtkFiltersExtraction vtkFiltersCore vtkFiltersGeneral vtkCommonComputationalGeometry vtkFiltersStatistics vtkImagingFourier vtkalglib vtkFiltersGeometry vtkFiltersSources vtkInteractionStyle vtkRenderingLOD vtkFiltersModeling vtkIOPLY vtkIOGeometry vtkjsoncpp vtkFiltersTexture vtkRenderingFreeType vtkfreetype vtkftgl vtkIOExport vtkRenderingAnnotation vtkImagingColor vtkRenderingContext2D vtkRenderingGL2PS vtkgl2ps vtkRenderingLabel -framework Cocoa
--     3rdparty dependencies:       libjpeg libwebp libpng libtiff libjasper IlmImf zlib
--
--   OpenCV modules:
--     To be built:                 core cudaarithm flann imgproc ml video viz cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudaoptflow highgui objdetect superres ts cudaobjdetect features2d calib3d cudafeatures2d cudastereo stitching videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cudacodec cudalegacy cudev java python2 python3
--
--   GUI:
--     QT:                          NO
--     Cocoa:                       YES
--     OpenGL support:              NO
--     VTK support:                 YES (ver 6.1.0)
--
--   Media I/O:
--     ZLib:                        build (ver 1.2.8)
--     JPEG:                        build (ver 90)
--     WEBP:                        build (ver 0.3.1)
--     PNG:                         build (ver 1.6.19)
--     TIFF:                        build (ver 42 - 4.0.2)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
--     GDAL:                        NO
--
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      NO
--       codec:                     NO
--       format:                    NO
--       util:                      NO
--       swscale:                   NO
--       resample:                  NO
--       gentoo-style:              NO
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     QuickTime:                   NO
--     QTKit:                       YES
--     V4L/V4L2:                    NO/NO
--     XIMEA:                       NO
--     gPhoto2:                     NO
--
--   Parallel framework:            GCD
--
--   Other third-party libraries:
--     Use IPP:                     9.0.1 [9.0.1]
--          at:                     /Users/vinllen/opt/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_osx
--     Use IPP Async:               NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Eigen:                   YES (ver 3.2.7)
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
--     Use custom HAL:              NO


--
--   OpenCL:
--     Version:                     static
--     libraries:                   -framework OpenCL
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
--
--   Python 2:
--     Interpreter:                 /usr/local/bin/python2.7 (ver 2.7.10)
--
--   Python 3:
--     Interpreter:                 NO
--
--   Python (for build):            /usr/local/bin/python2.7
--
--   Java:
--     ant:                         NO
--     JNI:                         /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers
--     Java wrappers:               NO
--     Java tests:                  NO
--
--   Matlab:                        Matlab not found or implicitly disabled
--
--   Documentation:
--     Doxygen:                     NO
--     PlantUML:                    NO
--
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              YES
--
--   Install path:                  /usr/local
--
--   cvconfig.h is in:              /Users/vinllen/opt/opencv-3.1.0/build
-- -----------------------------------------------------------------
--
-- Configuring incomplete, errors occurred!
See also "/Users/vinllen/opt/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
See also "/Users/vinllen/opt/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

The errors in CMakeError.log show below:

/Users/vinllen/opt/opencv-3.1.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:19:12: error: use of undeclared identifier 'off64_t'; did you mean 'off_t'?
  ('0' + ((SIZE / 10000)%10)),
           ^
/Users/vinllen/opt/opencv-3.1.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:17:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
                     ^
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^

@alalek

This comment has been minimized.

Show comment
Hide comment
@alalek

alalek Feb 5, 2016

Contributor

Right error message is here:

No extra modules found in folder: /Users/vinllen/opencv_contrib/modules

Contributor

alalek commented Feb 5, 2016

Right error message is here:

No extra modules found in folder: /Users/vinllen/opencv_contrib/modules

@alalek alalek added the invalid label Feb 5, 2016

@vinllen

This comment has been minimized.

Show comment
Hide comment
@vinllen

vinllen Feb 5, 2016

The weired thing is that i do not have this folder, even no /Users/vinllen/opencv_contrib.

vinllen commented Feb 5, 2016

The weired thing is that i do not have this folder, even no /Users/vinllen/opencv_contrib.

@alalek

This comment has been minimized.

Show comment
Hide comment
@alalek

alalek Feb 5, 2016

Contributor

You need to build from scratch (clean build directory)
How do you run CMake?

Contributor

alalek commented Feb 5, 2016

You need to build from scratch (clean build directory)
How do you run CMake?

@vinllen

This comment has been minimized.

Show comment
Hide comment
@vinllen

vinllen Feb 5, 2016

Hi, Alalek,
I just run the below commands:

mkdir build && cd build
cmake ../

vinllen commented Feb 5, 2016

Hi, Alalek,
I just run the below commands:

mkdir build && cd build
cmake ../
@vinllen

This comment has been minimized.

Show comment
Hide comment
@vinllen

vinllen Feb 5, 2016

Thanks Alalek, it works .

vinllen commented Feb 5, 2016

Thanks Alalek, it works .

@StevenPuttemans

This comment has been minimized.

Show comment
Hide comment
@StevenPuttemans

StevenPuttemans Feb 5, 2016

Contributor

Then this can be closed down :)

Contributor

StevenPuttemans commented Feb 5, 2016

Then this can be closed down :)

@alalek alalek closed this Feb 5, 2016

@hawaiikaos

This comment has been minimized.

Show comment
Hide comment
@hawaiikaos

hawaiikaos Feb 19, 2016

I'm having this same issue. However I'm not sure how this was resolved above? I've been removing the build folder, remaking it, and rerunning cmake, but no dice.

My cmake command is this:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D PYTHON2_PACKAGES_PATH=~/.virtualenvs/cv/lib/python2.7/site-packages \
    -D PYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/bin \
    -D PYTHON2_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Headers \
    -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..

hawaiikaos commented Feb 19, 2016

I'm having this same issue. However I'm not sure how this was resolved above? I've been removing the build folder, remaking it, and rerunning cmake, but no dice.

My cmake command is this:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D PYTHON2_PACKAGES_PATH=~/.virtualenvs/cv/lib/python2.7/site-packages \
    -D PYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/bin \
    -D PYTHON2_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Headers \
    -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
@alalek

This comment has been minimized.

Show comment
Hide comment
@alalek

alalek Feb 19, 2016

Contributor

OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules

Try to specify full path without ~

Contributor

alalek commented Feb 19, 2016

OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules

Try to specify full path without ~

@hawaiikaos

This comment has been minimized.

Show comment
Hide comment
@hawaiikaos

hawaiikaos Feb 19, 2016

Ah cool. I didn't realise that the extra modules were a separate thing (I was using instructions from a different site). I've installed that, and cmake proceeded to build correctly. Thanks for your help!

hawaiikaos commented Feb 19, 2016

Ah cool. I didn't realise that the extra modules were a separate thing (I was using instructions from a different site). I've installed that, and cmake proceeded to build correctly. Thanks for your help!

@monajalal

This comment has been minimized.

Show comment
Hide comment
@monajalal

monajalal Aug 3, 2016

@alalek @StevenPuttemans @hawaiikaos @vinllen
so I gave it the complete path but got this error:

-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- 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
-- Checking for module 'libv4l1'
--   No package 'libv4l1' found
-- Checking for module 'libv4l2'
--   No package 'libv4l2' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
-- Found PythonInterp: /Users/mona/.pyenv/shims/python (found suitable version "2.7.12", minimum required is "2.7")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is exact version "2.7.12" (found /usr/lib/libpython2.7.dylib)
-- Found PythonInterp: /usr/local/bin/python3.4 (found suitable version "3.4.1", minimum required is "3.4")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is exact version "3.4.1" (found /usr/lib/libpython2.7.dylib)
-- Found apache ant 1.9.7: /usr/local/bin/ant
-- Found JNI: /System/Library/Frameworks/JavaVM.framework
-- 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)
CMake Error at /usr/local/Cellar/vtk/7.0.0_1/lib/cmake/vtk-7.0/vtkModuleAPI.cmake:120 (message):
  Requested modules not available:

    vtkRenderingOpenGL
Call Stack (most recent call first):
  /usr/local/lib/cmake/vtk-7.0/VTKConfig.cmake:88 (vtk_module_config)
  cmake/OpenCVDetectVTK.cmake:6 (find_package)
  CMakeLists.txt:597 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/mona/computer_vision/Face_Recognition/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
See also "/Users/mona/computer_vision/Face_Recognition/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

Here's the CMake command I wrote in the build folder:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D BUILD_opencv_java=OFF \
      -D WITH_IPP=OFF -D WITH_1394=OFF \
      -D WITH_FFMPEG=OFF \
      -D BUILD_EXAMPLES=OFF \
      -D BUILD_TESTS=OFF \
      -D BUILD_PERF_TESTS=OFF \
      -D BUILD_DOCS=OFF \
      -D BUILD_opencv_python2=ON \
      -D BUILD_opencv_python3=ON \
      -D BUILD_opencv_video=OFF \
      -D BUILD_opencv_videoio=OFF \
      -D BUILD_opencv_videostab=OFF \
      -D PYTHON_EXECUTABLE=$(which python) \
      -D OPENCV_EXTRA_MODULES_PATH=/Users/mona/computer_vision/Face_Recognition/opencv_contrib-3.1.0/modules ..

monajalal commented Aug 3, 2016

@alalek @StevenPuttemans @hawaiikaos @vinllen
so I gave it the complete path but got this error:

-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- 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
-- Checking for module 'libv4l1'
--   No package 'libv4l1' found
-- Checking for module 'libv4l2'
--   No package 'libv4l2' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
-- Found PythonInterp: /Users/mona/.pyenv/shims/python (found suitable version "2.7.12", minimum required is "2.7")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is exact version "2.7.12" (found /usr/lib/libpython2.7.dylib)
-- Found PythonInterp: /usr/local/bin/python3.4 (found suitable version "3.4.1", minimum required is "3.4")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is exact version "3.4.1" (found /usr/lib/libpython2.7.dylib)
-- Found apache ant 1.9.7: /usr/local/bin/ant
-- Found JNI: /System/Library/Frameworks/JavaVM.framework
-- 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)
CMake Error at /usr/local/Cellar/vtk/7.0.0_1/lib/cmake/vtk-7.0/vtkModuleAPI.cmake:120 (message):
  Requested modules not available:

    vtkRenderingOpenGL
Call Stack (most recent call first):
  /usr/local/lib/cmake/vtk-7.0/VTKConfig.cmake:88 (vtk_module_config)
  cmake/OpenCVDetectVTK.cmake:6 (find_package)
  CMakeLists.txt:597 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/mona/computer_vision/Face_Recognition/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
See also "/Users/mona/computer_vision/Face_Recognition/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

Here's the CMake command I wrote in the build folder:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D BUILD_opencv_java=OFF \
      -D WITH_IPP=OFF -D WITH_1394=OFF \
      -D WITH_FFMPEG=OFF \
      -D BUILD_EXAMPLES=OFF \
      -D BUILD_TESTS=OFF \
      -D BUILD_PERF_TESTS=OFF \
      -D BUILD_DOCS=OFF \
      -D BUILD_opencv_python2=ON \
      -D BUILD_opencv_python3=ON \
      -D BUILD_opencv_video=OFF \
      -D BUILD_opencv_videoio=OFF \
      -D BUILD_opencv_videostab=OFF \
      -D PYTHON_EXECUTABLE=$(which python) \
      -D OPENCV_EXTRA_MODULES_PATH=/Users/mona/computer_vision/Face_Recognition/opencv_contrib-3.1.0/modules ..
@sergio11

This comment has been minimized.

Show comment
Hide comment
@sergio11

sergio11 Oct 20, 2016

I get the same error that @monajalal
I am using Darwin Kernel Version 15.4.0

sergio11 commented Oct 20, 2016

I get the same error that @monajalal
I am using Darwin Kernel Version 15.4.0

@jhljx

This comment has been minimized.

Show comment
Hide comment
@jhljx

jhljx Oct 24, 2016

Has the problem been solved?

jhljx commented Oct 24, 2016

Has the problem been solved?

@lvngd

This comment has been minimized.

Show comment
Hide comment
@lvngd

lvngd Oct 27, 2016

I'm having this problem as well.

lvngd commented Oct 27, 2016

I'm having this problem as well.

@lvngd

This comment has been minimized.

Show comment
Hide comment
@lvngd

lvngd Oct 28, 2016

I resolved this by switching INSTALL_C_EXAMPLES=OFF - I had it set to ON originally. just in case it helps anyone.

lvngd commented Oct 28, 2016

I resolved this by switching INSTALL_C_EXAMPLES=OFF - I had it set to ON originally. just in case it helps anyone.

@sergio11

This comment has been minimized.

Show comment
Hide comment
@sergio11

sergio11 Oct 28, 2016

yes, also it happens the same to install GNU / Linux, change INSTALL_C_EXAMPLES=OFF and start building!!!

sergio11 commented Oct 28, 2016

yes, also it happens the same to install GNU / Linux, change INSTALL_C_EXAMPLES=OFF and start building!!!

@ethanjyx

This comment has been minimized.

Show comment
Hide comment
@ethanjyx

ethanjyx Apr 14, 2017

Still happening to me. Wondering if there are any updates, INSTALL_C_EXAMPLES=OFF does not work for me.

ethanjyx commented Apr 14, 2017

Still happening to me. Wondering if there are any updates, INSTALL_C_EXAMPLES=OFF does not work for me.

@monabiyan

This comment has been minimized.

Show comment
Hide comment
@monabiyan

monabiyan Sep 11, 2017

INSTALL_C_EXAMPLES=OFF does not help me either. Still get the error:

Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required
is exact version "2.7.13" (found /usr/lib/libpython2.7.dylib)

monabiyan commented Sep 11, 2017

INSTALL_C_EXAMPLES=OFF does not help me either. Still get the error:

Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required
is exact version "2.7.13" (found /usr/lib/libpython2.7.dylib)

@aggarwalyash

This comment has been minimized.

Show comment
Hide comment
@aggarwalyash

aggarwalyash Oct 19, 2017

Try this:---
You need opencv_contrib also
$ cd ~
$ git clone https://github.com/Itseez/opencv_contrib.git
$ cd opencv_contrib
$ git checkout 3.0.0

Note :- replace 3.0.0 with your opencv version

$ cd ~/opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..

It solved my problem....!!!!!!
@ethanjyx @monabiyan

aggarwalyash commented Oct 19, 2017

Try this:---
You need opencv_contrib also
$ cd ~
$ git clone https://github.com/Itseez/opencv_contrib.git
$ cd opencv_contrib
$ git checkout 3.0.0

Note :- replace 3.0.0 with your opencv version

$ cd ~/opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..

It solved my problem....!!!!!!
@ethanjyx @monabiyan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment