OpenCV 3.0 make error
Hi,
I'm trying to build OpenCV 3.0 for both Python 2.7 and Python 3.4 on my Macbook Pro (OSX Yosemite). I used my own cmake :
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D PYTHON3_PACKAGES_PATH=/usr/local/lib/python3.4/site-packages \ -D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib \ -D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/include/python3.4m \ -D PYTHON2_PACKAGES_PATH=/usr/local/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=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D BUILD_EXAMPLES=ON \ -D BUILD_opencv_python3=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
The result seems to be good (python2 and python3 are to be built):
-- OpenCV modules: -- To be built: hal core flann imgproc ml photo reg surface_matching video imgcodecs shape videoio highgui objdetect optflow superres tracking ts xobjdetect xphoto adas bgsegm bioinspired face features2d latentsvm line_descriptor saliency text calib3d ccalib datasets rgbd stereo videostab xfeatures2d ximgproc stitching matlab python2 python3
But during the make step, at 80% it fails :
[ 79%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_perf_xfeatures2d.dir/perf/perf_main.cpp.o [ 79%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_detectors.cpp.o [ 79%] Building CXX object modules/ximgproc/CMakeFiles/example_ximgproc_disparity_filtering.dir/samples/disparity_filtering.cpp.o [ 79%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_perf_xfeatures2d.dir/perf/perf_surf.cpp.o /Users/julianblin/opencv_contrib/modules/ximgproc/samples/disparity_filtering.cpp:170:47: error: no member named 'MODE_SGBM_3WAY' in 'cv::StereoSGBM' left_matcher->setMode(StereoSGBM::MODE_SGBM_3WAY); ~~~~~~~~~~~~^ /Users/julianblin/opencv_contrib/modules/ximgproc/samples/disparity_filtering.cpp:235:42: error: no member named 'MODE_SGBM_3WAY' in 'cv::StereoSGBM' matcher->setMode(StereoSGBM::MODE_SGBM_3WAY); ~~~~~~~~~~~~^ 2 errors generated. make[2]: * [modules/ximgproc/CMakeFiles/example_ximgproc_disparity_filtering.dir/samples/disparity_filtering.cpp.o] Error 1 make[1]: [modules/ximgproc/CMakeFiles/example_ximgproc_disparity_filtering.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 79%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_features2d.cpp.o [ 79%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_perf_xfeatures2d.dir/perf/perf_surf.cuda.cpp.o [ 79%] Linking CXX executable ../../bin/example_xfeatures2d_bagofwords_classification [ 79%] Built target example_xfeatures2d_bagofwords_classification [ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_keypoints.cpp.o [ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_main.cpp.o [ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_perf_xfeatures2d.dir/perf/perf_surf.ocl.cpp.o [ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_rotation_and_scale_invariance.cpp.o [ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_surf.cuda.cpp.o [ 80%] Linking CXX executable ../../bin/opencv_perf_xfeatures2d [ 80%] Built target opencv_perf_xfeatures2d [ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_surf.ocl.cpp.o [ 80%] Linking CXX executable ../../bin/opencv_test_xfeatures2d [ 80%] Built target opencv_test_xfeatures2d make: * [all] Error 2
Any idea to solve this issue ? Thanks !!