I am currently blocked on compiling the latest git version of digikam, see https://bugs.kde.org/show_bug.cgi?id=360017. Developers there say that it is not a digikam problem but instead a packaging problem of the Gentoo package! Reproducible: Always Steps to Reproduce: 1. install opencv-3.1.0-r2 2. try to compile a recent version of digikam (I took the git version) Actual Results: 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) It seems that the "contrib" stuff from the opencv package is built, as one can see from various compiler warnings, but nothing is installed. I also tried all older versions of opencv which are in portage, but with no luck. I searched through my backups about anything related to "opencv_contrib" and I found things like /usr/lib64/libopencv_contrib.so.2.4.10 - so I conclude that this stuff got broken by some recent update of that package!?
Created attachment 427350 [details] output of "emerge -pv opencv ; emerge -v opencv"
Works for me: -- First try at finding OpenCV... -- Great, found OpenCV on the first try. -- OpenCV Root directory is: /usr/share/OpenCV -- OpenCV: Found version 3.1.0 (required: 3.0.0) -- OpenCV headers: /usr/include/opencv;/usr/include -- OpenCV libs : opencv_core;opencv_highgui;opencv_objdetect;opencv_imgproc Do you use the Gentoo ebuild for digikam-9999 from kde overlay or build it yourself? Because in the latter case, make sure you configure with -DENABLE_OPENCV3=ON
I use digikam sources from git, no gentoo package. Now as you suggested I tried that cmake parameter too, but it does not have any effect, still the same result. could you please check this: $ equery f opencv | grep -i contrib (on my system it returns nothing) $ emerge -pv opencv These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] media-libs/opencv-3.1.0-r2:0/3.1::gentoo USE="contrib eigen ffmpeg gphoto2 gtk java jpeg jpeg2k opengl openmp pch png python qt5 threads tiff -cuda -doc -examples -gdal -gstreamer -ieee1394 (-ipp) -libav -opencl -openexr -qt4 -testprograms -v4l -vaapi -vtk -webp -xine" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4 -python3_5" PYTHON_TARGETS="python2_7 python3_4 -python3_3 -python3_5" 0 KiB
Contrib modules are installed under /usr/include/opencv2/ and for the .so files, you need to grep for actual modules: $ equery f opencv | grep face.so /usr/lib64/libopencv_face.so /usr/lib64/libopencv_face.so.3.1 /usr/lib64/libopencv_face.so.3.1.0 $ equery f opencv | grep bioinspired.so /usr/lib64/libopencv_bioinspired.so /usr/lib64/libopencv_bioinspired.so.3.1 /usr/lib64/libopencv_bioinspired.so.3.1.0 But it shouldn't actually matter: https://quickgit.kde.org/?p=digikam.git&a=commit&h=b400f57f7c457b0bac5ea3d4fd39fbde0c5e11e5 Since that upstream commit, digikam does not use any contrib module, if the -DENABLE_OPENCV3=ON parameter is set.
What exactly is contrib sub package? As I can see from your build log lot of modules from contrib were installed. What's the problem?
In versions of opencv 2.* were contrib part of whole opencv. From version 3.0 it's a separated. https://github.com/Itseez/opencv_contrib https://github.com/Itseez/opencv
oh damn... sorry guys, I found the bug! The parameter -DENABLE_OPENCV3=OFF was _HARDCODED_ directly into the bootstrap.linux script of digikam, and of course _after_ the user defined parameters, overriding whatever was set in the way mentioned in the bootstrap.local script. I will re-open the corresponding bug report against digikam. thanks for helping in figuring that out!