I tried to build yesterday's git version, but it does stop in cmake while checking for opencv. Reproducible: Always Steps to Reproduce: 1. ./bootstrap.local Actual Results: [...] -- First try at finding OpenCV... CMake Error at /usr/share/OpenCV/OpenCVConfig.cmake:232 (message): opencv_contrib is required but was not found Call Stack (most recent call first): core/cmake/modules/MacroOpenCV.cmake:27 (find_package) core/CMakeLists.txt:229 (DETECT_OPENCV) [...] I am currently using media-libs/opencv-3.1.0-r2 (Gentoo Linux), and also tried after downgrading to media-libs/opencv-3.1.0-r1, media-libs/opencv-3.0.0, but with no luck. Also setting ADDITIONAL_CMAKE_FLAGS='-DENABLE_OPENCV3:BOOL=ON', as suggested by a bug report on redhat bugtracker made no difference. Seems that digikam is not aware of the new opencv-3.x at all, I searched my backups about anything related to "opencv_contrib" and I only found things like /usr/lib64/libopencv_contrib.so.2.4.10 - so I conclude that this library does no longer exist in opencv >= v3.0. My current version of "core" is: commit 41b97ecec0703c61bf25e2a8d700908c5da37850 (Date: Wed Mar 2 22:48:15 2016 +0100)
Not reproducible. digiKam compile fine with OpenCV 3.1. If Contrib component is require by Cmake config script installed by OpenCV itself, well install the necessary package on your computer. (/usr/share/OpenCV/OpenCVConfig.cmake) It sound like a packaging problem as well. Gilles Caulier
ok, thanks for the information! You mean that opencv_contrib stuff is really still included in the "opencv" package? (I thougt that stuff has been removed) In that case I will file a bug report against the gentoo package... Just for reference: https://bugs.gentoo.org/show_bug.cgi?id=576384
The contrib package is download at compilation time than OpenCV if i remember. Check Cmake config trace when you process OpenCV tarball... So i suspect that opencv have been compiled with it but packager forget to include contrib content in packaging process, or something like that. Note : OpenCV is a big puzzle. Gilles Caulier
I have to re-open that topic. I found out that all that trouble was caused by digikam itself! The big bug is that the bootstrap.linux script contains the parameter -DENABLE_OPENCV3=OFF in the cmake command line, _HARD CODED_ !!! and _after_ including the user defineable parameter list ADDITIONAL_CMAKE_FLAGS. So adding -DENABLE_OPENCV3=ON to ADDITIONAL_CMAKE_FLAGS in bootstrap.local is pretty useless! Please fix the bootstrap.linux script to allow overriding _all_ the hardcoded settings and adjust the comments in bootstrap.local !
Propose a patch to use ADDITIONAL_CMAKE_FLAGS in bootstrap.linux. For ex, check if ADDITIONAL_CMAKE_FLAGS is empty. In this case use hardcoded flags, else use ADDITIONAL_CMAKE_FLAGS instead. Gilles Caulier
Thomas, Did you seen my previous comment ? Gilles Caulier
No response. If you want to disable ENABLE_OPENCV3 while configuring, just use sed to edit in packaging scripts the default value, as i do for OSX and Windows packaging. sed -e "s/ENABLE_OPENCV3=OFF/ENABLE_OPENCV3=ON/g" ./bootstrap.linux It's enough and work perfectly. There is no plan to extend bootstrap script as well. If you want this kind of feature, propose a patch as well. Gilles Caulier
No response within one day? You guy seem to be really busy and impatient... Yes, I have seen your comment, but I have neither time nor motivation anymore to use a git version of digikam or to propose a path for that. Instead I will wait until digikam is in the official stable repo of my distribution and use that one.
I'm able to reproduce this error. (Using KUbuntu 16.04) opencv and opencv_contrib are both installed on my system, yet I received this error while running bootstrap.linux file. -- First try at finding OpenCV... CMake Error at /usr/local/share/OpenCV/OpenCVConfig.cmake:232 (message): opencv_contrib is required but was not found Call Stack (most recent call first): core/cmake/modules/MacroOpenCV.cmake:27 (find_package) core/CMakeLists.txt:246 (DETECT_OPENCV) -- Configuring incomplete, errors occurred! See also "/home/swati/digikam-software-compilation/build/CMakeFiles/CMakeOutput.log". See also "/home/swati/digikam-software-compilation/build/CMakeFiles/CMakeError.log".
OpenCV 2 or 3 is installed. There is a switch in bootstrap to use OpenCV 2 or 3 Gilles
Use bootstrap opencv option to switch between 2 or 3. It work fine here... Gilles Caulier