Ask Your Question

Revision history [back]

OpenCv 4.0.1, Cuda-6.5, G++, CMake , and an error, or 14...

Absolutely NO idea what is wrong here, or how to fix it. Any help would be greatly appreciated.

Software:

uname -ao: Linux tegra-ubuntu 3.10.40-grinch-21.3.4 #1 SMP PREEMPT Fri May 1 10:41:09 UTC 2015 armv7l armv7l armv7l GNU/Linux

g++ --version: g++ (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.4) 4.8.4

OpenCv and OpenCv_Contrib I am attempting to compile: 4.0.1

Cuda Version (a.k.a. nvcc --version): nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2014 NVIDIA Corporation Built on Tue_Feb_17_22:53:16_CST_2015 Cuda compilation tools, release 6.5, V6.5.45

Hardware: Nvidia Jetson TK1 Thats about it...

Heres the terminal from right above the error to the end of make comp...

    /usr/local/cuda/include/math_functions.h:965:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1184:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1281:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1521:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1559:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1575:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1591:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1645:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1699:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1866:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1921:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1951:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:1981:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2057:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2133:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2209:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2285:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2452:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2469:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2487:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2505:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2523:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2541:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2556:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2571:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2587:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2603:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2619:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2635:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2688:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2741:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2815:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2830:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2856:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:2882:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:3044:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1600
     ^
/usr/local/cuda/include/math_functions.h:3135:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1600
     ^
/usr/local/cuda/include/math_functions.h:3269:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:3355:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:4249:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:4339:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:4393:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:4447:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:5194:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:5276:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:5428:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:5466:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:5594:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6191:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6300:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6409:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6422:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6435:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6472:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6509:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6525:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6541:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6717:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:6875:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
In file included from /usr/local/cuda/include/common_functions.h:169:0,
                 from /usr/local/cuda/include/cuda_runtime.h:76,
                 from <command-line>:0:
/usr/local/cuda/include/math_functions.h:8617:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
/usr/local/cuda/include/math_functions.h:8679:5: warning: "_MSC_VER" is not defined [-Wundef]
 #if _MSC_VER < 1800
     ^
In file included from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev.hpp:53:0,
                 from /home/ubuntu/opencv-4.0.1/sources/modules/core/src/cuda/gpu_mat.cu:52:
/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp:50:5: warning: "__CUDACC_VER_MAJOR__" is not defined [-Wundef]
 #if __CUDACC_VER_MAJOR__ >= 9
     ^
/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp:280:5: warning: "__CUDACC_VER_MAJOR__" is not defined [-Wundef]
 #if __CUDACC_VER_MAJOR__ >= 9
     ^
/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp:289:5: warning: "__CUDACC_VER_MAJOR__" is not defined [-Wundef]
 #if __CUDACC_VER_MAJOR__ >= 9
     ^
In file included from /usr/local/cuda/include/thrust/detail/config/config.h:32:0,
                 from /usr/local/cuda/include/thrust/detail/config.h:22,
                 from /usr/local/cuda/include/thrust/tuple.h:33,
                 from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/util/detail/tuple.hpp:49,
                 from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/util/tuple.hpp:50,
                 from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev.hpp:55,
                 from /home/ubuntu/opencv-4.0.1/sources/modules/core/src/cuda/gpu_mat.cu:52:
/usr/local/cuda/include/thrust/detail/config/debug.h:27:5: warning: "THRUST_DEBUG" is not defined [-Wundef]
 #if THRUST_DEBUG
     ^
In file included from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/warp/detail/reduce.hpp:51:0,
                 from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/warp/reduce.hpp:51,
                 from /home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev.hpp:64,
                 from /home/ubuntu/opencv-4.0.1/sources/modules/core/src/cuda/gpu_mat.cu:52:
/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/warp/detail/../../warp/shuffle.hpp:59:5: warning: "__CUDACC_VER_MAJOR__" is not defined [-Wundef]
 #if __CUDACC_VER_MAJOR__ >= 9
     ^
/usr/include/c++/4.8/new(91): error: first parameter of allocation function must be of type "size_t"

/usr/include/c++/4.8/new(93): error: first parameter of allocation function must be of type "size_t"

/usr/include/c++/4.8/new(99): error: first parameter of allocation function must be of type "size_t"

/usr/include/c++/4.8/new(101): error: first parameter of allocation function must be of type "size_t"

/usr/include/c++/4.8/new(109): error: first parameter of allocation function must be of type "size_t"

/usr/include/c++/4.8/new(111): error: first parameter of allocation function must be of type "size_t"

/usr/local/cuda/include/common_functions.h(91): error: first parameter of allocation function must be of type "size_t"

/usr/local/cuda/include/common_functions.h(92): error: first parameter of allocation function must be of type "size_t"

/usr/local/cuda/include/common_functions.h(145): error: first parameter of allocation function must be of type "size_t"

/usr/local/cuda/include/common_functions.h(146): error: first parameter of allocation function must be of type "size_t"

/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/integral.hpp(602): warning: conversion from pointer to smaller integer

/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/integral.hpp(603): warning: conversion from pointer to smaller integer

/usr/include/c++/4.8/bits/stl_construct.h(75): error: function "operator new" cannot be called with the given argument list
            argument types are: (unsigned long, void *)
          detected during:
            instantiation of "void std::_Construct(_T1 *, _Args &&...) [with _T1=cv::DMatch, _Args=<const cv::DMatch &>]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(75): here
            instantiation of "_ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _TrivialValueTypes=false, _InputIterator=__gnu_cxx::__normal_iterator<const cv::DMatch *, std::vector<cv::DMatch, std::allocator<cv::DMatch>>>, _ForwardIterator=cv::DMatch *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(117): here
            instantiation of "_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator=__gnu_cxx::__normal_iterator<const cv::DMatch *, std::vector<cv::DMatch, std::allocator<cv::DMatch>>>, _ForwardIterator=cv::DMatch *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(258): here
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=__gnu_cxx::__normal_iterator<const cv::DMatch *, std::vector<cv::DMatch, std::allocator<cv::DMatch>>>, _ForwardIterator=cv::DMatch *, _Tp=cv::DMatch]" 
/usr/include/c++/4.8/bits/stl_vector.h(1142): here
            instantiation of "std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(std::vector<_Tp, _Alloc>::size_type, _ForwardIterator, _ForwardIterator) [with _Tp=cv::DMatch, _Alloc=std::allocator<cv::DMatch>, _ForwardIterator=__gnu_cxx::__normal_iterator<const cv::DMatch *, std::vector<cv::DMatch, std::allocator<cv::DMatch>>>]" 
/usr/include/c++/4.8/bits/vector.tcc(188): here
            instantiation of "std::vector<_Tp, _Alloc> &std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc> &) [with _Tp=cv::DMatch, _Alloc=std::allocator<cv::DMatch>]" 
/home/ubuntu/opencv-4.0.1/sources/modules/core/include/opencv2/core/persistence.hpp(1189): here

/usr/include/c++/4.8/bits/stl_construct.h(75): error: function "operator new" cannot be called with the given argument list
            argument types are: (unsigned long, void *)
          detected during:
            instantiation of "void std::_Construct(_T1 *, _Args &&...) [with _T1=cv::DMatch, _Args=<cv::DMatch &>]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(75): here
            instantiation of "_ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _TrivialValueTypes=false, _InputIterator=cv::DMatch *, _ForwardIterator=cv::DMatch *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(117): here
            instantiation of "_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator=cv::DMatch *, _ForwardIterator=cv::DMatch *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(258): here
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=cv::DMatch *, _ForwardIterator=cv::DMatch *, _Tp=cv::DMatch]" 
/usr/include/c++/4.8/bits/vector.tcc(209): here
            instantiation of "std::vector<_Tp, _Alloc> &std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc> &) [with _Tp=cv::DMatch, _Alloc=std::allocator<cv::DMatch>]" 
/home/ubuntu/opencv-4.0.1/sources/modules/core/include/opencv2/core/persistence.hpp(1189): here

/usr/include/c++/4.8/bits/stl_construct.h(75): error: function "operator new" cannot be called with the given argument list
            argument types are: (unsigned long, void *)
          detected during:
            instantiation of "void std::_Construct(_T1 *, _Args &&...) [with _T1=cv::KeyPoint, _Args=<const cv::KeyPoint &>]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(75): here
            instantiation of "_ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _TrivialValueTypes=false, _InputIterator=__gnu_cxx::__normal_iterator<const cv::KeyPoint *, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint>>>, _ForwardIterator=cv::KeyPoint *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(117): here
            instantiation of "_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator=__gnu_cxx::__normal_iterator<const cv::KeyPoint *, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint>>>, _ForwardIterator=cv::KeyPoint *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(258): here
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=__gnu_cxx::__normal_iterator<const cv::KeyPoint *, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint>>>, _ForwardIterator=cv::KeyPoint *, _Tp=cv::KeyPoint]" 
/usr/include/c++/4.8/bits/stl_vector.h(1142): here
            instantiation of "std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(std::vector<_Tp, _Alloc>::size_type, _ForwardIterator, _ForwardIterator) [with _Tp=cv::KeyPoint, _Alloc=std::allocator<cv::KeyPoint>, _ForwardIterator=__gnu_cxx::__normal_iterator<const cv::KeyPoint *, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint>>>]" 
/usr/include/c++/4.8/bits/vector.tcc(188): here
            instantiation of "std::vector<_Tp, _Alloc> &std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc> &) [with _Tp=cv::KeyPoint, _Alloc=std::allocator<cv::KeyPoint>]" 
/home/ubuntu/opencv-4.0.1/sources/modules/core/include/opencv2/core/persistence.hpp(1180): here

/usr/include/c++/4.8/bits/stl_construct.h(75): error: function "operator new" cannot be called with the given argument list
            argument types are: (unsigned long, void *)
          detected during:
            instantiation of "void std::_Construct(_T1 *, _Args &&...) [with _T1=cv::KeyPoint, _Args=<cv::KeyPoint &>]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(75): here
            instantiation of "_ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _TrivialValueTypes=false, _InputIterator=cv::KeyPoint *, _ForwardIterator=cv::KeyPoint *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(117): here
            instantiation of "_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator=cv::KeyPoint *, _ForwardIterator=cv::KeyPoint *]" 
/usr/include/c++/4.8/bits/stl_uninitialized.h(258): here
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=cv::KeyPoint *, _ForwardIterator=cv::KeyPoint *, _Tp=cv::KeyPoint]" 
/usr/include/c++/4.8/bits/vector.tcc(209): here
            instantiation of "std::vector<_Tp, _Alloc> &std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc> &) [with _Tp=cv::KeyPoint, _Alloc=std::allocator<cv::KeyPoint>]" 
/home/ubuntu/opencv-4.0.1/sources/modules/core/include/opencv2/core/persistence.hpp(1180): here

/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp(289): warning: conversion from pointer to smaller integer
          detected during:
            instantiation of "void cv::cudev::grid_transform_detail::TransformDispatcher<true, Policy>::call(const cv::cudev::GlobPtr<SrcType> &, const cv::cudev::GlobPtr<DstType> &, const UnOp &, const MaskPtr &, int, int, cudaStream_t) [with Policy=<unnamed>::CopyToPolicy<1U>, SrcType=uchar, DstType=uchar, UnOp=cv::cudev::identity<uchar>, MaskPtr=cv::cudev::GlobPtr<uchar>]" 
(356): here
            instantiation of "void cv::cudev::grid_transform_detail::transform_unary<Policy,SrcType,DstType,UnOp,MaskPtr>(const cv::cudev::GlobPtr<SrcType> &, const cv::cudev::GlobPtr<DstType> &, const UnOp &, const MaskPtr &, int, int, cudaStream_t) [with Policy=<unnamed>::CopyToPolicy<1U>, SrcType=uchar, DstType=uchar, UnOp=cv::cudev::identity<uchar>, MaskPtr=cv::cudev::GlobPtr<uchar>]" 
/home/ubuntu/opencv-4.0.1/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/transform.hpp(85): here
            instantiation of "void cv::cudev::gridTransformUnary_<Policy,SrcPtr,DstType,UnOp,MaskPtr>(const SrcPtr &, const cv::cudev::GlobPtrSz<DstType> &, const UnOp &, const MaskPtr &, cv::cuda::Stream &) [with Policy=<unnamed>::CopyToPolicy<1U>, SrcPtr=cv::cudev::GlobPtrSz<uchar>, DstType=uchar, UnOp=cv::cudev::identity<uchar>, MaskPtr=cv::cudev::GlobPtrSz<uchar>]" 
/home/ubuntu/opencv-4.0.1/sources/modules/core/src/cuda/gpu_mat.cu(308): here
            instantiation of "void <unnamed>::copyWithMask<T>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar]" 
/home/ubuntu/opencv-4.0.1/sources/modules/core/src/cuda/gpu_mat.cu(333): here

14 errors detected in the compilation of "/tmp/tmpxft_000021c8_00000000-6_gpu_mat.cpp1.ii".
-- Removing /home/ubuntu/opencv-4.0.1/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
/usr/bin/cmake -E remove /home/ubuntu/opencv-4.0.1/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:264 (message):
  Error generating file
  /home/ubuntu/opencv-4.0.1/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o


make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
make[2]: Leaving directory `/home/ubuntu/opencv-4.0.1/build'
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[1]: Leaving directory `/home/ubuntu/opencv-4.0.1/build'
make: *** [all] Error 2