ubuntu opencv compilation error/bug with cuda 8.0 RC
2016-09-20 15:11
411 查看
使用源码编译opencv master分支(3.1.0)时,出现如下错误:
这是一个cuda8.0 rc版本bug, 使用github上的thrust 1.8.3tag替换cuda8.0rc安装时的thrust即可.
实际测试通过,配置如下:
opencv:3.1.0(master)
cuda:8.0.26
/usr/local/cuda/include/thrust/detail/reference.inl(127): error: no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>" detected during: instantiation of "void thrust::reference<Element, Pointer, Derived>::assign_from(OtherPointer) [with Element=float2, Pointer=thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>, Derived=thrust::use_default, OtherPointer=const float2 *]" (65): here ...... 4 errors detected in the compilation of "/tmp/tmpxft_00003fb9_00000000-17_gftt.compute_60.cpp1.ii". CMake Error at cuda_compile_generated_gftt.cu.o.cmake:264 (message): Error generating file /home/chengxiang/workspace/opencv/build/modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gftt.cu.o modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/build.make:3603: recipe for target 'modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gftt.cu.o' failed make[2]: *** [modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gftt.cu.o] Error 1 CMakeFiles/Makefile2:4419: recipe for target 'modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all' failed make[1]: *** [modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all] Error 2 Makefile:160: recipe for target 'all' failed
这是一个cuda8.0 rc版本bug, 使用github上的thrust 1.8.3tag替换cuda8.0rc安装时的thrust即可.
# find the thrust directory find /usr/local/cuda -type d -name "thrust" # clone the 1.8.3 thrust from github git clone https://github.com/thrust/thrust.git -b 1.8.3 # diff them diff -u thrust /usr/local/cuda/include/thrust # backup the cuda/thrust sudo mv /usr/local/cuda/include/thrust /usr/local/cuda/include/thrust_old # move the thrust to cuda dir sudo mv ./thrust /usr/local/cuda/include/thrust
实际测试通过,配置如下:
opencv:3.1.0(master)
cuda:8.0.26
相关文章推荐
- ubuntu16.04安装N卡驱动,cuda toolkit7.5,opencv 2.4.13 with module gpu
- Caffe+Ubuntu 14.04 LTS + CUDA 7.5 + CUDNN 5.1.3 + Intel MKL + OpenCV 3.1 RC安装教程
- Ubuntu14.04 + NVIDIA8.0 + cuda + cudnn + opencv 3 + matlab
- Ubuntu16.04下Caffe环境搭建:cuda8.0 + opencv3.2.0
- [置顶] caffe: Ubuntu16.04 + cuda8.0 + cudnn8.0 + opencv3.1.0 + python2.7 + matlab2014b + blas(mkl)
- ubuntu14.04 cuda8.0 cudnn caffe tensorflow opencv
- 超详细 Ubuntu / Ubuntu Kylin 16.04 + OpenCV 2.4 + CUDA 8.0 + cuDNN 5.0 + Caffe_SSD 安装教程
- Ubuntu14.04 64位机上安装OpenCV2.4.13(CUDA8.0)版操作步骤
- Ubuntu16.04 CUDA 8.0 OpenCV 3.2.0 Darknet
- ubuntu16.04+Cuda8.0+CuDnn v5+OpenCV3.1.0+Matlab2014+Python+Caffe安装
- Ubuntu16.04+CUDA8.0+Theano0.8.2+OpenCV3.1
- ubuntu14.04+nvidia1070+CUDA8.0+CUDNN5.0+opencv2.4.9安装配置
- Ubuntu16.04+cuda8.0+opencv3.0.0 caffe编译的那些坑
- Ubuntu 16.04 + CUDA 8.0 + Matlab 2016a + OpenCV 3.1 + Caffe
- 基于Ubuntu16.04和Cuda8.0上安装OpenCV3.1.0
- Ubuntu16.04 +cuda8.0+cudnn+opencv+caffe+theano+tensorflow配置明细
- 配有Tesla K40c的服务器新装Ubuntu16.04并安装CUDA8.0、Anaconda3、Matlab2016a、OPENCV3.1、CuDNN5.1、MXNet
- Ubuntu16.04+Cuda8.0(gtx1060)+OpenCV2.4.13+anaconda2+caffe详细配置
- Ubuntu16.04下Caffe环境搭建:cuda8.0 + opencv2.4.13