Repository: opencv
Issue: Makefile:160: recipe for target 'all' failed
Labels: category: build/install,category: gpu/cuda (contrib),incomplete

 **System information**

- Ubuntu - 16.04

- NVCC  - 7.5

- OpenCV - 4.2.0 

I'm trying to install opencv with CUDA support. However when building the files with the make command, I experience the following error:

``` /usr/bin/cmake -H/home/ubuntu/opencv -B/home/ubuntu/opencv/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/ubuntu/opencv/build/CMakeFiles /home/ubuntu/opencv/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/ubuntu/opencv/build'
make -f 3rdparty/libwebp/CMakeFiles/libwebp.dir/build.make 3rdparty/libwebp/CMakeFiles/libwebp.dir/depend
make -f 3rdparty/openexr/CMakeFiles/IlmImf.dir/build.make 3rdparty/openexr/CMakeFiles/IlmImf.dir/depend
make -f 3rdparty/ippiw/CMakeFiles/ippiw.dir/build.make 3rdparty/ippiw/CMakeFiles/ippiw.dir/depend
make -f 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/build.make 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/depend
make -f 3rdparty/quirc/CMakeFiles/quirc.dir/build.make 3rdparty/quirc/CMakeFiles/quirc.dir/depend
make -f 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/build.make 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/depend
make -f modules/CMakeFiles/ade.dir/build.make modules/CMakeFiles/ade.dir/depend
make -f modules/.firstpass/videoio/CMakeFiles/opencv_videoio_plugins.dir/build.make modules/.firstpass/videoio/CMakeFiles/opencv_videoio_plugins.dir/depend
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/3rdparty/quirc /home/ubuntu/opencv/build /home/ubuntu/opencv/build/3rdparty/quirc /home/ubuntu/opencv/build/3rdparty/quirc/CMakeFiles/quirc.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/3rdparty/ittnotify /home/ubuntu/opencv/build /home/ubuntu/opencv/build/3rdparty/ittnotify /home/ubuntu/opencv/build/3rdparty/ittnotify/CMakeFiles/ittnotify.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/modules/videoio /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules/.firstpass/videoio /home/ubuntu/opencv/build/modules/.firstpass/videoio/CMakeFiles/opencv_videoio_plugins.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/modules /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules /home/ubuntu/opencv/build/modules/CMakeFiles/ade.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/build/3rdparty/ippicv/ippicv_lnx/iw /home/ubuntu/opencv/build /home/ubuntu/opencv/build/3rdparty/ippiw /home/ubuntu/opencv/build/3rdparty/ippiw/CMakeFiles/ippiw.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f 3rdparty/quirc/CMakeFiles/quirc.dir/build.make 3rdparty/quirc/CMakeFiles/quirc.dir/build
make -f 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/build.make 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/build
make -f modules/.firstpass/videoio/CMakeFiles/opencv_videoio_plugins.dir/build.make modules/.firstpass/videoio/CMakeFiles/opencv_videoio_plugins.dir/build
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/.firstpass/videoio/CMakeFiles/opencv_videoio_plugins.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/3rdparty/libwebp /home/ubuntu/opencv/build /home/ubuntu/opencv/build/3rdparty/libwebp /home/ubuntu/opencv/build/3rdparty/libwebp/CMakeFiles/libwebp.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for '3rdparty/quirc/CMakeFiles/quirc.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for '3rdparty/ittnotify/CMakeFiles/ittnotify.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f modules/CMakeFiles/ade.dir/build.make modules/CMakeFiles/ade.dir/build
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f 3rdparty/ippiw/CMakeFiles/ippiw.dir/build.make 3rdparty/ippiw/CMakeFiles/ippiw.dir/build
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/CMakeFiles/ade.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
[  1%] Built target opencv_videoio_plugins
[  1%] Built target quirc
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/3rdparty/openexr /home/ubuntu/opencv/build /home/ubuntu/opencv/build/3rdparty/openexr /home/ubuntu/opencv/build/3rdparty/openexr/CMakeFiles/IlmImf.dir/DependInfo.cmake --color=
make -f modules/sfm/src/libmv/libmv/numeric/CMakeFiles/numeric.dir/build.make modules/sfm/src/libmv/libmv/numeric/CMakeFiles/numeric.dir/depend
[  1%] Built target ittnotify
make -f modules/python_bindings_generator/CMakeFiles/gen_opencv_python_source.dir/build.make modules/python_bindings_generator/CMakeFiles/gen_opencv_python_source.dir/depend
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for '3rdparty/ippiw/CMakeFiles/ippiw.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/3rdparty/protobuf /home/ubuntu/opencv/build /home/ubuntu/opencv/build/3rdparty/protobuf /home/ubuntu/opencv/build/3rdparty/protobuf/CMakeFiles/libprotobuf.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv_contrib/modules/sfm/src/libmv_light/libmv/numeric /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules/sfm/src/libmv/libmv/numeric /home/ubuntu/opencv/build/modules/sfm/src/libmv/libmv/numeric/CMakeFiles/numeric.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv/modules/python/bindings /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules/python_bindings_generator /home/ubuntu/opencv/build/modules/python_bindings_generator/CMakeFiles/gen_opencv_python_source.dir/DependInfo.cmake --color=
[  2%] Built target ade
[  3%] Built target ippiw
make -f modules/cudev/CMakeFiles/opencv_cudev.dir/build.make modules/cudev/CMakeFiles/opencv_cudev.dir/depend
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f 3rdparty/libwebp/CMakeFiles/libwebp.dir/build.make 3rdparty/libwebp/CMakeFiles/libwebp.dir/build
make -f modules/sfm/src/libmv/libmv/numeric/CMakeFiles/numeric.dir/build.make modules/sfm/src/libmv/libmv/numeric/CMakeFiles/numeric.dir/build
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv_contrib/modules/cudev /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules/cudev /home/ubuntu/opencv/build/modules/cudev/CMakeFiles/opencv_cudev.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f modules/python_bindings_generator/CMakeFiles/gen_opencv_python_source.dir/build.make modules/python_bindings_generator/CMakeFiles/gen_opencv_python_source.dir/build
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/sfm/src/libmv/libmv/numeric/CMakeFiles/numeric.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/python_bindings_generator/CMakeFiles/gen_opencv_python_source.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f modules/cudev/CMakeFiles/opencv_cudev.dir/build.make modules/cudev/CMakeFiles/opencv_cudev.dir/build
[  3%] Built target numeric
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/cudev/CMakeFiles/opencv_cudev.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/build.make modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/depend
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f 3rdparty/openexr/CMakeFiles/IlmImf.dir/build.make 3rdparty/openexr/CMakeFiles/IlmImf.dir/build
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for '3rdparty/libwebp/CMakeFiles/libwebp.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
[  3%] Built target gen_opencv_python_source
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/build.make 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/build
[  3%] Built target opencv_cudev
make -f modules/core/CMakeFiles/opencv_core.dir/build.make modules/core/CMakeFiles/opencv_core.dir/depend
[  6%] Built target libwebp
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules/sfm/src/libmv/libmv/multiview /home/ubuntu/opencv/build/modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for '3rdparty/openexr/CMakeFiles/IlmImf.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
[  6%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
cd /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda && /usr/bin/cmake -E make_directory /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/.
[  9%] Built target IlmImf
[ 12%] Built target libprotobuf
cd /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda && /usr/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING=RELEASE -D generated_file:STRING=/home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o -D generated_cubin_file:STRING=/home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o.cubin.txt -P /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.cmake
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/build.make modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/build
-- Removing /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
/usr/bin/cmake -E remove /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
[ 13%] Built target multiview
make -f modules/sfm/src/libmv/libmv/correspondence/CMakeFiles/correspondence.dir/build.make modules/sfm/src/libmv/libmv/correspondence/CMakeFiles/correspondence.dir/depend
make[2]: Entering directory '/home/ubuntu/opencv/build'
cd /home/ubuntu/opencv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/opencv /home/ubuntu/opencv_contrib/modules/sfm/src/libmv_light/libmv/correspondence /home/ubuntu/opencv/build /home/ubuntu/opencv/build/modules/sfm/src/libmv/libmv/correspondence /home/ubuntu/opencv/build/modules/sfm/src/libmv/libmv/correspondence/CMakeFiles/correspondence.dir/DependInfo.cmake --color=
-- Generating dependency file: /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.NVCC-depend
make[2]: Leaving directory '/home/ubuntu/opencv/build'
make -f modules/sfm/src/libmv/libmv/correspondence/CMakeFiles/correspondence.dir/build.make modules/sfm/src/libmv/libmv/correspondence/CMakeFiles/correspondence.dir/build
/usr/bin/nvcc -M -D__CUDACC__ /home/ubuntu/opencv/modules/core/src/cuda/gpu_mat.cu -o /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.NVCC-depend -ccbin /usr/bin/gcc-5 -m64 -D__OPENCV_BUILD=1 -D_USE_MATH_DEFINES -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -DOPENCV_WITH_ITT=1 -Xcompiler ,\"-fsigned-char\",\"-ffast-math\",\"-W\",\"-Wall\",\"-Werror=return-type\",\"-Werror=non-virtual-dtor\",\"-Werror=address\",\"-Werror=sequence-point\",\"-Wformat\",\"-Werror=format-security\",\"-Wmissing-declarations\",\"-Winit-self\",\"-Wpointer-arith\",\"-Wuninitialized\",\"-Winit-self\",\"-Wno-comment\",\"-fdiagnostics-show-option\",\"-Wno-long-long\",\"-pthread\",\"-fomit-frame-pointer\",\"-ffunction-sections\",\"-fdata-sections\",\"-msse\",\"-msse2\",\"-msse3\",\"-fvisibility=hidden\",\"-Wno-undef\",\"-Wno-enum-compare\",\"-Wno-unused-function\",\"-Wno-shadow\",\"-Wno-unused-but-set-variable\",\"-O3\",\"-DNDEBUG\",\"-DNDEBUG\" -gencode arch=compute_52,code=sm_52 -D_FORCE_INLINES --use_fast_math -Xcompiler -DCVAPI_EXPORTS -Xcompiler -fPIC --std=c++11 -DNVCC -I/usr/include -I/home/ubuntu/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/include -I/home/ubuntu/opencv/build/3rdparty/ippicv/ippicv_lnx/iw/include -I/home/ubuntu/opencv/build -I/usr/include/eigen3 -I/home/ubuntu/opencv/modules/core/include -I/home/ubuntu/opencv/build/modules/core -I/home/ubuntu/opencv_contrib/modules/cudev/include -I/usr/include -I/home/ubuntu/opencv/3rdparty/include/opencl/1.2 -I/home/ubuntu/opencv/3rdparty/ittnotify/include
make[2]: Entering directory '/home/ubuntu/opencv/build'
make[2]: Nothing to be done for 'modules/sfm/src/libmv/libmv/correspondence/CMakeFiles/correspondence.dir/build'.
make[2]: Leaving directory '/home/ubuntu/opencv/build'
[ 13%] Built target correspondence
-- Generating temporary cmake readable file: /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend.tmp
/usr/bin/cmake -D input_file:FILEPATH=/home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.NVCC-depend -D output_file:FILEPATH=/home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend.tmp -P /home/ubuntu/opencv/cmake/FindCUDA/make2cmake.cmake
-- Copy if different /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend.tmp to /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend
/usr/bin/cmake -E copy_if_different /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend.tmp /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend
-- Removing /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend.tmp and /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.NVCC-depend
/usr/bin/cmake -E remove /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.depend.tmp /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o.NVCC-depend
-- Generating /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
/usr/bin/nvcc /home/ubuntu/opencv/modules/core/src/cuda/gpu_mat.cu -c -o /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o -ccbin /usr/bin/gcc-5 -m64 -D__OPENCV_BUILD=1 -D_USE_MATH_DEFINES -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -DOPENCV_WITH_ITT=1 -Xcompiler ,\"-fsigned-char\",\"-ffast-math\",\"-W\",\"-Wall\",\"-Werror=return-type\",\"-Werror=non-virtual-dtor\",\"-Werror=address\",\"-Werror=sequence-point\",\"-Wformat\",\"-Werror=format-security\",\"-Wmissing-declarations\",\"-Winit-self\",\"-Wpointer-arith\",\"-Wuninitialized\",\"-Winit-self\",\"-Wno-comment\",\"-fdiagnostics-show-option\",\"-Wno-long-long\",\"-pthread\",\"-fomit-frame-pointer\",\"-ffunction-sections\",\"-fdata-sections\",\"-msse\",\"-msse2\",\"-msse3\",\"-fvisibility=hidden\",\"-Wno-undef\",\"-Wno-enum-compare\",\"-Wno-unused-function\",\"-Wno-shadow\",\"-Wno-unused-but-set-variable\",\"-O3\",\"-DNDEBUG\",\"-DNDEBUG\" -gencode arch=compute_52,code=sm_52 -D_FORCE_INLINES --use_fast_math -Xcompiler -DCVAPI_EXPORTS -Xcompiler -fPIC --std=c++11 -DNVCC -I/usr/include -I/home/ubuntu/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/include -I/home/ubuntu/opencv/build/3rdparty/ippicv/ippicv_lnx/iw/include -I/home/ubuntu/opencv/build -I/usr/include/eigen3 -I/home/ubuntu/opencv/modules/core/include -I/home/ubuntu/opencv/build/modules/core -I/home/ubuntu/opencv_contrib/modules/cudev/include -I/usr/include -I/home/ubuntu/opencv/3rdparty/include/opencl/1.2 -I/home/ubuntu/opencv/3rdparty/ittnotify/include
/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_0000400d_00000000-7_gpu_mat.cpp1.ii".
-- Removing /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
/usr/bin/cmake -E remove /home/ubuntu/opencv/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:266 (message):
  Error generating file
  /home/ubuntu/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o


modules/core/CMakeFiles/opencv_core.dir/build.make:510: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o' failed
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/build'
CMakeFiles/Makefile2:2874: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[1]: Leaving directory '/home/ubuntu/opencv/build'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
(opencv_cuda) ubuntu@lap:~/opencv/build$ /usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined ```