Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] rebuild/emerge error on opencv-3.3.0-r4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
RayOfLight
n00b
n00b


Joined: 27 Aug 2013
Posts: 28
Location: Catalunya

PostPosted: Sat Nov 18, 2017 9:06 am    Post subject: [solved] rebuild/emerge error on opencv-3.3.0-r4 Reply with quote

emerge @preserved-rebuild asks me to rebuild opencv-3.3.0-r4, I have nvidia-cuda-toolkit-9.0.176 but when I emerge it, it complains:

Code:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppi_LIBRARY (ADVANCED)
    linked by target "opencv_cudev" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudev
    linked by target "opencv_cudev" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudev
    linked by target "opencv_core" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/core
    linked by target "opencv_core" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/core
    linked by target "opencv_cudaarithm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaarithm
    linked by target "opencv_flann" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/flann
    linked by target "opencv_flann" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/flann
    linked by target "opencv_imgproc" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/imgproc
    linked by target "opencv_imgproc" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/imgproc
    linked by target "opencv_ml" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/ml
    linked by target "opencv_ml" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/ml
    linked by target "opencv_objdetect" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/objdetect
    linked by target "opencv_objdetect" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/objdetect
    linked by target "opencv_phase_unwrapping" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/phase_unwrapping
    linked by target "opencv_phase_unwrapping" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/phase_unwrapping
    linked by target "opencv_plot" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/plot
    linked by target "opencv_plot" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/plot
    linked by target "opencv_reg" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/reg
    linked by target "opencv_reg" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/reg
    linked by target "opencv_surface_matching" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/surface_matching
    linked by target "opencv_surface_matching" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/surface_matching
    linked by target "opencv_video" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/video
    linked by target "opencv_video" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/video
    linked by target "opencv_xphoto" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/xphoto
    linked by target "opencv_xphoto" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/xphoto
    linked by target "opencv_bgsegm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/bgsegm
    linked by target "opencv_bgsegm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/bgsegm
    linked by target "opencv_cudabgsegm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudabgsegm
    linked by target "opencv_cudabgsegm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudabgsegm
    linked by target "opencv_cudafilters" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudafilters
    linked by target "opencv_cudafilters" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudafilters
    linked by target "opencv_cudaimgproc" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaimgproc
    linked by target "opencv_cudaimgproc" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaimgproc
    linked by target "opencv_cudawarping" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudawarping
    linked by target "opencv_cudawarping" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudawarping
    linked by target "opencv_dnn_modern" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/dnn_modern
    linked by target "opencv_dnn_modern" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/dnn_modern
    linked by target "opencv_face" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/face
    linked by target "opencv_face" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/face
    linked by target "opencv_freetype" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/freetype
    linked by target "opencv_freetype" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/freetype
    linked by target "opencv_fuzzy" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/fuzzy
    linked by target "opencv_fuzzy" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/fuzzy
    linked by target "opencv_img_hash" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/img_hash
    linked by target "opencv_img_hash" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/img_hash
    linked by target "opencv_imgcodecs" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/imgcodecs
    linked by target "opencv_imgcodecs" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/imgcodecs
    linked by target "opencv_photo" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/photo
    linked by target "opencv_photo" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/photo
    linked by target "opencv_shape" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/shape
    linked by target "opencv_shape" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/shape
    linked by target "opencv_videoio" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/videoio
    linked by target "opencv_videoio" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/videoio
    linked by target "opencv_xobjdetect" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/xobjdetect
    linked by target "opencv_xobjdetect" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/xobjdetect
    linked by target "opencv_cudacodec" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudacodec
    linked by target "opencv_cudacodec" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudacodec
    linked by target "opencv_highgui" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/highgui
    linked by target "opencv_highgui" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/highgui
    linked by target "opencv_bioinspired" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/bioinspired
    linked by target "opencv_bioinspired" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/bioinspired
    linked by target "opencv_dpm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/dpm
    linked by target "opencv_dpm" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/dpm
    linked by target "opencv_features2d" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/features2d
    linked by target "opencv_features2d" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/features2d
    linked by target "opencv_line_descriptor" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/line_descriptor
    linked by target "opencv_line_descriptor" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/line_descriptor
    linked by target "opencv_saliency" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/saliency
    linked by target "opencv_saliency" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/saliency
    linked by target "opencv_text" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/text
    linked by target "opencv_text" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/text
    linked by target "opencv_calib3d" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/calib3d
    linked by target "opencv_calib3d" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/calib3d
    linked by target "opencv_ccalib" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/ccalib
    linked by target "opencv_ccalib" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/ccalib
    linked by target "opencv_cudafeatures2d" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudafeatures2d
    linked by target "opencv_cudafeatures2d" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudafeatures2d
    linked by target "opencv_cudalegacy" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudalegacy
    linked by target "opencv_cudalegacy" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudalegacy
    linked by target "opencv_cudaobjdetect" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaobjdetect
    linked by target "opencv_cudaobjdetect" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaobjdetect
    linked by target "opencv_cudaoptflow" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaoptflow
    linked by target "opencv_cudaoptflow" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudaoptflow
    linked by target "opencv_cudastereo" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudastereo
    linked by target "opencv_cudastereo" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudastereo
    linked by target "opencv_datasets" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/datasets
    linked by target "opencv_datasets" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/datasets
    linked by target "opencv_rgbd" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/rgbd
    linked by target "opencv_rgbd" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/rgbd
    linked by target "opencv_stereo" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/stereo
    linked by target "opencv_stereo" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/stereo
    linked by target "opencv_stitching" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/stitching
    linked by target "opencv_stitching" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/stitching
    linked by target "opencv_structured_light" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/structured_light
    linked by target "opencv_structured_light" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/structured_light
    linked by target "opencv_superres" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/superres
    linked by target "opencv_superres" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/superres
    linked by target "opencv_tracking" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/tracking
    linked by target "opencv_tracking" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/tracking
    linked by target "opencv_videostab" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/videostab
    linked by target "opencv_videostab" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/videostab
    linked by target "opencv_ximgproc" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/ximgproc
    linked by target "opencv_ximgproc" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/ximgproc
    linked by target "opencv_aruco" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/aruco
    linked by target "opencv_aruco" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/aruco
    linked by target "opencv_optflow" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/optflow
    linked by target "opencv_optflow" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv_contrib-3.3.0/modules/optflow
    linked by target "opencv_traincascade" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/apps/traincascade
    linked by target "opencv_createsamples" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/apps/createsamples
    linked by target "opencv_annotation" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/apps/annotation
    linked by target "opencv_visualisation" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/apps/visualisation
    linked by target "opencv_interactive-calibration" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/apps/interactive-calibration
    linked by target "opencv_version" in directory /var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/apps/version

-- Configuring incomplete, errors occurred!


What am I doing wrong?

EDIT: After finding this I have masked dev-util/nvidia-cuda-toolkit-9.0.176 which was installed (note the 9) so after downgrading to toolkit-8 (which has nppi) has proceeded with the rebuild.

The problem of not being able to compile dev-util/nvidia-cuda-toolkit::8 with gcc::6 is food for another day.
Back to top
View user's profile Send private message
emsy
n00b
n00b


Joined: 16 Dec 2011
Posts: 21

PostPosted: Sat Dec 09, 2017 12:28 am    Post subject: Reply with quote

I had the same exact issue.
Code:
gcc-6.4.0
opencv-3.3.0-r4
nvidia-cuda-toolkit-9.0.176

Code:
USE="contrib cuda eigen ffmpeg gphoto2 gstreamer gtk jpeg jpeg2k opencl openexr opengl openmp png python qt5 threads tiff v4l vaapi webp -contrib_cvv -contrib_hdf -contrib_sfm -contrib_xfeatures2d -debug -examples -gdal -gflags -glog -ieee1394 (-ipp) -java -lapack -libav -pch -tesseract -testprograms -vtk -xine" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 python3_4 -python3_5"



I applied the patch for cmake/FindCUDA.cmake from your link by placing it into /etc/portage/patches/media-libs/opencv/opencv-3.3.0-r4.patch and I have overcome this error.

I've come to a different error which is solved at https://github.com/opencv/opencv/pull/9769
But wait, there is more https://github.com/opencv/opencv/issues/8781
In the end i DIDN'T manage to compile it and just removed USE flag "cuda" :(

2 patchfiles are legit, the 3rd one is setting the variable by force (adjust it to your GPU capabilities using this table https://developer.nvidia.com/cuda-gpus ), which should be probably handled elsewhere by something proper

Code:
diff --git a/cmake/FindCUDA.cmake b/cmake/FindCUDA.cmake
index 678b450ab..c2a58bd00 100644
--- a/cmake/FindCUDA.cmake
+++ b/cmake/FindCUDA.cmake
@@ -283,7 +283,38 @@
 #   CUDA_nppc_LIBRARY     -- NVIDIA Performance Primitives lib (core).
 #                            Only available for CUDA version 5.5+.
 #   CUDA_nppi_LIBRARY     -- NVIDIA Performance Primitives lib (image processing).
-#                            Only available for CUDA version 5.5+.
+#                            Only available for CUDA version 5.5+ and was split up
+#                            in CUDA version 8.0+ and doesn't exist in combined
+#                            form in CUDA version 9.0+.
+#   CUDA_nppial_LIBRARY   -- NVIDIA Performance Primatives library (arithmetic and
+#                            logical operation functions). Only available for CUDA
+#                            version 8.0+.
+#   CUDA_nppicc_LIBRARY   -- NVIDIA Performance Primatives library (color conversion
+#                            and sampling functions). Only available for CUDA version
+#                            8.0+.
+#   CUDA_nppicom_LIBRARY  -- NVIDIA Performance Primatives library (JPEG compression
+#                            and decompression functions). Only available for CUDA
+#                            version 8.0+.
+#   CUDA_nppidei_LIBRARY  -- NVIDIA Performance Primatives library (data exchange and
+#                            initialization functions). Only available for CUDA
+#                            version 8.0+.
+#   CUDA_nppif_LIBRARY    -- NVIDIA Performance Primatives library (filtering and
+#                            computer vision functions). Only available for CUDA
+#                            version 8.0+.
+#   CUDA_nppig_LIBRARY    -- NVIDIA Performance Primatives library (geometry
+#                            transformation functions). Only available for CUDA
+#                            version 8.0+.
+#   CUDA_nppim_LIBRARY    -- NVIDIA Performance Primatives library (morphological
+#                            operation functions). Only available for CUDA version
+#                            8.0+.
+#   CUDA_nppist_LIBRARY   -- NVIDIA Performance Primatives library (statistics and
+#                            linear transform). Only available for CUDA version
+#                            8.0+.
+#   CUDA_nppisu_LIBRARY   -- NVIDIA Performance Primatives library (memory support
+#                            functions). Only available for CUDA version 8.0+.
+#   CUDA_nppitc_LIBRARY   -- NVIDIA Performance Primatives library (threshold and
+#                            compare operation functions). Only available for CUDA
+#                            version 8.0+.
 #   CUDA_npps_LIBRARY     -- NVIDIA Performance Primitives lib (signal processing).
 #                            Only available for CUDA version 5.5+.
 #   CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library.
@@ -522,6 +553,16 @@ macro(cuda_unset_include_and_libraries)
   unset(CUDA_npp_LIBRARY CACHE)
   unset(CUDA_nppc_LIBRARY CACHE)
   unset(CUDA_nppi_LIBRARY CACHE)
+  unset(CUDA_nppial_LIBRARY CACHE)
+  unset(CUDA_nppicc_LIBRARY CACHE)
+  unset(CUDA_nppicom_LIBRARY CACHE)
+  unset(CUDA_nppidei_LIBRARY CACHE)
+  unset(CUDA_nppif_LIBRARY CACHE)
+  unset(CUDA_nppig_LIBRARY CACHE)
+  unset(CUDA_nppim_LIBRARY CACHE)
+  unset(CUDA_nppist_LIBRARY CACHE)
+  unset(CUDA_nppisu_LIBRARY CACHE)
+  unset(CUDA_nppitc_LIBRARY CACHE)
   unset(CUDA_npps_LIBRARY CACHE)
   unset(CUDA_nvcuvenc_LIBRARY CACHE)
   unset(CUDA_nvcuvid_LIBRARY CACHE)
@@ -787,7 +828,22 @@ if(NOT CUDA_VERSION VERSION_LESS "3.2")
     find_cuda_helper_libs(nvcuvid)
   endif()
 endif()
-if(CUDA_VERSION VERSION_GREATER "5.0")
+if(CUDA_VERSION VERSION_GREATER "7.5")
+  # In CUDA 8.0 NPP was splitted onto 12 separate libraries.
+  find_cuda_helper_libs(nppc)
+  find_cuda_helper_libs(nppial)
+  find_cuda_helper_libs(nppicc)
+  find_cuda_helper_libs(nppicom)
+  find_cuda_helper_libs(nppidei)
+  find_cuda_helper_libs(nppif)
+  find_cuda_helper_libs(nppig)
+  find_cuda_helper_libs(nppim)
+  find_cuda_helper_libs(nppist)
+  find_cuda_helper_libs(nppisu)
+  find_cuda_helper_libs(nppitc)
+  find_cuda_helper_libs(npps)
+  set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY}; ${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY}; ${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}")
+elseif(CUDA_VERSION VERSION_GREATER "5.0")
   # In CUDA 5.5 NPP was splitted onto 3 separate libraries.
   find_cuda_helper_libs(nppc)
   find_cuda_helper_libs(nppi)


Code:
diff -au --git a/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp b/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp
--- a/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp
+++ b/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp
@@ -47,6 +47,9 @@
 #define OPENCV_CUDEV_UTIL_SATURATE_CAST_HPP

 #include "../common.hpp"
+#if __CUDACC_VER_MAJOR__ >= 9
+#include <cuda_fp16.h>
+#endif

 namespace cv { namespace cudev {



Code:
diff -au --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake
--- a/cmake/OpenCVDetectCUDA.cmake
+++ b/cmake/OpenCVDetectCUDA.cmake
@@ -47,7 +47,7 @@
   if(NOT CMAKE_CROSSCOMPILING)
     list(APPEND _generations "Auto")
   endif()
-  set(CUDA_GENERATION "" CACHE STRING "Build CUDA device code only for specific GPU architecture. Leave empty to build for all architectures.")
+  set(CUDA_GENERATION "Maxwell" CACHE STRING "Build CUDA device code only for specific GPU architecture. Leave empty to build for all architectures.")
   if( CMAKE_VERSION VERSION_GREATER "2.8" )
     set_property( CACHE CUDA_GENERATION PROPERTY STRINGS "" ${_generations} )
   endif()


Code:
# emerge --info opencv
Portage 2.3.16 (python 3.4.6-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-6.4.0, glibc-2.26-r3, 4.14.3-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.14.3-gentoo-x86_64-AMD_FX-8320E_Eight-Core_Processor-with-gentoo-2.4.1
KiB Mem:    32696288 total,   3775176 free
KiB Swap:    4748372 total,   4748372 free
Timestamp of repository gentoo: Fri, 08 Dec 2017 19:15:01 +0000
Head commit of repository gentoo: bc0e91a47f340a40d14c05e93b3a87de406dfa33
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28 p1.2) 2.28
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.6.3-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.10.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28-r2::gentoo, 2.28.1::gentoo, 2.29::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo, 6.3.0::gentoo, 6.4.0::gentoo, 7.2.0::gentoo
sys-devel/gcc-config:     1.9.0-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.cz.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

My-ebuilds
    location: /var/lib/layman/my_ebuilds
    masters: gentoo
    priority: 1

anders-larsson
    location: /var/lib/layman/anders-larsson
    masters: gentoo
    priority: 50

bitcoin
    location: /var/lib/layman/bitcoin
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA skype-eula PUEL QUAKE4 dlj-1.1 ETQW googleearth AdobeFlash-10 AdobeFlash-10.1 Oracle-BCLA-JavaSE AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x NVIDIA-CUDA Vivaldi google-chrome OPERA-2014 RAR"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=bdver2 -mmmx -mno-3dnow -mprefer-avx128 -mvzeroupper -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=bdver2 -mmmx -mno-3dnow -mprefer-avx128 -mvzeroupper -pipe -D_FORCE_INLINES"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.wheel.sk/ http://gentoo.supp.name/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext 64bit 7zip X a52 aac aalib acl acpi activities ads alsa amd64 apache2 apng archive atmo automount bash-completion bcmath berkdb bluetooth bonobo branding bzip2 cairo caps cdda cddax cddb cdio cdparanoia cdr clang cli connection-sharing consolekit cracklib crypt cuda cups curl cxx d3d9 dbus declarative device-mapper dga dhcpcd diff directfb dmraid dri dts dv dvb dvd dvdr ecdh emboss emerald encode exif extensions extras faac faad fam fat ffmpeg firefox flac fluidsynth fontconfig fortran ftp fts3 g3dvl gcrypt gd gdbm gdu gedit gif gimp git glamor glitz gme gmp gmplayer gnutls googledrive gphoto2 gpm gpu graphviz gs gsf gsm gssapi gstreamer gtk gtk3 gtkstyle gudev hash hddtemp httpd hwdb iconv icu id3 id3tag imagemagick introspection ipv6 java javascript jbig jpeg jpeg2k kate kde kde3 kdrive kipi kwallet lcms ldap legacy-systray libass libcaca libmpeg2 libnotify libtar libtiger libv4l2 live ljr llvm-shared-libs lm_sensors logitech-mouse lua mad matroska melt midi mikmod minizip mmx mmxext mng mod modules moodbar mousewarp mp3 mp4 mpeg mssql mtp multilib munin musicbrainz mysql mysqli mythtv ncurses network networkmanager nls nokia nptl nscd nsplugin ntfs ntfsprogs ogg openal opencl openexr opengl openldap openmp pam pango pcntl pcre pcre16 pdf pdo perl phonon pidgin plasma png policykit popcnt ppds prediction pulseaudio python python3 qml qt3support qt4 qt5 rdp readline real reiser4 reiserfs rendering resolvconf rtmp rtsp samba schroedinger script sdl seccomp semantic-desktop sensord session simplexml skins smp sms soap soundtouch speech speex spell sql sqlite sse sse2 sse3 sse4a ssh ssl staging startup-notification steamruntime stream svg symlink taglib tbb tcl tcpd tga theora threads thumbnail tiff truetype udev udisks unicode upcall upower usb uvm v4l v4l2 vaapi vala vdpau vhosts video vim-syntax vmware_guest_linux vmware_guest_windows vorbis vpx weather webkit webp widgets wifi win32codecs winbind wmf wxwidgets x264 x265 xattr xcb xcomposite xext xinerama xml xmlreader xmlrpc xmlwriter xmp xorg xsl xulrunner xv xvfb xvid zip zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias proxy proxy_ajp proxy_connect proxy_fcgi proxy_ftp proxy_http proxy_scgi proxy_wstunnel" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse virtualbox evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-0 php7-1 php7-2" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7 python3_6" RUBY_TARGETS="ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia virtualbox" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-libs/opencv-3.3.0-r4::gentoo was built with the following:
USE="contrib eigen ffmpeg gphoto2 gstreamer gtk jpeg jpeg2k opencl openexr opengl openmp png python qt5 threads tiff v4l vaapi webp -contrib_cvv -contrib_hdf -contrib_sfm -contrib_xfeatures2d -cuda -debug -examples -gdal -gflags -glog -ieee1394 (-ipp) -java -lapack -libav -pch -tesseract -testprograms -vtk -xine" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 python3_4 -python3_5"



[Moderator edit: added [code] tags to preserve output layout; broke long whitespace-free lines in code tags to fix thread layout. -Hu]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum