Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 637254

Summary: media-libs/opencv-3.3.0-r4: Configuring incomplete, errors occurred!
Product: Gentoo Linux Reporter: Samuel Bernardo <samuelbernardo.mail>
Component: Current packagesAssignee: Amy Liffey <amynka>
Status: RESOLVED DUPLICATE    
Severity: normal CC: conardcox, dilfridge, gaweal
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
emerge --info '=media-libs/opencv-3.3.0-r4::gentoo'
emerge -pqv '=media-libs/opencv-3.3.0-r4::gentoo'
applied patch for detected errors
CMakeOutput.log

Description Samuel Bernardo 2017-11-12 18:34:50 UTC
Created attachment 503752 [details]
build.log

After installing dev-util/nvidia-cuda-sdk-9.0.176 and dev-util/nvidia-cuda-toolkit-9.0.176, opencv-3.3.0-r4 need to recompile.
I review the errors and they seem not to be related with the new installed packages.
I create a patch to correct some of the errors reported from cmake. I also need to define CXXFLAGS="${CXXFLAGS} -std=c++11", applied from package.env.

The problem I'm detecting seems to be related with python. cmake is not detecting the local python available versions. I've installed python2.7 and python3.4.
After applying the patch it continues to fail in cmake dependency check.


emerge --info '=media-libs/opencv-3.3.0-r4::gentoo'
 will be submitted in attachment with file opencv-info.log

emerge -pqv '=media-libs/opencv-3.3.0-r4::gentoo'
 will be submitted in attachment with file opencv-pqv.log
Comment 1 Samuel Bernardo 2017-11-12 18:36:56 UTC
Created attachment 503754 [details]
emerge --info '=media-libs/opencv-3.3.0-r4::gentoo'
Comment 2 Samuel Bernardo 2017-11-12 18:38:31 UTC
Created attachment 503756 [details]
emerge -pqv '=media-libs/opencv-3.3.0-r4::gentoo'
Comment 3 Samuel Bernardo 2017-11-12 18:45:14 UTC
Created attachment 503810 [details, diff]
applied patch for detected errors
Comment 4 Samuel Bernardo 2017-11-12 18:46:41 UTC
Created attachment 503812 [details]
CMakeOutput.log
Comment 5 Samuel Bernardo 2017-11-12 18:49:58 UTC
The opencv state is also breaking emerge with resume or skipfirst...
It always tries to build opencv and break with the message

 * One or more packages are either masked or have missing dependencies:
 * 
 *   dev-util/nvidia-cuda-toolkit:0/8.0.61= pulled in by:
 *     (media-libs/opencv-3.3.0-r4:0/3.3::gentoo, installed)
 * 
 * The resume list contains packages that are either masked or have
 * unsatisfied dependencies. Please restart/continue the operation
 * manually, or use --skipfirst to skip the first package in the list and
 * any other packages that may be masked or have missing dependencies.
Comment 6 Samuel Bernardo 2017-11-12 22:02:27 UTC
After forcing the update excluding opencv it automatically downgrades cuda related packages to version 8 and allow to continue using already installed opencv.

For that I've executed the following command:
emerge -uDNAav --exclude=media-libs/opencv @world

Anyway, I can't compile opencv, that have been compiled and installed before, with current updated package versions.
Comment 8 Samuel Bernardo 2017-11-19 11:25:33 UTC
Hi Aweal,

(In reply to Aweal from comment #7)
> http://answers.opencv.org/question/175839/fail-to-build-opencv-330-with-
> opencv_contrib-330-and-cuda-toolkit-90/
> 
> is this thing?

Thanks for the link.
I continue with compilation error of opencv, even with cuda toolkit 8. The linux headers 4.9 remove or change some .h that appeared in previous versions that are used with opencv. Also python check scripts are not working as expected with cmake code.

The short version of my review is opencv source code seems to need some update. I already verify the requirements to build opencv from source and the ebuild should be working:
https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html

Btw, it's curious the most recent documentation to build opencv as the following reference:
"The following steps have been tested for Ubuntu 10.04 but should work with other distros as well."

Ubuntu 10.04 is using linux-headers-2.6.32.
https://packages.ubuntu.com/lucid/allpackages

The cmake script should do the necessary environment update, but unfortunately it's not working, at least for my Gentoo custom profile.
Comment 9 Aweal 2017-11-19 12:21:49 UTC
i had compiling without cuda use 

blender gpu is work
Comment 10 Amy Liffey gentoo-dev 2017-11-19 13:20:43 UTC

*** This bug has been marked as a duplicate of bug 637078 ***