make opencv error in Xavier

/root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/opencl_kernels_stitching.cpp.o
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/stitching/precomp.hpp.gch/opencv_stitching_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] In file included from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0, from /root/tools/opencv-3.4.0/release/modules/stitching/precomp.hpp:87, from <command-line>:0: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘NCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘void HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x); ^ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] [ 98%] Linking CXX shared library ../../lib/libopencv_stitching.so [ 98%] Built target opencv_stitching In file included from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/functional.hpp:50:0, from /root/tools/opencv-3.4.0/modules/cudaoptflow/src/cuda/pyrlk.cu:47: /usr/local/cuda/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp] #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." ^~~~~~~ Scanning dependencies of target opencv_cudaoptflow [ 98%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/brox.cpp.o [ 98%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/farneback.cpp.o [ 98%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/pyrlk.cpp.o [ 98%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/tvl1flow.cpp.o cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp.gch/opencv_cudaoptflow_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp.gch/opencv_cudaoptflow_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp.gch/opencv_cudaoptflow_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp.gch/opencv_cudaoptflow_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] In file included from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0, from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/private.hpp:57, from /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp:59, from <command-line>:0: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘NCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX; ^~ In file included from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0, from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/private.hpp:57, from /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp:59, from <command-line>:0: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘NCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘void HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x); ^ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘void HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x); ^ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] In file included from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0, from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/private.hpp:57, from /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp:59, from <command-line>:0: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘NCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘void HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x); ^ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] In file included from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0, from /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/private.hpp:57, from /root/tools/opencv-3.4.0/release/modules/cudaoptflow/precomp.hpp:59, from <command-line>:0: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘NCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight; ^~ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function ‘void HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)’: /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x); ^ /root/tools/opencv-3.4.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] [ 98%] Linking CXX shared library ../../lib/libopencv_cudaoptflow.so [ 98%] Built target opencv_cudaoptflow [ 98%] Processing OpenCL kernels (superres) [ 98%] Building NVCC (Device) object modules/videostab/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_global_motion.cu.o [ 98%] Building NVCC (Device) object modules/superres/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_btv_l1_gpu.cu.o In file included from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/../functional.hpp:50:0, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp:48, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/transform.hpp:48, from /root/tools/opencv-3.4.0/modules/superres/src/cuda/btv_l1_gpu.cu:48: /usr/local/cuda/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp] #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." ^~~~~~~ In file included from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/../functional.hpp:50:0, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp:48, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/transform.hpp:48, from /root/tools/opencv-3.4.0/modules/superres/src/cuda/btv_l1_gpu.cu:48: /usr/local/cuda/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp] #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." ^~~~~~~ In file included from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/../functional.hpp:50:0, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp:48, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/transform.hpp:48, from /root/tools/opencv-3.4.0/modules/superres/src/cuda/btv_l1_gpu.cu:48: /usr/local/cuda/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp] #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." ^~~~~~~ In file included from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/../functional.hpp:50:0, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp:48, from /root/tools/opencv-3.4.0/modules/core/include/opencv2/core/cuda/transform.hpp:48, from /root/tools/opencv-3.4.0/modules/superres/src/cuda/btv_l1_gpu.cu:48: /usr/local/cuda/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp] #warning "device_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." ^~~~~~~ Scanning dependencies of target opencv_superres [ 98%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/btv_l1.cpp.o [ 98%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o [ 98%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/optical_flow.cpp.o [ 98%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/btv_l1_cuda.cpp.o [ 98%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o [ 98%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/input_array_utility.cpp.o [ 99%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/opencl_kernels_superres.cpp.o cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/superres/precomp.hpp.gch/opencv_superres_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
Scanning dependencies of target opencv_videostab
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/deblurring.cpp.o
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/fast_marching.cpp.o
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/frame_source.cpp.o
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/global_motion.cpp.o
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/inpainting.cpp.o
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/log.cpp.o
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/motion_stabilizing.cpp.o
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] [ 99%] Linking CXX shared library ../../lib/libopencv_superres.so [ 99%] Built target opencv_superres [ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/optical_flow.cpp.o cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
[ 99%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/outlier_rejection.cpp.o
[100%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/stabilizer.cpp.o
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because __cpp_aggregate_nsdmi' not defined [-Winvalid-pch] cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
[100%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/wobble_suppression.cpp.o
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because `cpp_aggregate_nsdmi’ not defined [-Winvalid-pch]
[100%] Linking CXX shared library …/…/lib/libopencv_videostab.so
[100%] Built target opencv_videostab
Scanning dependencies of target opencv_python3
[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/
/src2/cv2.cpp.o
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp: In function ‘bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]’:
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp:885:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char* str = PyString_AsString(obj);
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/
/src2/cv2.cpp.o’ failed
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/
/src2/cv2.cpp.o] Error 1
CMakeFiles/Makefile2:5446: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all’ failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2

use make -j 8

root@szh-desktop:~/tools/opencv-3.4.0/release# cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN=“7.2”-DENABLE_PRECOMPILED_HEADERS=OFF -DENABLE_CXX11=ON -DINSTALL_C_EXAMPLES=OFF -DCUDA_ARCH_PTX=“” -DWITH_GSTREAMER=ON -DWITH_LIBV4L=ON -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python2=OFF -DCMAKE_INSTALL_PREFIX=$(python3 -c “import sys; print(sys.prefix)”) -DPYTHON3_EXECUTABLE=$(which python3) -DPYTHON3_INCLUDE_DIR=$(python3 -c “from distutils.sysconfig import get_python_inc; print(get_python_inc())”) -DPYTHON3_PACKAGES_PATH=$(python3 -c “from distutils.sysconfig import get_python_lib; print(get_python_lib())”) …
– The CXX compiler identification is GNU 7.4.0
– The C compiler identification is GNU 7.4.0
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Found PythonInterp: /usr/bin/python2.7 (found suitable version “2.7.15”, minimum required is “2.7”)
– Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so (found suitable exact version “2.7.15+”)
– Found PythonInterp: /root/archiconda3/bin/python3 (found suitable version “3.7.1”, minimum required is “3.4”)
– Found PythonLibs: /root/archiconda3/lib/libpython3.7m.so (found suitable exact version “3.7.1”)
– Looking for ccache - not found
– Performing Test HAVE_CXX_FSIGNED_CHAR
– Performing Test HAVE_CXX_FSIGNED_CHAR - Success
– Performing Test HAVE_C_FSIGNED_CHAR
– Performing Test HAVE_C_FSIGNED_CHAR - Success
– Performing Test HAVE_CXX_W
– Performing Test HAVE_CXX_W - Success
– Performing Test HAVE_C_W
– Performing Test HAVE_C_W - Success
– Performing Test HAVE_CXX_WALL
– Performing Test HAVE_CXX_WALL - Success
– Performing Test HAVE_C_WALL
– Performing Test HAVE_C_WALL - Success
– Performing Test HAVE_CXX_WERROR_RETURN_TYPE
– Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
– Performing Test HAVE_C_WERROR_RETURN_TYPE
– Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
– Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
– Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
– Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
– Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
– Performing Test HAVE_CXX_WERROR_ADDRESS
– Performing Test HAVE_CXX_WERROR_ADDRESS - Success
– Performing Test HAVE_C_WERROR_ADDRESS
– Performing Test HAVE_C_WERROR_ADDRESS - Success
– Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
– Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
– Performing Test HAVE_C_WERROR_SEQUENCE_POINT
– Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
– Performing Test HAVE_CXX_WFORMAT
– Performing Test HAVE_CXX_WFORMAT - Success
– Performing Test HAVE_C_WFORMAT
– Performing Test HAVE_C_WFORMAT - Success
– Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
– Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
– Performing Test HAVE_C_WERROR_FORMAT_SECURITY
– Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
– Performing Test HAVE_CXX_WMISSING_DECLARATIONS
– Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
– Performing Test HAVE_C_WMISSING_DECLARATIONS
– Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
– Performing Test HAVE_CXX_WMISSING_PROTOTYPES
– Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
– Performing Test HAVE_C_WMISSING_PROTOTYPES
– Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
– Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
– Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
– Performing Test HAVE_C_WSTRICT_PROTOTYPES
– Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
– Performing Test HAVE_CXX_WUNDEF
– Performing Test HAVE_CXX_WUNDEF - Success
– Performing Test HAVE_C_WUNDEF
– Performing Test HAVE_C_WUNDEF - Success
– Performing Test HAVE_CXX_WINIT_SELF
– Performing Test HAVE_CXX_WINIT_SELF - Success
– Performing Test HAVE_C_WINIT_SELF
– Performing Test HAVE_C_WINIT_SELF - Success
– Performing Test HAVE_CXX_WPOINTER_ARITH
– Performing Test HAVE_CXX_WPOINTER_ARITH - Success
– Performing Test HAVE_C_WPOINTER_ARITH
– Performing Test HAVE_C_WPOINTER_ARITH - Success
– Performing Test HAVE_CXX_WSHADOW
– Performing Test HAVE_CXX_WSHADOW - Success
– Performing Test HAVE_C_WSHADOW
– Performing Test HAVE_C_WSHADOW - Success
– Performing Test HAVE_CXX_WSIGN_PROMO
– Performing Test HAVE_CXX_WSIGN_PROMO - Success
– Performing Test HAVE_C_WSIGN_PROMO
– Performing Test HAVE_C_WSIGN_PROMO - Failed
– Performing Test HAVE_CXX_WUNINITIALIZED
– Performing Test HAVE_CXX_WUNINITIALIZED - Success
– Performing Test HAVE_C_WUNINITIALIZED
– Performing Test HAVE_C_WUNINITIALIZED - Success
– Performing Test HAVE_CXX_WNO_NARROWING
– Performing Test HAVE_CXX_WNO_NARROWING - Success
– Performing Test HAVE_C_WNO_NARROWING
– Performing Test HAVE_C_WNO_NARROWING - Success
– Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
– Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
– Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
– Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
– Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
– Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
– Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
– Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
– Performing Test HAVE_CXX_WNO_COMMENT
– Performing Test HAVE_CXX_WNO_COMMENT - Success
– Performing Test HAVE_C_WNO_COMMENT
– Performing Test HAVE_C_WNO_COMMENT - Success
– Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH
– Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Success
– Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH
– Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Success
– Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
– Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
– Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
– Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
– Performing Test HAVE_CXX_PTHREAD
– Performing Test HAVE_CXX_PTHREAD - Success
– Performing Test HAVE_C_PTHREAD
– Performing Test HAVE_C_PTHREAD - Success
– Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
– Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
– Performing Test HAVE_C_FOMIT_FRAME_POINTER
– Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
– Performing Test HAVE_CXX_FFUNCTION_SECTIONS
– Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
– Performing Test HAVE_C_FFUNCTION_SECTIONS
– Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
– Performing Test HAVE_CXX_FDATA_SECTIONS
– Performing Test HAVE_CXX_FDATA_SECTIONS - Success
– Performing Test HAVE_C_FDATA_SECTIONS
– Performing Test HAVE_C_FDATA_SECTIONS - Success
– Performing Test HAVE_CPU_NEON_SUPPORT (check file: cmake/checks/cpu_neon.cpp)
– Performing Test HAVE_CPU_NEON_SUPPORT - Success
– Performing Test HAVE_CPU_FP16_SUPPORT (check file: cmake/checks/cpu_fp16.cpp)
– Performing Test HAVE_CPU_FP16_SUPPORT - Success
– Performing Test HAVE_CPU_BASELINE_FLAGS
– Performing Test HAVE_CPU_BASELINE_FLAGS - Success
– Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
– Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
– Performing Test HAVE_C_FVISIBILITY_HIDDEN
– Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
– Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
– Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
– Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
– Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for posix_memalign
– Looking for posix_memalign - found
– Looking for malloc.h
– Looking for malloc.h - found
– Looking for memalign
– Looking for memalign - found
– Check if the system is big endian
– Searching 16 bit integer
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of unsigned short
– Check size of unsigned short - done
– Using unsigned short
– Check if the system is big endian - little endian
– Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found suitable version “1.2.11”, minimum required is “1.2.3”)
– Found JPEG: /usr/lib/aarch64-linux-gnu/libjpeg.so
– Found TIFF: /usr/lib/aarch64-linux-gnu/libtiff.so (found version “4.0.9”)
– Performing Test HAVE_C_WNO_UNUSED_VARIABLE
– Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
– Performing Test HAVE_C_WNO_UNUSED_FUNCTION
– Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
– Performing Test HAVE_C_WNO_SHADOW
– Performing Test HAVE_C_WNO_SHADOW - Success
– Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
– Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Success
– Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
– Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
– Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
– Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
– Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
– Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION
– Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION - Success
– Performing Test HAVE_C_WNO_UNINITIALIZED
– Performing Test HAVE_C_WNO_UNINITIALIZED - Success
– Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER
– Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER - Success
– Performing Test HAVE_C_WNO_UNUSED
– Performing Test HAVE_C_WNO_UNUSED - Success
– Performing Test HAVE_C_WNO_SIGN_COMPARE
– Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
– Performing Test HAVE_C_WNO_STRICT_OVERFLOW
– Performing Test HAVE_C_WNO_STRICT_OVERFLOW - Success
– Performing Test HAVE_C_WNO_POINTER_COMPARE
– Performing Test HAVE_C_WNO_POINTER_COMPARE - Success
– Performing Test HAVE_C_WNO_ABSOLUTE_VALUE
– Performing Test HAVE_C_WNO_ABSOLUTE_VALUE - Failed
– Performing Test HAVE_C_WNO_UNUSED_PARAMETER
– Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
– Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
– Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
– Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version “1.2.11”)
– Found PNG: /usr/lib/aarch64-linux-gnu/libpng.so (found version “1.6.34”)
– Looking for /usr/include/libpng/png.h
– Looking for /usr/include/libpng/png.h - found
– Looking for semaphore.h
– Looking for semaphore.h - found
– Performing Test HAVE_CXX_WNO_SHADOW
– Performing Test HAVE_CXX_WNO_SHADOW - Success
– Performing Test HAVE_CXX_WNO_UNUSED
– Performing Test HAVE_CXX_WNO_UNUSED - Success
– Performing Test HAVE_CXX_WNO_SIGN_COMPARE
– Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
– Performing Test HAVE_CXX_WNO_UNDEF
– Performing Test HAVE_CXX_WNO_UNDEF - Success
– Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
– Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
– Performing Test HAVE_CXX_WNO_UNINITIALIZED
– Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success
– Performing Test HAVE_CXX_WNO_SWITCH
– Performing Test HAVE_CXX_WNO_SWITCH - Success
– Performing Test HAVE_CXX_WNO_PARENTHESES
– Performing Test HAVE_CXX_WNO_PARENTHESES - Success
– Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
– Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
– Performing Test HAVE_CXX_WNO_EXTRA
– Performing Test HAVE_CXX_WNO_EXTRA - Success
– Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
– Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
– Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION
– Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION - Success
– Performing Test HAVE_CXX_WNO_DEPRECATED
– Performing Test HAVE_CXX_WNO_DEPRECATED - Success
– Checking for module ‘gtk±3.0’
– Found gtk±3.0, version 3.22.30
– Checking for module ‘gthread-2.0’
– Found gthread-2.0, version 2.56.4
– Checking for module ‘gstreamer-base-1.0’
– Found gstreamer-base-1.0, version 1.14.4
– Checking for module ‘gstreamer-video-1.0’
– Found gstreamer-video-1.0, version 1.14.4
– Checking for module ‘gstreamer-app-1.0’
– Found gstreamer-app-1.0, version 1.14.4
– Checking for module ‘gstreamer-riff-1.0’
– Found gstreamer-riff-1.0, version 1.14.4
– Checking for module ‘gstreamer-pbutils-1.0’
– Found gstreamer-pbutils-1.0, version 1.14.4
– Checking for module ‘libdc1394-2’
– No package ‘libdc1394-2’ found
– Checking for module ‘libdc1394’
– No package ‘libdc1394’ found
– Checking for module ‘libv4l1’
– Found libv4l1, version 1.14.2
– Checking for module ‘libv4l2’
– Found libv4l2, version 1.14.2
– Looking for linux/videodev.h
– Looking for linux/videodev.h - not found
– Looking for linux/videodev2.h
– Looking for linux/videodev2.h - found
– Looking for sys/videoio.h
– Looking for sys/videoio.h - not found
– Checking for modules ‘libavcodec;libavformat;libavutil;libswscale’
– Found libavcodec, version 57.107.100
– Found libavformat, version 57.83.100
– Found libavutil, version 55.78.100
– Found libswscale, version 4.8.100
– Checking for module ‘libavresample’
– No package ‘libavresample’ found
– Checking for module ‘libgphoto2’
– No package ‘libgphoto2’ found
– CUDA detected: 10.0
– CUDA NVCC target flags: -gencode;arch=compute_72,code=sm_72;-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_CLAPACK_INCLUDE_DIR)
– Looking for dgemm_
– Looking for dgemm_ - found
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - found
– Found Threads: TRUE
– A library with BLAS API found.
– Looking for cheev_
– Looking for cheev_ - found
– A library with LAPACK API found.
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
– Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
– Could NOT find Pylint (missing: PYLINT_EXECUTABLE)
– Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
– VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
– Performing Test CXX_HAS_MFPU_NEON
– Performing Test CXX_HAS_MFPU_NEON - Failed
– Performing Test C_HAS_MFPU_NEON
– Performing Test C_HAS_MFPU_NEON - Failed
– Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
– Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
– Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
– Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
– Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE
– Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE - Success
– Performing Test HAVE_CXX_WNO_ENUM_COMPARE
– Performing Test HAVE_CXX_WNO_ENUM_COMPARE - Success
– Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
– Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed
– Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
– Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
– Performing Test HAVE_CXX_WNO_SIGN_PROMO
– Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
– Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
– Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
– Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
– Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
– Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
– Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Success
– Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
– Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Failed
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/core/src/convert.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/core/src/convert.sse4_1.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/core/mathfuncs_core.sse2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/core/mathfuncs_core.avx.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/core/mathfuncs_core.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/core/stat.sse4_2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/core/stat.avx2.cpp
– Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE
– Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE - Success
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/corner.avx.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/filter.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/imgwarp.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/imgwarp.sse4_1.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/resize.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/resize.sse4_1.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/imgproc/src/undistort.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/imgproc/accum.sse2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/imgproc/accum.avx.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/objdetect/src/haar.avx.cpp
– Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED
– Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED - Success
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/dnn/layers/layers_common.avx.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/release/modules/dnn/layers/layers_common.avx2.cpp
– Excluding from source files list: /root/tools/opencv-3.4.0/modules/features2d/src/fast.avx2.cpp
-c:1: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
– Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL
– Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL - Success
– Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD
– Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD - Failed

– General configuration for OpenCV 3.4.0 =====================================
– Version control: unknown

– Platform:
– Timestamp: 2019-07-19T09:19:41Z
– Host: Linux 4.9.140-tegra aarch64
– CMake: 3.10.2
– CMake generator: Unix Makefiles
– CMake build tool: /usr/bin/make
– Configuration: RELEASE

– CPU/HW features:
– Baseline: NEON FP16
– required: NEON
– disabled: VFPV3

– C/C++:
– Built as dynamic libs?: YES
– C++11: YES
– C++ Compiler: /usr/bin/c++ (ver 7.4.0)
– 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 -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -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 -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -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 -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -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 -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
– Linker flags (Release):
– Linker flags (Debug):
– ccache: NO
– Precompiled headers: YES
– Extra dependencies: dl m pthread rt cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda/lib64
– 3rdparty dependencies:

– OpenCV modules:
– To be built: calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev dnn features2d flann highgui imgcodecs imgproc ml objdetect photo python3 python_bindings_generator shape stitching superres video videoio videostab
– Disabled: js python2 world
– Disabled by dependency: -
– Unavailable: java ts viz
– Applications: apps
– Documentation: NO
– Non-free algorithms: NO

– GUI:
– GTK+: YES (ver 3.22.30)
– GThread : YES (ver 2.56.4)
– GtkGlExt: NO
– VTK support: NO

– Media I/O:
– ZLib: /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)
– JPEG: /usr/lib/aarch64-linux-gnu/libjpeg.so (ver )
– WEBP: build (ver encoder: 0x020e)
– PNG: /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)
– TIFF: /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
– JPEG 2000: build (ver 1.900.1)
– OpenEXR: build (ver 1.7.1)

– Video I/O:
– DC1394: NO
– FFMPEG: YES
– avcodec: YES (ver 57.107.100)
– avformat: YES (ver 57.83.100)
– avutil: YES (ver 55.78.100)
– swscale: YES (ver 4.8.100)
– avresample: NO
– GStreamer:
– base: YES (ver 1.14.4)
– video: YES (ver 1.14.4)
– app: YES (ver 1.14.4)
– riff: YES (ver 1.14.4)
– pbutils: YES (ver 1.14.4)
– libv4l/libv4l2: 1.14.2 / 1.14.2
– v4l/v4l2: linux/videodev2.h
– gPhoto2: NO

– Parallel framework: pthreads

– Trace: YES (built-in)

– Other third-party libraries:
– Lapack: NO
– Eigen: YES (ver 3.3.4)
– Custom HAL: YES (carotene (ver 0.0.1))

– NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS)
– NVIDIA GPU arch: 72
– NVIDIA PTX archs:

– OpenCL: YES (no extra features)
– Include path: /root/tools/opencv-3.4.0/3rdparty/include/opencl/1.2
– Link libraries: Dynamic load

– Python 3:
– Interpreter: /root/archiconda3/bin/python3 (ver 3.7.1)
– Libraries: /root/archiconda3/lib/libpython3.7m.so (ver 3.7.1)
– numpy: /root/archiconda3/lib/python3.7/site-packages/numpy/core/include (ver 1.16.4)
– packages path: /root/archiconda3/lib/python3.7/site-packages

– Python (for build): /usr/bin/python2.7

– Java:
– ant: NO
– JNI: NO
– Java wrappers: NO
– Java tests: NO

– Matlab: NO

– Install to: /root/archiconda3



– Configuring done
– Generating done
– Build files have been written to: /root/tools/opencv-3.4.0/release

if hava people see this problem,help me as soon as possible please

As you can see from the build output, the Python module for CV has some invalid code (it tries to cast a const char * to a char * without using const_cast<> or similar.)
This probably means that the code you’re trying to compile is older than the compiler you’re trying to build it with.
The compiler you’re using may have options to reduce the amount of checking it does, to allow this incorrect code to compile. You might want to add those compile options to the command line when you configure / cmake the project.

This my cmake Additional options

cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN="7.2"-DENABLE_PRECOMPILED_HEADERS=OFF -DENABLE_CXX11=ON -DINSTALL_C_EXAMPLES=OFF  -DCUDA_ARCH_PTX="" -DWITH_GSTREAMER=ON -DWITH_LIBV4L=ON -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python2=OFF -DCMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -DPYTHON3_EXECUTABLE=$(which python3) -DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ..
cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN="7.2"-DENABLE_PRECOMPILED_HEADERS=OFF -DENABLE_CXX11=ON -DINSTALL_C_EXAMPLES=OFF  -DCUDA_ARCH_PTX="" -DWITH_GSTREAMER=ON -DWITH_LIBV4L=ON -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python2=OFF -DCMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -DPYTHON3_EXECUTABLE=$(which python3) -DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ..

Hello!my command On top
What compilation options can I add?

if hava people see this problem,help me as soon as possible please

https://cmake.org/cmake/help/v3.6/manual/cmake.1.html
http://amritamaz.net/blog/opencv-config

it seems that you are trying to install opencv 3.4.0 to Xavier,
and if it is getting screw out during the installation you may like to reflash the device and either use pre-installed opencv, or purge the existing opencv installation, e.g. with

apt --remove purge libopencv*

and then try installing opencv 3.4.0 again.
Moreover I believe there are scripts available somewhere for automated install.
It seems that you are writing files to

root/tools/opencv-3.4.0/release

and the error should be

Scanning dependencies of target opencv_python3
[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp: In function ‘bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]’:
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp:885:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char* str = PyString_AsString(obj);
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o' failed
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
CMakeFiles/Makefile2:5446: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

that you are getting
You may try installing venv and using it for opencv installation, e.g.:

cmake -D WITH_CUDA=ON -D CUDA_ARCH_BIN="7.2" -D CUDA_ARCH_PTX="" -D WITH_GSTREAMER=ON -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/home/nvidia/opencv_contrib/modules  -D PYTHON_EXECUTABLE=/home/nvidia/venv/bin/python ..

I’ll do it your way. This problem will still arise. what should I do?

[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp: In function ‘bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]’:
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp:885:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char* str = PyString_AsString(obj);
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o' failed
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
CMakeFiles/Makefile2:5446: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2

This problem cannot be solved. I think I will go crazy immediately.

If anyone can solve this problem. give me a contact please

does the default sdkmanager opencv installation go through ?

OPENCV can be used initially, but only under Python 2.7. I use the command “apt - get purge libopencv *”. Want to be able to use opencv in Python 3.7

The problem should be here, but I can’t find the reason for the mistake.

Scanning dependencies of target opencv_python3
[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp: In function ‘bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]’:
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp:885:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char* str = PyString_AsString(obj);

you may use for reference my steps [ with little customization and adjustment theyy will install opencv considering python3 and within virtualenvironment

sudo apt-get install -y python3-venv
python3 -m venv ~/venv
wget https://github.com/opencv/opencv_contrib/archive/3.4.5.tar.gz
mv 3.4.5.tar.gz opencv_contrib_3.4.5.tar.gz
wget https://github.com/opencv/opencv/archive/3.4.5.tar.gz
tar -xvf 3.4.5.tar.gz 
tar -xvf opencv_contrib_3.4.5.tar.gz
mv opencv_contrib-3.4.5 opencv_contrib
cd opencv-3.4.5/
mkdir build
cd build
sudo apt install cmake -y
#cmake -D CMAKE_BUILD_TYPE=RELEASE     -D CMAKE_INSTALL_PREFIX=/usr/local     -D INSTALL_PYTHON_EXAMPLES=ON     -D INSTALL_C_EXAMPLES=OFF     -D OPENCV_EXTRA_MODULES_PATH=/home/nvidia/OpenCV/opencv_contrib-3.4.0/modules  -D PYTHON_EXECUTABLE=/home/nvidia/test-env/bin/python -D BUILD_EXAMPLES=ON     -D WITH_CUDA=ON \-D CUDA_ARCH_BIN="7.2"  -D CUDA_ARCH_PTX="" -D WITH_GSTREAMER=ON -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF ..
cmake -D WITH_CUDA=ON -D CUDA_ARCH_BIN="7.2" -D CUDA_ARCH_PTX="" -D WITH_GSTREAMER=ON -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/home/nvidia/opencv_contrib/modules  -D PYTHON_EXECUTABLE=/home/nvidia/venv/bin/python ..
make -j8
sudo make install