ubuntu opencv compilation error/bug with cuda 8.0 RC
来源:互联网 发布:淘宝办理出版物许可证 编辑:程序博客网 时间:2024/06/06 23:54
使用源码编译opencv master分支(3.1.0)时,出现如下错误:
/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.omodules/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' failedmake[2]: *** [modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gftt.cu.o] Error 1CMakeFiles/Makefile2:4419: recipe for target 'modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all' failedmake[1]: *** [modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all] Error 2Makefile:160: recipe for target 'all' failed
这是一个cuda8.0 rc版本bug, 使用github上的thrust 1.8.3tag替换cuda8.0rc安装时的thrust即可.
# find the thrust directoryfind /usr/local/cuda -type d -name "thrust" # clone the 1.8.3 thrust from githubgit clone https://github.com/thrust/thrust.git -b 1.8.3# diff themdiff -u thrust /usr/local/cuda/include/thrust# backup the cuda/thrustsudo mv /usr/local/cuda/include/thrust /usr/local/cuda/include/thrust_old# move the thrust to cuda dirsudo mv ./thrust /usr/local/cuda/include/thrust
实际测试通过,配置如下:
- opencv:3.1.0(master)
- cuda:8.0.26
1 0
- ubuntu opencv compilation error/bug with cuda 8.0 RC
- Ubuntu安装opencv with cuda
- Ubuntu 14.04: install OpenCV with CUDA
- fix bug: cannot build OpenCV 2.4.11 with CUDA 7.0
- ubuntu 安装 OpenCV-CUDA
- ubuntu+cuda+opencv安装
- Ubuntu+CUDA+OpenCV+Caffee安装
- Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (上)
- Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (下)
- Ubuntu 16.04 + CUDA 8.0 + Matlab 2016a + OpenCV 3.1 + Caffe
- Build OpenCV from source with CUDA support
- ubuntu python with opencv
- Ubuntu 15.04: Compile Caffe with CUDA/cuDNN
- ubuntu下C,C++,opencv cuda编程
- ubuntu下带CUDA的OpenCV安装
- Ubuntu离线安装cuda,cudnn,caffe,opencv
- 超详细 Ubuntu / Ubuntu Kylin 16.04 + OpenCV 2.4 + CUDA 8.0 + cuDNN 5.0 + Caffe_SSD 安装教程
- Compilation error and exception
- Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 44; 值为 "none" 的属性 "parallel"
- listview控件使用实例(二)
- WordPress绑定多个域名和禁止搜索引擎收录非主域名的方法
- 在Qt中利用window下的DirectShow获取摄像头名称示例
- Jersey构建RESTful服务1--HelloWorld
- ubuntu opencv compilation error/bug with cuda 8.0 RC
- Playmaker人物高级控制教程
- .so导入Bug
- JAVA进阶4.12——泛型
- 索引
- 工厂方法模式
- iOS拼接URL,类似安卓body体进行转码(转为gbk)提交。
- 为什么中国的程序员总被称为码农?
- View.MeasureSpec