cross compile opencv successfully,but run sample failed

hi,
I cross compile opencv successfully by following https://devtalk.nvidia.com/default/topic/1044512/general/opencv-unable-to-stop-the-stream-inappropriate-ioctl-for-device/?offset=2#5299842.
when I want to cross compile sample at my host machine, it meet problem.
cmakelist.txt as follows

find_package(OpenCV REQUIRED PATHS /home/gris/opencv/build/install)
include_directories( ${OpenCV_INCLUDE_DIRS} )
message("OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}")
message("OpenCV_LIBS: ${OpenCV_LIBS}")
set(LIBRARIES
    ${OpenCV_LIBS} 
    dw_samples_framework
    ${Driveworks_LIBRARIES}
)

cmake successfully

gris@gris-RESCUER-R720-15IKBN:~/learning/nv/samples/build-target$  cmake -DCMAKE_BUILD=Release \
>   -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-V5L.cmake \
>   -DVIBRANTE_PDK:STRING=/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-linux \
>   ..
-- VIBRANTE_PDK = /home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-linux
-- Vibrante version 5.0.10.3
-- Cross Compiling for Vibrante
-- Using X11 for window creation
-- VIBRANTE_PDK_BRANCH = 5.0.10.3
-- Found vibrante lib: /home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante/lib/libudev.so
-- Found vibrante lib: /home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante/lib/libusb-1.0.so
-- Found vibrante_Xlib: /home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/libXrandr.so
-- Found vibrante_Xlib: /home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/libXinerama.so
-- Found vibrante_Xlib: /home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/libXi.so
-- Found vibrante_Xlib: /home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/libXcursor.so
-- Driveworks Samples install dir: /home/gris/learning/nv/samples/build-target/install
-- Cross Compiling for Vibrante
-- Found Driveworks 
OpenCV_INCLUDE_DIRS: /home/gris/opencv/build/install/include;/home/gris/opencv/build/install/include/opencv
OpenCV_LIBS: opencv_calib3d;opencv_core;opencv_cudaarithm;opencv_cudabgsegm;opencv_cudafeatures2d;opencv_cudafilters;opencv_cudalegacy;opencv_cudaobjdetect;opencv_cudastereo;opencv_cudawarping;opencv_cudev;opencv_dnn;opencv_features2d;opencv_flann;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videostab;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_datasets;opencv_dpm;opencv_face;opencv_fuzzy;opencv_img_hash;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_tracking;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
-- Configuring done
CMake Warning at src/aaa_target/test/CMakeLists.txt:34 (add_executable):
  Cannot generate a safe runtime search path for target test because there is
  a cycle in the constraint graph:

    dir 0 is [/usr/local/cuda-9.2/targets/aarch64-linux/lib]
    dir 1 is [/usr/local/cuda-9.2/targets/aarch64-linux/lib/stubs]
    dir 2 is [/home/gris/opencv/build/install/lib]
    dir 3 is [/usr/local/driveworks-1.2/targets/aarch64-Linux/lib]
    dir 4 is [/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-linux/lib-target]
      dir 6 must precede it due to runtime library [libXrandr.so.2]
      dir 7 must precede it due to runtime library [libX11.so.6]
    dir 5 is [/home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante/lib]
    dir 6 is [/home/gris/learning/nv/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib]
    dir 7 is [/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-linux/targetfs/usr/lib/aarch64-linux-gnu]
      dir 6 must precede it due to runtime library [libXrandr.so.2]

  Some of these libraries may not be found correctly.


-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHAIN_FILE


-- Build files have been written to: /home/gris/learning/nv/samples/build-target

make error

gris@gris-RESCUER-R720-15IKBN:~/learning/nv/samples/build-target$ make
[  0%] Built target update_cuda_deps
[  5%] Built target lodepng-src
[ 47%] Built target glfw
[ 94%] Built target dw_samples_framework
Scanning dependencies of target test
[ 97%] Building CXX object src/aaa_target/test/CMakeFiles/test.dir/main.cpp.o
[100%] Linking CXX executable test
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppc.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppial.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppicc.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppicom.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppidei.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppif.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppig.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppim.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppist.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppisu.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnppitc.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libnpps.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.4/ld: warning: libcufft.so.9.2, needed by /home/gris/opencv/build/install/lib/libopencv_cudabgsegm.so.3.4.0, not found (try using -rpath or -rpath-link)
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_32f_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_8u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiThreshold_32f_C1R@libnppitc.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMeanStdDevGetBufferHostSize_8u_C1R@libnppist.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiXorC_8u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_32f_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiOrC_32s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiErode_8u_C4R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_32s_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_32f_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiXorC_32s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_8s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_32f_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_32s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiOrC_32s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_32s_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiOrC_8u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_32s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_16u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMean_StdDev_8u_C1R@libnppist.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiAndC_32s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiXorC_32s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_8u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_32s_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_8u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_16u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_8u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiOrC_16u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_16u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_32f_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterBox_8u_C1R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_8u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiTranspose_8u_C1R@libnppidei.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiOrC_16u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_32f_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_16s_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_32f_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_16u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterMin_8u_C1R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_32f_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterMax_8u_C4R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_8u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiAndC_16u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_16u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_32f_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_8u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_32f_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppSetStream@libnppc.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiAndC_32s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_32s_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_16u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterBox_8u_C4R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_16u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiAndC_16u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterMax_8u_C1R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_32s_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiDilate_8u_C1R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiDilate_32f_C1R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiErode_8u_C1R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftExecR2C@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_8u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_32s_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_32s_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_8u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_16u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_8u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_32f_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_16u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_32f_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_32s_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiXorC_16u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_32s_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_8u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_32f_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_8u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_32f_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiSumWindowColumn_8u32f_C1R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftDestroy@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_16u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMagnitudeSqr_32fc32f_C1R@libnppist.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_8u_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_32f_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiDilate_8u_C4R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRectStdDev_32s32f_C1R@libnppist.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_32s_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterMin_8u_C4R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_32f_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_32f_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_8u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_32s_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiErode_32f_C1R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_16s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_32s_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_8s_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiXorC_16u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftPlan1d@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_16s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftSetStream@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_32s_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_32s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_32s_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_16u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMagnitude_32fc32f_C1R@libnppist.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_8s_C4R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_32s_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_16u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_8u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_8u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_16u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_8u_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_8u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_8u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiErode_32f_C4R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_16u_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_32f_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspective_16u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_16u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_8u_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_16u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_32s_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_8u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_16u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiSumWindowRow_8u32f_C1R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_8u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiDilate_32f_C4R@libnppim.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_8u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffineBack_8u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiAndC_8u_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_16u_C1R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppGetStream@libnppc.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftExecC2R@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiMirror_16u_C4R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftExecC2C@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpAffine_16u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `cufftPlan2d@libcufft.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudafilters.so.3.4.0: undefined reference to `nppiFilterBox_32f_C1R@libnppif.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_16u_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiWarpPerspectiveBack_16u_C3R@libnppig.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiRShiftC_32s_C1R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudaarithm.so.3.4.0: undefined reference to `nppiLShiftC_32s_C3R@libnppial.so.9.2'
/home/gris/opencv/build/install/lib/libopencv_cudawarping.so.3.4.0: undefined reference to `nppiRotate_16u_C4R@libnppig.so.9.2'
collect2: error: ld returned 1 exit status
src/aaa_target/test/CMakeFiles/test.dir/build.make:147: recipe for target 'src/aaa_target/test/test' failed
make[2]: *** [src/aaa_target/test/test] Error 1
CMakeFiles/Makefile2:381: recipe for target 'src/aaa_target/test/CMakeFiles/test.dir/all' failed
make[1]: *** [src/aaa_target/test/CMakeFiles/test.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Can anyone help me?

Dear limengyang1995,
I assume you have used latest instructions to include CUDA support in OpenCV(https://devtalk.nvidia.com/default/topic/1044512/general/opencv-unable-to-stop-the-stream-inappropriate-ioctl-for-device/post/5303009/#5303009). If so, It seems like a library linking issue. Could you please update your LD_LIBRARY_PATH and check.

Dear SivaRamaKrishna,
Thank you for your reply!
I use latest instructions to include CUDA support in OpenCV (https://devtalk.nvidia.com/default/topic/1044512/general/opencv-unable-to-stop-the-stream-inappropriate-ioctl-for-device/post/5303009/#5303009).
And I vim ~/.bashrc and source ~/.bashrc

export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64:$LD_LIBRARY_PATH

And at /usr/local/cuda-9.2/lib64 exits the not found lib

How should I link the library?

Dear limengyang1995,
Please locate the libs shown in the warning and add them to LD_LIBRARY_PATH