opencv 3.3.0 on tx1 jetpack 3.3.

Hi Experts

I am trying to install opencv3.3 on jetson tx1 and I am on Jetpack 3.3.

When I do make -j4 I get the following error(below). Any hints?

c/cuda/cuda_compile_generated_gpu_mat.cu.o
/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp(277): error: identifier “__half2float” is undefined

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp(282): error: identifier “__float2half_rn” is undefined

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(63): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(68): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(73): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(78): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(83): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(88): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(93): warning: function “__shfl(float, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(244): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(101): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(102): warning: function “__shfl(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(152): here was declared deprecated ("__shfl() is deprecated in favor of __shfl_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(154): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(159): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(164): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(169): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(174): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(179): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(184): warning: function “__shfl_up(float, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(261): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(192): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(193): warning: function “__shfl_up(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(175): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(245): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(250): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(255): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(260): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(265): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(270): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(275): warning: function “__shfl_down(float, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(278): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(283): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(284): warning: function “__shfl_down(int, unsigned int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(198): here was declared deprecated ("__shfl_down() is deprecated in favor of __shfl_down_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(336): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(341): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(346): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(351): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(356): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(361): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(366): warning: function “__shfl_xor(float, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(295): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(374): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/ubuntu/opencv-3.3.0/modules/cudev/include/opencv2/cudev/warp/detail/…/…/warp/shuffle.hpp(375): warning: function “__shfl_xor(int, int, int)”
/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp(221): here was declared deprecated ("__shfl_xor() is deprecated in favor of __shfl_xor_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

2 errors detected in the compilation of “/tmp/tmpxft_00004e81_00000000-6_gpu_mat.cpp1.ii”.
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:264 (message):
Error generating file
/home/ubuntu/opencv-3.3.0/release/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

modules/core/CMakeFiles/opencv_core.dir/build.make:413: recipe for target ‘modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o’ failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:1419: recipe for target ‘modules/core/CMakeFiles/opencv_core.dir/all’ failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target ‘all’ failed
make: *** [all] Error 2

Maybe CUDA-9.0 has deprecated sm30. Adding #include <cuda_fp16.h> at the top of opencv2/cudev/common.hpp may fix it.
Anyway, if it is only for TX1, you should just try to reconfigure opencv with cmake adding: -D CUDA_ARCH_BIN=“5.3”.

Hi Honey_Patouceul

Yes I did exactly that. I used the following guide:

And finally it worked.

Sojohans