Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576384 - media-libs/opencv-3.1.0-r2 does not contain the "contrib" sub package
Summary: media-libs/opencv-3.1.0-r2 does not contain the "contrib" sub package
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-03 21:07 UTC by Thomas
Modified: 2016-03-05 23:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of "emerge -pv opencv ; emerge -v opencv" (opencv-build.log,226.40 KB, text/plain)
2016-03-03 21:09 UTC, Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas 2016-03-03 21:07:59 UTC
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!?
Comment 1 Thomas 2016-03-03 21:09:47 UTC
Created attachment 427350 [details]
output of "emerge -pv opencv ; emerge -v opencv"
Comment 2 Andreas Sturmlechner gentoo-dev 2016-03-03 21:45:54 UTC
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
Comment 3 Thomas 2016-03-04 07:27:58 UTC
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
Comment 4 Andreas Sturmlechner gentoo-dev 2016-03-04 08:58:50 UTC
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.
Comment 5 Amy Liffey gentoo-dev 2016-03-04 10:23:41 UTC
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?
Comment 6 Amy Liffey gentoo-dev 2016-03-04 10:40:46 UTC
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
Comment 7 Thomas 2016-03-05 23:14:39 UTC
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!