Build OpenCV with CUDA accelerated on PX2 failed

Hi,

I’m trying to build OpenCV with CUDA accelerated on PX2 board,
follow the step as below link to compile,
http://docs.opencv.org/master/d6/d15/tutorial_building_tegra_cuda.html

but it always compile failed, I found that because “opencv/build/modules/python2/header.txt” is empty!
Is OpenCV3.1.0 have compatibility problem with PX2 or CUDA-8.0?.
Does anyone have any idea?

My environment :
Operating system: Ubuntu 16.04 LTS
Compiler: gcc 5.4.0
CUDA version (if applicable): cuda-8.0
CUDNN version (if applicable): cuDNN v.6
OpenCV version : 3.2.0

thanks!

Hello Vincent_CH_Wu,

Please see below link for OpenCV installation on DPX2. Thanks.
https://devtalk.nvidia.com/default/topic/1019937/faq/opencv/

Hi Steve,

Thanks for your reply,
I’m follow the step the below link you provide, but the problem are still exist!
the file “opencv/build/modules/python2/header.txt” is empty!
Do you have any idea?
thanks!

Dear Vincent_CH_Wu,

Could you let me know your compilation step in detail or log? I will take a look your compilation step. Thanks.

Hi Steve,

I was follow the step with below link,
https://devtalk.nvidia.com/default/topic/1019937/faq/opencv/
http://docs.opencv.org/3.2.0/d6/d15/tutorial_building_tegra_cuda.html

  1. Clone the opencv repository locally:
    $ git clone https://github.com/opencv/opencv.git

  2. Check out to 3.1.0
    cd opencv git checkout -b v3.1.0 3.1.0

  3. Cherry pick some necessary patch.
    git cherry-pick 10896 git cherry-pick cdb9c
    $ git cherry-pick 24dbb

  4. Clone the opencv_extra reoisitory.
    cd .. git clone https://github.com/opencv/opencv_extra.git
    $ cd opencv_extra

  5. Check out to 3.1.0
    $ git checkout -b v3.1.0 3.1.0

  6. cmake configuration
    cd ../opencv mkdir build
    cd build cmake
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_INSTALL_PREFIX=/home/nvidia/vincent/opencv_cuda_lib/opencv-lib
    -DBUILD_PNG=OFF
    -DBUILD_TIFF=OFF
    -DBUILD_TBB=OFF
    -DBUILD_JPEG=OFF
    -DBUILD_JASPER=OFF
    -DBUILD_ZLIB=OFF
    -DBUILD_EXAMPLES=ON
    -DBUILD_opencv_java=OFF
    -DBUILD_opencv_python2=ON
    -DBUILD_opencv_python3=OFF
    -DENABLE_NEON=ON
    -DWITH_OPENCL=OFF
    -DWITH_OPENMP=OFF
    -DWITH_FFMPEG=ON
    -DWITH_GSTREAMER=OFF
    -DWITH_GSTREAMER_0_10=OFF
    -DWITH_CUDA=ON
    -DWITH_GTK=ON
    -DWITH_VTK=OFF
    -DWITH_TBB=ON
    -DWITH_1394=OFF
    -DWITH_OPENEXR=OFF
    -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0
    -DCUDA_ARCH_BIN=‘6.1 6.2’
    -DCUDA_ARCH_PTX=""
    -DINSTALL_C_EXAMPLES=ON
    -DINSTALL_TESTS=OFF
    -DOPENCV_TEST_DATA_PATH=…/opencv_extra/testdata

  7. compile
    $ make -j1

an error occurred,

Traceback (most recent call last):
File “/home/nvidia/vincent/opencv_cuda_lib/opencv/modules/python/python2/…//src2/gen2.py”, line 954, in
generator.gen(srcfiles, dstdir)
File “/home/nvidia/vincent/opencv_cuda_lib/opencv/modules/python/python2/…//src2/gen2.py”, line 852, in gen
decls = self.parser.parse(hdr)
File “/home/nvidia/vincent/opencv_cuda_lib/opencv/modules/python/src2/hdr_parser.py”, line 762, in parse
f = io.open(hname, ‘rt’, encoding=‘utf-8’)
IOError: [Errno 2] No such file or directory: ‘…/core/include/opencv2/core.hpp’
modules/python2/CMakeFiles/opencv_python2.dir/build.make:63: recipe for target ‘modules/python2/pyopencv_generated_include.h’ failed
make[2]: *** [modules/python2/pyopencv_generated_include.h] Error 1

Thanks!

Hi Steve,

Do you have any idea with my compilation step?

thanks!

Dear Vincent_CH_Wu,

I already checked the step and successfully installed OpenCV on my DPX2.

One thing, could you please re-try it with default option first? Thanks.

-DCMAKE_INSTALL_PREFIX=/home/nvidia/vincent/opencv_cuda_lib/opencv-lib
[b]=> -DCMAKE_INSTALL_PREFIX=/usr [/b]

I am following the same steps with cuda 9.0 on DPX2(replaced cuda8.0 -> cuda 9.0). I am getting the following error

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 /home/nvidia/opencv/modules/cudev
    linked by target "opencv_cudev" in directory /home/nvidia/opencv/modules/cudev
    linked by target "opencv_test_cudev" in directory /home/nvidia/opencv/modules/cudev/test
    linked by target "opencv_core" in directory /home/nvidia/opencv/modules/core
    linked by target "opencv_core" in directory /home/nvidia/opencv/modules/core
    linked by target "opencv_test_core" in directory /home/nvidia/opencv/modules/core
    linked by target "opencv_perf_core" in directory /home/nvidia/opencv/modules/core
    linked by target "opencv_perf_cudaarithm" in directory /home/nvidia/opencv/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory /home/nvidia/opencv/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory /home/nvidia/opencv/modules/cudaarithm
    linked by target "opencv_test_cudaarithm" in directory /home/nvidia/opencv/modules/cudaarithm
    linked by target "opencv_flann" in directory /home/nvidia/opencv/modules/flann
    linked by target "opencv_flann" in directory /home/nvidia/opencv/modules/flann
    linked by target "opencv_test_flann" in directory /home/nvidia/opencv/modules/flann
    linked by target "opencv_imgproc" in directory /home/nvidia/opencv/modules/imgproc
    linked by target "opencv_imgproc" in directory /home/nvidia/opencv/modules/imgproc
    linked by target "opencv_test_imgproc" in directory /home/nvidia/opencv/modules/imgproc
    linked by target "opencv_perf_imgproc" in directory /home/nvidia/opencv/modules/imgproc
    linked by target "opencv_ml" in directory /home/nvidia/opencv/modules/ml
    linked by target "opencv_ml" in directory /home/nvidia/opencv/modules/ml
    linked by target "opencv_test_ml" in directory /home/nvidia/opencv/modules/ml
    linked by target "opencv_video" in directory /home/nvidia/opencv/modules/video
    linked by target "opencv_video" in directory /home/nvidia/opencv/modules/video
    linked by target "opencv_test_video" in directory /home/nvidia/opencv/modules/video
    linked by target "opencv_perf_video" in directory /home/nvidia/opencv/modules/video
    linked by target "opencv_cudabgsegm" in directory /home/nvidia/opencv/modules/cudabgsegm
    linked by target "opencv_cudabgsegm" in directory /home/nvidia/opencv/modules/cudabgsegm
    linked by target "opencv_test_cudabgsegm" in directory /home/nvidia/opencv/modules/cudabgsegm
    linked by target "opencv_perf_cudabgsegm" in directory /home/nvidia/opencv/modules/cudabgsegm
    linked by target "opencv_cudafilters" in directory /home/nvidia/opencv/modules/cudafilters
    linked by target "opencv_cudafilters" in directory /home/nvidia/opencv/modules/cudafilters
    linked by target "opencv_test_cudafilters" in directory /home/nvidia/opencv/modules/cudafilters
    linked by target "opencv_perf_cudafilters" in directory /home/nvidia/opencv/modules/cudafilters
    linked by target "opencv_cudaimgproc" in directory /home/nvidia/opencv/modules/cudaimgproc
    linked by target "opencv_cudaimgproc" in directory /home/nvidia/opencv/modules/cudaimgproc
    linked by target "opencv_test_cudaimgproc" in directory /home/nvidia/opencv/modules/cudaimgproc
    linked by target "opencv_perf_cudaimgproc" in directory /home/nvidia/opencv/modules/cudaimgproc
    linked by target "opencv_cudawarping" in directory /home/nvidia/opencv/modules/cudawarping
    linked by target "opencv_cudawarping" in directory /home/nvidia/opencv/modules/cudawarping
    linked by target "opencv_test_cudawarping" in directory /home/nvidia/opencv/modules/cudawarping
    linked by target "opencv_perf_cudawarping" in directory /home/nvidia/opencv/modules/cudawarping
    linked by target "opencv_test_imgcodecs" in directory /home/nvidia/opencv/modules/imgcodecs
    linked by target "opencv_imgcodecs" in directory /home/nvidia/opencv/modules/imgcodecs
    linked by target "opencv_imgcodecs" in directory /home/nvidia/opencv/modules/imgcodecs
    linked by target "opencv_perf_imgcodecs" in directory /home/nvidia/opencv/modules/imgcodecs
    linked by target "opencv_test_photo" in directory /home/nvidia/opencv/modules/photo
    linked by target "opencv_photo" in directory /home/nvidia/opencv/modules/photo
    linked by target "opencv_photo" in directory /home/nvidia/opencv/modules/photo
    linked by target "opencv_perf_photo" in directory /home/nvidia/opencv/modules/photo
    linked by target "opencv_shape" in directory /home/nvidia/opencv/modules/shape
    linked by target "opencv_shape" in directory /home/nvidia/opencv/modules/shape
    linked by target "opencv_test_shape" in directory /home/nvidia/opencv/modules/shape
    linked by target "opencv_videoio" in directory /home/nvidia/opencv/modules/videoio
    linked by target "opencv_videoio" in directory /home/nvidia/opencv/modules/videoio
    linked by target "opencv_test_videoio" in directory /home/nvidia/opencv/modules/videoio
    linked by target "opencv_perf_videoio" in directory /home/nvidia/opencv/modules/videoio
    linked by target "opencv_test_cudacodec" in directory /home/nvidia/opencv/modules/cudacodec
    linked by target "opencv_cudacodec" in directory /home/nvidia/opencv/modules/cudacodec
    linked by target "opencv_cudacodec" in directory /home/nvidia/opencv/modules/cudacodec
    linked by target "opencv_perf_cudacodec" in directory /home/nvidia/opencv/modules/cudacodec
    linked by target "opencv_test_highgui" in directory /home/nvidia/opencv/modules/highgui
    linked by target "opencv_highgui" in directory /home/nvidia/opencv/modules/highgui
    linked by target "opencv_highgui" in directory /home/nvidia/opencv/modules/highgui
    linked by target "opencv_objdetect" in directory /home/nvidia/opencv/modules/objdetect
    linked by target "opencv_objdetect" in directory /home/nvidia/opencv/modules/objdetect
    linked by target "opencv_perf_objdetect" in directory /home/nvidia/opencv/modules/objdetect
    linked by target "opencv_test_objdetect" in directory /home/nvidia/opencv/modules/objdetect
    linked by target "opencv_ts" in directory /home/nvidia/opencv/modules/ts
    linked by target "opencv_ts" in directory /home/nvidia/opencv/modules/ts
    linked by target "opencv_features2d" in directory /home/nvidia/opencv/modules/features2d
    linked by target "opencv_features2d" in directory /home/nvidia/opencv/modules/features2d
    linked by target "opencv_test_features2d" in directory /home/nvidia/opencv/modules/features2d
    linked by target "opencv_perf_features2d" in directory /home/nvidia/opencv/modules/features2d
    linked by target "opencv_test_calib3d" in directory /home/nvidia/opencv/modules/calib3d
    linked by target "opencv_calib3d" in directory /home/nvidia/opencv/modules/calib3d
    linked by target "opencv_calib3d" in directory /home/nvidia/opencv/modules/calib3d
    linked by target "opencv_perf_calib3d" in directory /home/nvidia/opencv/modules/calib3d
    linked by target "opencv_perf_cudafeatures2d" in directory /home/nvidia/opencv/modules/cudafeatures2d
    linked by target "opencv_cudafeatures2d" in directory /home/nvidia/opencv/modules/cudafeatures2d
    linked by target "opencv_cudafeatures2d" in directory /home/nvidia/opencv/modules/cudafeatures2d
    linked by target "opencv_test_cudafeatures2d" in directory /home/nvidia/opencv/modules/cudafeatures2d
    linked by target "opencv_cudalegacy" in directory /home/nvidia/opencv/modules/cudalegacy
    linked by target "opencv_cudalegacy" in directory /home/nvidia/opencv/modules/cudalegacy
    linked by target "opencv_test_cudalegacy" in directory /home/nvidia/opencv/modules/cudalegacy
    linked by target "opencv_perf_cudalegacy" in directory /home/nvidia/opencv/modules/cudalegacy
    linked by target "opencv_perf_cudaobjdetect" in directory /home/nvidia/opencv/modules/cudaobjdetect
    linked by target "opencv_cudaobjdetect" in directory /home/nvidia/opencv/modules/cudaobjdetect
    linked by target "opencv_cudaobjdetect" in directory /home/nvidia/opencv/modules/cudaobjdetect
    linked by target "opencv_test_cudaobjdetect" in directory /home/nvidia/opencv/modules/cudaobjdetect
    linked by target "opencv_cudaoptflow" in directory /home/nvidia/opencv/modules/cudaoptflow
    linked by target "opencv_cudaoptflow" in directory /home/nvidia/opencv/modules/cudaoptflow
    linked by target "opencv_test_cudaoptflow" in directory /home/nvidia/opencv/modules/cudaoptflow
    linked by target "opencv_perf_cudaoptflow" in directory /home/nvidia/opencv/modules/cudaoptflow
    linked by target "opencv_perf_cudastereo" in directory /home/nvidia/opencv/modules/cudastereo
    linked by target "opencv_cudastereo" in directory /home/nvidia/opencv/modules/cudastereo
    linked by target "opencv_cudastereo" in directory /home/nvidia/opencv/modules/cudastereo
    linked by target "opencv_test_cudastereo" in directory /home/nvidia/opencv/modules/cudastereo
    linked by target "opencv_test_stitching" in directory /home/nvidia/opencv/modules/stitching
    linked by target "opencv_perf_stitching" in directory /home/nvidia/opencv/modules/stitching
    linked by target "opencv_stitching" in directory /home/nvidia/opencv/modules/stitching
    linked by target "opencv_stitching" in directory /home/nvidia/opencv/modules/stitching
    linked by target "opencv_superres" in directory /home/nvidia/opencv/modules/superres
    linked by target "opencv_superres" in directory /home/nvidia/opencv/modules/superres
    linked by target "opencv_test_superres" in directory /home/nvidia/opencv/modules/superres
    linked by target "opencv_perf_superres" in directory /home/nvidia/opencv/modules/superres
    linked by target "opencv_videostab" in directory /home/nvidia/opencv/modules/videostab
    linked by target "opencv_videostab" in directory /home/nvidia/opencv/modules/videostab
    linked by target "opencv_traincascade" in directory /home/nvidia/opencv/apps/traincascade
    linked by target "opencv_createsamples" in directory /home/nvidia/opencv/apps/createsamples
    linked by target "opencv_annotation" in directory /home/nvidia/opencv/apps/annotation
    linked by target "cpp-tutorial-pnp_detection" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_watershed" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_tvl1_optical_flow" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_LATCH_match" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_cloning_gui" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_decolor" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_objectDetection2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_objectDetection" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_non_linear_svms" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_introduction_to_svm" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_introduction_to_pca" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_introduction_windows_vs" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_AKAZE_match" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_mat_mask_operations" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_interoperability_with_OpenCV_1" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_file_input_output" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_discrete_fourier_transform" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Drawing_2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_camera_calibration" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_cornerSubPix_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_hull_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_generalContours_demo1" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_findContours_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_cloning_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_imageSegmentation" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_filter2D_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_logistic_regression" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_mask_tmpl" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_edge" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_stereo_calib" in directory /home/nvidia/opencv/samples/cpp
    linked by target "cpp-tutorial-pnp_registration" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_lsd_lines" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_minarea" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_intelperc_capture" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_detect_blob" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_imagelist_creator" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_planar_tracking" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Morphology_1" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_display_image" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_kalman" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_image_sequence" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_CannyDetector_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Laplace_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_hdr_imaging" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_polar_transforms" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_image" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_houghlines" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_kmeans" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_houghcircles" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_filestorage" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_ffilldemo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_mat_the_basic_image_container" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_lkdemo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_pointPolygonTest_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_fback" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_stitching_detailed" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_fitellipse" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_facedetect" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Smoothing" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_connected_components" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_cloning_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_letter_recog" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_moments_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_dbt_face_detection" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_camshiftdemo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_pca" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_bg_sub" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_stitching" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_autofocus" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_contours2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_HoughLines_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_detect_mser" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_phase_corr" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_cornerHarris_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_compareHist_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_facial_features" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_starter_video" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_convexhull" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_dft" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_calibration" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_inpaint" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_generalContours_demo2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_create_mask" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_npr_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Morphology_3" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_starter_imagelist" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_cornerDetector_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_select3dobj" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_bgfg_segm" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_tree_engine" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_grabcut" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_video-write" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_delaunay2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Geometric_Transforms_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_laplace" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_calcBackProject_Demo1" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Drawing_1" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_example" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_distrans" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_image_alignment" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_EqualizeHist_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_videostab" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_video-input-psnr-ssim" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_matchmethod_orb_akaze_brisk" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_npr_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_morphology2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_gpu-basics-similarity" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_opencv_version" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_how_to_scan_images" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_openni_capture" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_BasicLinearTransformsTrackbar" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_demhist" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_train_HOG" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_points_classifier" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_3calibration" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_segment_objects" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_shape_example" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_SBM_Sample" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_squares" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_stereo_match" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_goodFeaturesToTrack_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_BasicLinearTransforms" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_copyMakeBorder_demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_cloning_gui" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_AddingImagesTrackbar" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_gdal-image" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_calcBackProject_Demo2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_em" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_calcHist_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_cout_mat" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_AddingImages" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Morphology_2" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_smiledetect" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Remap_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Pyramids" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Threshold" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_HoughCircle_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_MatchTemplate_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_drawing" in directory /home/nvidia/opencv/samples/cpp
    linked by target "tutorial_Sobel_Demo" in directory /home/nvidia/opencv/samples/cpp
    linked by target "example_gpu_hog" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_generalized_hough" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_houghlines" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_optical_flow" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_alpha_comp" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_bgfg_segm" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_morphology" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_surf_keypoint_matcher" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_video_reader" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_farneback_optical_flow" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_performance" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_stereo_multi" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_opticalflow_nvidia_api" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_driver_api_multi" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_cascadeclassifier_nvidia_api" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_pyrlk_optical_flow" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_stereo_match" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_driver_api_stereo_multi" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_cascadeclassifier" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_super_resolution" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_multi" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_gpu_video_writer" in directory /home/nvidia/opencv/samples/gpu
    linked by target "example_tapi_hog" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_camshift" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_bgfg_segm" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_squares" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_pyrlk_optical_flow" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_tvl1_optical_flow" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_clahe" in directory /home/nvidia/opencv/samples/tapi
    linked by target "example_tapi_ufacedetect" in directory /home/nvidia/opencv/samples/tapi

-- Configuring incomplete, errors occurred!
See also "/home/nvidia/opencv/build/CMakeFiles/CMakeOutput.log".
See also "/home/nvidia/opencv/build/CMakeFiles/CMakeError.log".

Not a DPX2 bug, its a cuda 9.0 bug, fix available here, https://stackoverflow.com/questions/46584000/cmake-error-variables-are-set-to-notfound