Summary: | media-libs/opencv-4.1.2-r2 USE="-contrib cuda -download" : CMake Error: CUDA: OpenCV requires enabled 'cudev' module from 'opencv_contrib' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Daniel M. Weeks <dan> |
Component: | Current packages | Assignee: | Amy Liffey <amynka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | albert, alex, DaBler, pacho, phobosk, rossbridger.cc, sam, skobkin-ru |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=701712 https://github.com/gentoo/gentoo/pull/17899 https://bugs.gentoo.org/show_bug.cgi?id=792282 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Daniel M. Weeks
2020-01-02 03:17:12 UTC
I can confirm this issue. Moreover, even if I installl the =media-libs/opencv-4.1.2-r2 with USE="contrib cuda download" and FEATURES="-network-sandbox", the "pkg-config --cflags opencv4" misses the following include path on my system: -I/opt/cuda/targets/x86_64-linux/include Once this is added to CFLAGS in my Makefile, everything works properly. Also USE="cuda" does not work with gcc > 8.3 Same issue here. I will test with David Bařina suggestions. I have tried to run cuda_sanitize (from cuda.eclass) to try to get right gcc version used by it still fails :/ Maybe it is not respecting NVCCFLAGS variable. It seems detection is done using variables like NVCC_FLAGS_EXTRA Looks like the situation is unchanged with media-libs/opencv-4.1.2-r3 I can't compile it successfully, even using gcc-8.3.0 and USE="contrib cuda download" /var/tmp/portage/media-libs/opencv-4.1.2-r3/work/opencv-4.1.2/modules/core/include/opencv2/core/base.hpp:320:40: error: expected constructor, destructor, or type conversion before ‘(’ token #define CV_Error( code, msg ) cv::error( code, msg, CV_Func, __FILE__, __LINE__ ) ^ /var/tmp/portage/media-libs/opencv-4.1.2-r3/work/opencv_contrib-4.1.2/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp:15:1: note: in expansion of macro ‘CV_Error’ CV_Error(cv::Error::HeaderIsNull, "Nvidia Optical Flow headers not found. Make sure cmake downloads it properly"); The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c92eaa6a7d93400503334e9c65df2b8e400ab90f commit c92eaa6a7d93400503334e9c65df2b8e400ab90f Author: Ross Charles Campbell <rossbridger.cc@gmail.com> AuthorDate: 2020-10-18 14:59:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-11-03 07:18:26 +0000 media-libs/opencv: various fixes - Explicitly depends on virtual/lapacke to prevent its cmake build scripts from implicitly disabling lapack support when it can't find lapacke.h. - Link with cblas when sci-libs/lapack is supplimented as the default lapack implementation. - examples USE requires contribdnn USE to be enabled to prevent build failure. Closes: https://bugs.gentoo.org/700176 Closes: https://bugs.gentoo.org/749681 Closes: https://bugs.gentoo.org/717812 Closes: https://bugs.gentoo.org/701790 Closes: https://bugs.gentoo.org/704518 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/17964 Signed-off-by: Sam James <sam@gentoo.org> .../opencv-4.5.0-link-with-cblas-for-lapack.patch | 18 ++++++++++++++++++ media-libs/opencv/opencv-4.5.0.ebuild | 8 +++++++- 2 files changed, 25 insertions(+), 1 deletion(-) |