OpenCV C++ CUDA build error

Hello,

I am trying to build my c++ code that uses OpenCV on my NVIDIA-Jetson TK1 that has Ubuntu 14.01 on it. I cloned the github directory, as well as opencv_contrib and ran the following cmake command: cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN=“3.2” -DCUDA_ARCH_PTX="" -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules …

However, when I try to run make -j8, I get errors relating to the usage of eigen in some of the files and the make command does not finish. Any idea how I can begin to look into this/what could be happening?

can you show us the errors, please ?

cmake should have either found or disabled dependancies on eigen, so maybe we need to see the cmake output, too

Yes, here:

ubuntu@tegra-ubuntu:~/OpenCV/opencv/release$ make -j4
Scanning dependencies of target opencv_cudev
[  1%] Building CXX object
modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o
[  1%] Built target opencv_videoio_plugins
[  1%] Built target ittnotify
[  3%] Built target libopenjp2
[  4%] Built target quirc
[ 13%] Built target libwebp
[ 18%] Built target libprotobuf
[ 18%] Linking CXX shared library ../../lib/libopencv_cudev.so
[ 18%] Built target opencv_cudev
[ 18%] Building NVCC (Device) object
modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o
[ 18%] Building NVCC (Device) object
modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat_nd.cu.o
Scanning dependencies of target opencv_core
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/alloc.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/arithm.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/arithm.dispatch.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/async.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/batch_distance.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/bindings_utils.cpp.o
[ 18%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/buffer_area.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/channels.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/check.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/command_line_parser.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/conjugate_gradient.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/convert.dispatch.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/convert_c.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/convert_scale.dispatch.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/copy.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/count_non_zero.dispatch.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/cuda_gpu_mat.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/cuda_gpu_mat_nd.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/cuda_host_mem.cpp.o
[ 19%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/cuda_info.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/cuda_stream.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/datastructs.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/directx.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/downhill_simplex.cpp.o
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/dxt.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/gl_core_3_1.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/glob.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/kmeans.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/lapack.cpp.o
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/lda.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/logger.cpp.o
[ 20%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/lpsolver.cpp.o
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/lut.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/mathfuncs.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/mathfuncs_core.dispatch.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matmul.dispatch.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_c.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_decomp.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_expressions.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_iterator.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_operations.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_sparse.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_transform.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/matrix_wrap.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/mean.dispatch.cpp.o
[ 21%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/merge.dispatch.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/minmax.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/norm.cpp.o
[ 22%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/ocl.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/opencl/runtime/opencl_clamdblas.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/opencl/runtime/opencl_clamdfft.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/opencl/runtime/opencl_core.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o
[ 22%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/out.cpp.o
[ 22%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/ovx.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/parallel/parallel.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/parallel/parallel_openmp.cpp.o
[ 22%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/parallel/parallel_tbb.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/parallel_impl.cpp.o
[ 23%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/pca.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/persistence.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/persistence_json.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/persistence_types.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/persistence_xml.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/persistence_yml.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/rand.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/softfloat.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/split.dispatch.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/stat.dispatch.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/stat_c.cpp.o
[ 23%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stl.cpp.o
[ 23%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/sum.dispatch.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/tables.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/trace.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/types.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/umatrix.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/utils/datafile.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/utils/filesystem.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/utils/logtagconfigparser.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/utils/logtagmanager.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/utils/samples.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/va_intel.cpp.o
[ 24%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/opencl_kernels_core.cpp.o
[ 24%] Linking CXX shared library ../../lib/libopencv_core.so
[ 24%] Built target opencv_core
Scanning dependencies of target opencv_flann
Scanning dependencies of target opencv_ml
[ 24%] Building CXX object
modules/flann/CMakeFiles/opencv_flann.dir/src/flann.cpp.o
[ 24%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_transpose.cu.o
Scanning dependencies of target opencv_imgproc
[ 24%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/ann_mlp.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/accum.cpp.o
[ 24%] Building CXX object
modules/flann/CMakeFiles/opencv_flann.dir/src/miniflann.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/accum.dispatch.cpp.o
[ 24%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/boost.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/approx.cpp.o
[ 24%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/data.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/bilateral_filter.dispatch.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/blend.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/box_filter.dispatch.cpp.o
[ 24%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/em.cpp.o
[ 24%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/gbt.cpp.o
[ 24%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_absdiff_mat.cu.o
[ 24%] Building CXX object
modules/ml/CMakeFiles/opencv_ml.dir/src/inner_functions.cpp.o
[ 24%] Linking CXX shared library ../../lib/libopencv_flann.so
[ 24%] Built target opencv_flann
[ 24%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/kdtree.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/canny.cpp.o
[ 24%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/clahe.cpp.o
[ 24%] Building CXX object
modules/ml/CMakeFiles/opencv_ml.dir/src/knearest.cpp.o
[ 25%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_absdiff_scalar.cu.o
[ 25%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color.cpp.o
[ 25%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/lr.cpp.o
[ 25%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color_hsv.dispatch.cpp.o
[ 25%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/nbayes.cpp.o
[ 26%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color_lab.cpp.o
[ 27%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/rtrees.cpp.o
[ 27%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/svm.cpp.o
[ 27%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color_rgb.dispatch.cpp.o
[ 27%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color_yuv.dispatch.cpp.o
[ 27%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/svmsgd.cpp.o
[ 27%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/colormap.cpp.o
[ 27%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/testset.cpp.o
Scanning dependencies of target opencv_version
[ 27%] Building CXX object
apps/version/CMakeFiles/opencv_version.dir/opencv_version.cpp.o
[ 27%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/tree.cpp.o
[ 27%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_add_mat.cu.o
[ 28%] Linking CXX executable ../../bin/opencv_version
[ 28%] Built target opencv_version
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/connectedcomponents.cpp.o
Scanning dependencies of target opencv_surface_matching
[ 28%] Building CXX object
modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/src/icp.cpp.o
[ 28%] Building CXX object
modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/src/pose_3d.cpp.o
[ 28%] Linking CXX shared library ../../lib/libopencv_ml.so
[ 28%] Built target opencv_ml
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/contours.cpp.o
[ 28%] Building CXX object
modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/src/ppf_helpers.cpp.o
[ 28%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_add_scalar.cu.o
[ 28%] Building CXX object
modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/src/ppf_match_3d.cpp.o
[ 28%] Building CXX object
modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/src/t_hash_int.cpp.o
[ 28%] Linking CXX shared library ../../lib/libopencv_surface_matching.so
[ 28%] Built target opencv_surface_matching
[ 28%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_add_weighted.cu.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/convhull.cpp.o
[ 28%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_bitwise_mat.cu.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/corner.cpp.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/cornersubpix.cpp.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/demosaicing.cpp.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/deriv.cpp.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/distransform.cpp.o
[ 28%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/drawing.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/emd.cpp.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_bitwise_scalar.cu.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_cmp_mat.cu.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/featureselect.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/filter.dispatch.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/floodfill.cpp.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_cmp_scalar.cu.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_copy_make_border.cu.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/gabor.cpp.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_countnonzero.cu.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/generalized_hough.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/geometry.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/grabcut.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hershey_fonts.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/histogram.cpp.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_div_mat.cu.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hough.cpp.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_div_scalar.cu.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/imgwarp.cpp.o
[ 29%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_in_range.cu.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/intelligent_scissors.cpp.o
[ 29%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/intersection.cpp.o
[ 30%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/linefit.cpp.o
[ 30%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/lsd.cpp.o
[ 30%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/main.cpp.o
[ 31%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_integral.cu.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/matchcontours.cpp.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/median_blur.dispatch.cpp.o
/home/ubuntu/OpenCV/opencv_contrib/modules/cudaarithm/src/cuda/in_range.cu:
In function ‘void cv::cuda::inRange(cv::InputArray, const Scalar&,
const Scalar&, cv::OutputArray, cv::cuda::Stream&)’:
/home/ubuntu/OpenCV/opencv_contrib/modules/cudaarithm/src/cuda/in_range.cu:54:28:
warning: unused variable ‘NUM_DEPTHS’ [-Wunused-variable]
     static constexpr const int NUM_DEPTHS = CV_64F + 1;
                            ^
[ 31%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_lut.cu.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/min_enclosing_triangle.cpp.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/moments.cpp.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/morph.dispatch.cpp.o
[ 31%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_math.cu.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/phasecorr.cpp.o
[ 31%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_minmax.cu.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/pyramids.cpp.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/resize.cpp.o
[ 31%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_minmax_mat.cu.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/rotcalipers.cpp.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/samplers.cpp.o
[ 31%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/segmentation.cpp.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/shapedescr.cpp.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_minmaxloc.cu.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/smooth.dispatch.cpp.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/spatialgradient.cpp.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_mul_mat.cu.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/subdivision2d.cpp.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_mul_scalar.cu.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sumpixels.dispatch.cpp.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/tables.cpp.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/templmatch.cpp.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/thresh.cpp.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/utils.cpp.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_mul_spectrums.cu.o
[ 32%] Building CXX object
modules/imgproc/CMakeFiles/opencv_imgproc.dir/opencl_kernels_imgproc.cpp.o
[ 32%] Linking CXX shared library ../../lib/libopencv_imgproc.so
[ 32%] Built target opencv_imgproc
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_norm.cu.o
Scanning dependencies of target opencv_intensity_transform
[ 32%] Building CXX object
modules/intensity_transform/CMakeFiles/opencv_intensity_transform.dir/src/bimef.cpp.o
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:
In function ‘cv::Mat
cv::intensity_transform::solveLinearEquation(const cv::Mat_<float>&,
cv::Mat_<float>&, cv::Mat_<float>&, float)’:
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:136:10:
error: ‘Index’ is not a member of ‘Eigen’
     for (Eigen::Index i = 0; i < tempx.rows(); i++)
          ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:136:23:
error: expected ‘;’ before ‘i’
     for (Eigen::Index i = 0; i < tempx.rows(); i++)
                       ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:136:30:
error: ‘i’ was not declared in this scope
     for (Eigen::Index i = 0; i < tempx.rows(); i++)
                              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:145:10:
error: ‘Index’ is not a member of ‘Eigen’
     for (Eigen::Index j = 0; j < tempy.cols(); j++)
          ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:145:23:
error: expected ‘;’ before ‘j’
     for (Eigen::Index j = 0; j < tempy.cols(); j++)
                       ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:145:30:
error: ‘j’ was not declared in this scope
     for (Eigen::Index j = 0; j < tempy.cols(); j++)
                              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:158:10:
error: ‘Index’ is not a member of ‘Eigen’
     for (Eigen::Index j = 0; j < W_h.cols(); j++)
          ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:158:23:
error: expected ‘;’ before ‘j’
     for (Eigen::Index j = 0; j < W_h.cols(); j++)
                       ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:158:30:
error: ‘j’ was not declared in this scope
     for (Eigen::Index j = 0; j < W_h.cols(); j++)
                              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:160:14:
error: ‘Index’ is not a member of ‘Eigen’
         for (Eigen::Index i = 0; i < W_h.rows(); i++)
              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:160:27:
error: expected ‘;’ before ‘i’
         for (Eigen::Index i = 0; i < W_h.rows(); i++)
                           ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:160:34:
error: ‘i’ was not declared in this scope
         for (Eigen::Index i = 0; i < W_h.rows(); i++)
                                  ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:185:10:
error: ‘Index’ is not a member of ‘Eigen’
     for (Eigen::Index j = 0; j < tempx.cols(); j++)
          ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:185:23:
error: expected ‘;’ before ‘j’
     for (Eigen::Index j = 0; j < tempx.cols(); j++)
                       ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:185:30:
error: ‘j’ was not declared in this scope
     for (Eigen::Index j = 0; j < tempx.cols(); j++)
                              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:187:14:
error: ‘Index’ is not a member of ‘Eigen’
         for (Eigen::Index i = 0; i < tempx.rows(); i++)
              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:187:27:
error: expected ‘;’ before ‘i’
         for (Eigen::Index i = 0; i < tempx.rows(); i++)
                           ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:187:34:
error: ‘i’ was not declared in this scope
         for (Eigen::Index i = 0; i < tempx.rows(); i++)
                                  ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:221:85:
error: ‘IncompleteCholesky’ is not a member of ‘Eigen’
     Eigen::ConjugateGradient<Eigen::SparseMatrix<float>,
Eigen::Lower|Eigen::Upper, Eigen::IncompleteCholesky<float> > cg;

              ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:221:85:
error: ‘IncompleteCholesky’ is not a member of ‘Eigen’
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:221:116:
error: template argument 3 is invalid
     Eigen::ConjugateGradient<Eigen::SparseMatrix<float>,
Eigen::Lower|Eigen::Upper, Eigen::IncompleteCholesky<float> > cg;

                                             ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:221:118:
error: expected unqualified-id before ‘>’ token
     Eigen::ConjugateGradient<Eigen::SparseMatrix<float>,
Eigen::Lower|Eigen::Upper, Eigen::IncompleteCholesky<float> > cg;

                                               ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:222:5:
error: ‘cg’ was not declared in this scope
     cg.setTolerance(0.1f);
     ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:
In instantiation of ‘Eigen::SparseMatrix<_Scalar, 0>
cv::intensity_transform::spdiags(const Eigen::Matrix<LhsScalar, -1,
-1, 0>&, const VectorXi&, int, int) [with numeric_t = float;
Eigen::VectorXi = Eigen::Matrix<int, -1, 1>]’:
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:207:65:
  required from here
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:121:13:
warning: narrowing conversion of ‘i’ from ‘int’ to ‘unsigned int’
inside { } [-Wnarrowing]
             triplets.push_back( {i, j,  B(B_i,k)} );
             ^
/home/ubuntu/OpenCV/opencv_contrib/modules/intensity_transform/src/bimef.cpp:121:13:
warning: narrowing conversion of ‘j’ from ‘int’ to ‘unsigned int’
inside { } [-Wnarrowing]
make[2]: *** [modules/intensity_transform/CMakeFiles/opencv_intensity_transform.dir/src/bimef.cpp.o]
Error 1
make[1]: *** [modules/intensity_transform/CMakeFiles/opencv_intensity_transform.dir/all]
Error 2
make[1]: *** Waiting for unfinished jobs....
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_normalize.cu.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_polar_cart.cu.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_reduce.cu.o
[ 32%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_split_merge.cu.o
[ 33%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_sub_mat.cu.o
[ 33%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_sub_scalar.cu.o
[ 33%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_sum.cu.o
[ 33%] Building NVCC (Device) object
modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_threshold.cu.o
Scanning dependencies of target opencv_cudaarithm
[ 33%] Building CXX object
modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/arithm.cpp.o
[ 33%] Building CXX object
modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/core.cpp.o
[ 33%] Building CXX object
modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/element_operations.cpp.o
[ 33%] Building CXX object
modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/lut.cpp.o
[ 33%] Building CXX object
modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/reductions.cpp.o
[ 33%] Linking CXX shared library ../../lib/libopencv_cudaarithm.so
[ 33%] Built target opencv_cudaarithm
1 Like

Done! And here’s my cmake output as well if it’s useful.

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local
-D WITH_TBB=ON ..
-- Detected processor: armv7l
-- Looking for ccache - not found
-- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found suitable
version "1.2.8", minimum required is "1.2.3")
Cleaning INTERNAL cached variable: WEBP_LIBRARY
Cleaning INTERNAL cached variable: WEBP_INCLUDE_DIR
-- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended
version >= 2.3.1). OpenJPEG will be built from sources
-- OpenJPEG: VERSION = 2.4.0, BUILD = opencv-4.5.2-dev-openjp2-2.4.0
-- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.4.0")
-- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version "1.2.8")
-- Found OpenEXR: /usr/lib/arm-linux-gnueabihf/libIlmImf.so
-- Checking for module 'gtk+-3.0'
--   No package 'gtk+-3.0' found
-- Found TBB (env): /usr/lib/libtbb.so
-- Could NOT find CUDNN (missing: CUDNN_LIBRARY CUDNN_INCLUDE_DIR)
(Required is at least version "7.5")
-- CUDA detected: 6.5
-- CUDA: Using CUDA_ARCH_BIN=3.2
-- CUDA NVCC target flags: -gencode;arch=compute_32,code=sm_32;-D_FORCE_INLINES
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR
Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY
Atlas_LAPACK_LIBRARY)
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build
directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Carotene: NEON is not available, disabling carotene...
-- ADE: Download: v0.1.1f.zip
-- Try 1 failed
CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
  ADE: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  modules/gapi/cmake/DownloadADE.cmake:5 (ocv_download)
  modules/gapi/cmake/init.cmake:19 (include)
  cmake/OpenCVModule.cmake:298 (include)
  cmake/OpenCVModule.cmake:361 (_add_modules_1)
  modules/CMakeLists.txt:7 (ocv_glob_modules)


-- OpenCV Python: during development append to PYTHONPATH:
/home/ubuntu/OpenCV/opencv/release/python_loader
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-app-1.0'
--   No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
--   No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
--   No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-video-1.0'
--   No package 'gstreamer-video-1.0' found
-- freetype2:   YES (ver 17.1.11)
-- harfbuzz:    YES (ver 0.9.27)
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
(found version "")
-- Julia not found. Not compiling Julia Bindings.
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set,
and no hints for include/library directories provided. Defaulting to
preferring an installed/exported gflags CMake configuration if
available.
-- Failed to find installed gflags CMake configuration, searching for
gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake
configuration for gflags, will perform search for installed gflags
components.
-- Failed to find gflags - Could not find gflags include directory,
set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Failed to find glog - Could not find glog include directory, set
GLOG_INCLUDE_DIR to directory containing glog/logging.h
-- Module opencv_sfm disabled because the following dependencies are
not found: Glog/Gflags
-- Checking for module 'tesseract'
--   No package 'tesseract' found
-- Tesseract:   NO
-- Allocator metrics storage type: 'int'
-- Excluding from source files list: modules/imgproc/src/corner.avx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn':
/home/ubuntu/OpenCV/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- opencv_dnn: filter out cuda4dnn source code
-- Excluding from source files list:
<BUILD>/modules/dnn/layers/layers_common.avx.cpp
-- Excluding from source files list:
<BUILD>/modules/dnn/layers/layers_common.avx2.cpp
-- Excluding from source files list:
<BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
-- Excluding from source files list: modules/features2d/src/fast.avx2.cpp
-- wechat_qrcode: Download: detect.caffemodel
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  wechat_qrcode: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:26
(ocv_download)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:37
(message):
  WeChatQRCode: Can't get detect caffemodel file for wechat qrcode.


-- wechat_qrcode: Download: detect.prototxt
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  wechat_qrcode: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:26
(ocv_download)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:37
(message):
  WeChatQRCode: Can't get detect prototxt file for wechat qrcode.


-- wechat_qrcode: Download: sr.caffemodel
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  wechat_qrcode: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:26
(ocv_download)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:37
(message):
  WeChatQRCode: Can't get sr caffemodel file for wechat qrcode.


-- wechat_qrcode: Download: sr.prototxt
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  wechat_qrcode: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:26
(ocv_download)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/wechat_qrcode/CMakeLists.txt:37
(message):
  WeChatQRCode: Can't get sr prototxt file for wechat qrcode.


-- xfeatures2d/boostdesc: Download: boostdesc_bgm.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_bgm_bi.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_bgm_hd.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_binboost_064.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_binboost_128.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_binboost_256.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_lbgm.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:12
(download_boost_descriptors)


-- xfeatures2d/vgg: Download: vgg_generated_48.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/vgg: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake:16
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:13
(download_vgg_descriptors)


-- xfeatures2d/vgg: Download: vgg_generated_64.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/vgg: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake:16
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:13
(download_vgg_descriptors)


-- xfeatures2d/vgg: Download: vgg_generated_80.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/vgg: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake:16
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:13
(download_vgg_descriptors)


-- xfeatures2d/vgg: Download: vgg_generated_120.i
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  xfeatures2d/vgg: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake:16
(ocv_download)
  /home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:13
(download_vgg_descriptors)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:17
(message):
  features2d: Boost descriptor implementation is not available due to missing
  data (download failed:
  https://github.com/opencv/opencv_contrib/issues/1301)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:22
(message):
  features2d: VGG descriptor implementation is not available due to missing
  data (download failed:
  https://github.com/opencv/opencv_contrib/issues/1301)


-- data: Download: face_landmark_model.dat
-- Try 1 failed
CMake Warning at
/home/ubuntu/OpenCV/opencv/cmake/OpenCVDownload.cmake:202 (message):
  data: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /home/ubuntu/OpenCV/opencv/release/CMakeDownloadLog.txt

Call Stack (most recent call first):
  /home/ubuntu/OpenCV/opencv_contrib/modules/face/CMakeLists.txt:13
(ocv_download)


CMake Warning at
/home/ubuntu/OpenCV/opencv_contrib/modules/face/CMakeLists.txt:26
(message):
  Face: Can't get model file for face alignment.



-- General configuration for OpenCV 4.5.2-dev
=====================================
--   Version control:               4.5.2-91-g7de627c
--
--   Extra modules:
--     Location (extra):            /home/ubuntu/OpenCV/opencv_contrib/modules
--     Version control (extra):     4.5.2-30-gfc0cec6
--
--   Platform:
--     Timestamp:                   2021-05-11T06:01:59Z
--     Host:                        Linux 3.10.40-gc017b03 armv7l
--     CMake:                       3.10.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
--
--   CPU/HW features:
--     Baseline:
--       requested:                 DETECT
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.2)
--     C++ flags (Release):         -fsigned-char -W -Wall
-Werror=return-type -Werror=non-virtual-dtor -Werror=address
-Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wundef -Winit-self -Wpointer-arith
-Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-comment
-Wno-missing-field-initializers -fdiagnostics-show-option -pthread
-fomit-frame-pointer -ffunction-sections -fdata-sections
-fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall
-Werror=return-type -Werror=non-virtual-dtor -Werror=address
-Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wundef -Winit-self -Wpointer-arith
-Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-comment
-Wno-missing-field-initializers -fdiagnostics-show-option -pthread
-fomit-frame-pointer -ffunction-sections -fdata-sections
-fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG
-D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall
-Werror=return-type -Werror=non-virtual-dtor -Werror=address
-Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
-Wundef -Winit-self -Wpointer-arith -Wuninitialized -Wno-comment
-Wno-missing-field-initializers -fdiagnostics-show-option -pthread
-fomit-frame-pointer -ffunction-sections -fdata-sections
-fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall
-Werror=return-type -Werror=non-virtual-dtor -Werror=address
-Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
-Wundef -Winit-self -Wpointer-arith -Wuninitialized -Wno-comment
-Wno-missing-field-initializers -fdiagnostics-show-option -pthread
-fomit-frame-pointer -ffunction-sections -fdata-sections
-fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--gc-sections -Wl,--as-needed
--     Linker flags (Debug):        -Wl,--gc-sections -Wl,--as-needed
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          m pthread cudart_static dl rt nppc
nppi npps cublas cufft -L/usr/local/cuda/lib
-L/usr/lib/arm-linux-gnueabihf
--     3rdparty dependencies:
--
--   OpenCV modules:
--     To be built:                 alphamat aruco barcode bgsegm
bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec
cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect
cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect
dnn_superres dpm face features2d flann freetype fuzzy hfs highgui
img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml
objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd
saliency shape stereo stitching structured_light superres
surface_matching text tracking video videoio videostab wechat_qrcode
xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cvv gapi hdf java julia matlab
ovis python2 python3 sfm ts viz
--     Applications:                apps
--     Documentation:               NO
--     Non-free algorithms:         NO
--
--   GUI:
--     GTK+:                        YES (ver 2.24.23)
--       GThread :                  YES (ver 2.40.2)
--       GtkGlExt:                  NO
--     VTK support:                 NO
--
--   Media I/O:
--     ZLib:
/usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.8)
--     JPEG:
/usr/lib/arm-linux-gnueabihf/libjpeg.so (ver 80)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:
/usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.50)
--     TIFF:
/usr/lib/arm-linux-gnueabihf/libtiff.so (ver 42 / 4.0.3)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:
/usr/lib/arm-linux-gnueabihf/libImath.so
/usr/lib/arm-linux-gnueabihf/libIlmImf.so
/usr/lib/arm-linux-gnueabihf/libIex.so
/usr/lib/arm-linux-gnueabihf/libHalf.so
/usr/lib/arm-linux-gnueabihf/libIlmThread.so (ver 1.6.1)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     DC1394:                      YES (2.2.1)
--     FFMPEG:                      YES
--       avcodec:                   YES (54.35.1)
--       avformat:                  YES (54.20.4)
--       avutil:                    YES (52.3.0)
--       swscale:                   YES (2.1.1)
--       avresample:                NO
--     GStreamer:                   NO
--     v4l/v4l2:                    YES (linux/videodev2.h)
--
--   Parallel framework:            TBB (ver 4.2 interface 7000)
--
--   Trace:                         YES (with Intel ITT)
--
--   Other third-party libraries:
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.2.0)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.5.1)
--
--   NVIDIA CUDA:                   YES (ver 6.5, CUFFT CUBLAS)
--     NVIDIA GPU arch:             32
--     NVIDIA PTX archs:
--
--   cuDNN:                         NO
--
--   OpenCL:                        YES (no extra features)
--     Include path:
/home/ubuntu/OpenCV/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   Python (for build):            /usr/bin/python2.7
--
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
--
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/OpenCV/opencv/release

so cmake found an Eigen version, but this is probably too old. you can:

  • try to update to something later, like eigen3.3.7, and add -DEigen3_DIR=/path/to/eigen-3.3.7 to the cmake params
  • try to disable Eigen support: cmake -DWITH_EIGEN=0

cmake also tries to download a couple of things (e.g. the xfeatures2d module won’t build without the vgg kernels, gapi cannot build without libade, etc)

Thank you, trying that right now. Another error that I get with compilation is this-

cc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
CMake Error at cuda_compile_1_generated_sub_scalar.cu.o.RELEASE.cmake:281
(message):
Error generating file
/home/ubuntu/OpenCV/opencv/release/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_sub_scalar.cu.o

make[2]: *** [modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_sub_scalar.cu.o]
Error 1

sounds silly, but do you have enough swap space, memory ?
(my build folder is about 4gb now, and that without cuda …)

disable precompiled headers ? (disk killer !)

if resources are scarce, maybe make -j2 only ?

I think it is getting farther than before, but it is now getting stuck here:

/home/ubuntu/OpenCV/opencv_contrib/modules/cudastereo/src/cuda/stereosgm.cu(382):
error: Within a device/global function, only shared
variables may be marked “static”

/home/ubuntu/OpenCV/opencv_contrib/modules/cudastereo/src/cuda/stereosgm.cu(584):
error: Within a device/global function, only shared
variables may be marked “static”
detected during instantiation of “void
cv::cuda::device::stereosgm::path_aggregation::horizontal::aggregateLeft2RightPath<MAX_DISPARITY>(const
cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &,
unsigned int, unsigned int, int, cv::cuda::Stream &) [with
MAX_DISPARITY=64U]”
(769): here