Ask Your Question
0

build master branch on debian9 with cuda9

asked 2017-12-11 08:59:03 -0500

kris gravatar image

updated 2017-12-11 14:29:36 -0500

Hello I've tried to build opencv3 master with gcc6 cuda9 but i always get an error regarding with cuda, compilation without cuda works fine,. I as well get the warnings
cc1plus: warning: home/opencv/build/modules/cudaarithm/test_precomp.hpp.gch/opencv_test_cudaarithm_Release.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch] Has anyone experienced this problem before? Is it possible to build opencv3 with cuda-9 and gcc-6? cheers kris

edit retag flag offensive close merge delete

Comments

can you try without precompiled headers ?

 cmake -DENABLE_PRECOMPILED_HEADERS=OFF

(also clean build dir)

berak gravatar imageberak ( 2017-12-11 09:06:15 -0500 )edit

I tried, but no success. I get several warnings like

/home/christoph/software/opencv/modules/cudaarithm/src/cuda/sub_mat.cu(78): warning: function "<unnamed>::SubOp2::operator()" was declared but never referenced and /home/christoph/software/opencv/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

20 errors detected in the compilation of "/tmp/tmpxft_000013bc_00000000-13_warp.compute_70.cpp1.ii". CMake Error at cuda_compile_generated_warp.cu.o.cmake:264 (message): Error generating file /home/christoph/software/opencv/build/modules/cudawarping/CMakeFiles/cuda_compile.dir/src/cud

kris gravatar imagekris ( 2017-12-11 14:44:35 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-12-16 04:34:58 -0500

kris gravatar image

okay I tried a lot myself the last day, and I found out that there is somthing wrong with the combination of cuda-9 and gcc6 in debain stretch i purged my installed cuda from the runfile and installed the cuda-toolkit package in debian stretch which was version 8 unfortunately cuda 8 nvcc is incomatible with debian 9 hostcompiler gcc6 , so I installed gcc4.9 and built opencv against gcc4.9 which seems to work. But I see the troubles ahead as a lot of linked libraries are compiled against gcc6. But we will see. So solution was downgrading to cuda-8 and gcc-4.9. debian 9 +gcc6 +cuda 9 still seems to make a lot of trouble for a variaty of applications. cheers kris

edit flag offensive delete link more

Comments

I have the same problem....

waschbaer gravatar imagewaschbaer ( 2018-03-07 17:23:30 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-12-11 08:59:03 -0500

Seen: 2,595 times

Last updated: Dec 16 '17