Unable to compile OpenCV with CUDA9 and gcc6
My system:
CUDA 9.0
cudnn 7.1
gcc6/g++6
Encounter the following error: ``` CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:206 (message): Error generating /home/yxchng/git/release/opencv-3.3.1/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
```
Cmake command:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc-6 -DCMAKE_CXX_COMPILER=/usr/bin/g++-6 -DBUILD_opencv_python2=ON -DBUILD_opencv_python3=ON -DWITH_CUDA=YES -DWITH_CUBLAS=YES -DCUDA_GENERATION=Pascal -DWITH_IPP=OFF -DCMAKE_INSTALL_PREFIX=install -DWITH_GSTREAMER=OFF -DCUDA_NVCC_FLAGS="-ccbin /opt/cuda/bin/gcc-6" ..
I have the same problem. I have compiled with gcc-6 because gcc-7 is not supported by CUDA 9.0. My error is: