Problem with building opencv_contrib
System information (version)
- OpenCV => 3.4.1
- Operating System / Platform => macOS High Sierra
- Compiler => Apple Clang 9.1.0.9020039
Detailed description
I get these two errors while building OpenCV_contrib:
/Users/Marvin/Documents/OpenCV3/opencv_contrib/modules/face/src/lbph_faces.cpp:312:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
/Users/Marvin/Documents/OpenCV3/opencv_contrib/modules/bioinspired/src/retina_ocl.cpp:395:1: error: control may reach end of non-void function [-Werror,-Wreturn-type] } ^ /Users/Marvin/Documents/OpenCV3/opencv_contrib/modules/bioinspired/src/retina_ocl.cpp:451:65: error: control reaches end of non-void function [-Werror,-Wreturn-type] const Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; } ^ /Users/Marvin/Documents/OpenCV3/opencv_contrib/modules/bioinspired/src/retina_ocl.cpp:452:65: error: control reaches end of non-void function [-Werror,-Wreturn-type] const Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; }
What am i doing wrong?
This is the cmake command:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D PYTHON2_LIBRARY=$PYTHON2_LIBRARY -D PYTHON2_INCLUDE_DIR=$PYTHON2_INCLUDE_DIR -D PYTHON2_EXECUTABLE=$PYTHON2_EXECUTABLE -D BUILD_opencv_python2=ON -D BUILD_opencv_python3=OFF -D INSTALL_PYTHON_EXAMPLES=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules/ ../opencv
I want to build OpenCV with the Contrib module with Python support, it worked previously without the opencv_contrib model.
Thanks for your help, Marvin
just curious, the buildbots do not set the -Wreturn-type flag. did you add that manually ?