Ask Your Question
0

open_cv core build fails

asked 2018-04-11 05:56:42 -0600

Hi,

I am trying to build open cv with the following:

  1. Visual Studio 2017 15.4.1
  2. OS: Windows 8.1 64 bit
  3. OpenCV 3.3.1
  4. CMake 3.9.4 win64 x64
  5. CUDA 9.0.176 Compute Capability 2.1

I generate the visual studio solution using CMake.

When it comes to building openCV, all the projects in the build order are built successfully. When open_cv core is built, the compiler emits the following:

Build started: Project: opencv_core, Configuration: Debug x64 ------ 1>Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj 1>CMake Error at cuda_compile_generated_gpu_mat.cu.obj.cmake:206 (message): 1> Error generating 1> E:/Angel/ThirdPartyLibs/opencv/builds/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj 1> 1> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. 1>Done building project "opencv_core.vcxproj" -- FAILED.

Is there a step I am missing or is the CUDA toolkit version incompatible with the openCV version?

Tried googling and stack overflow cant find someone with the exact same problem.

thanks

edit retag flag offensive close merge delete

Comments

Maybe related:

If so, retry with latest master or update your OpenCV with the fixes.

Eduardo gravatar imageEduardo ( 2018-04-11 08:56:14 -0600 )edit

Hi,

Above advice regarding changing the CUDA_HOST_COMPILER to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\cl.exe worked.

Just wondering.. shoudn't the above path be the same as $(VCInstallDir)/bin? Anyway, thanks

blork98 gravatar imageblork98 ( 2018-04-12 02:47:14 -0600 )edit

You should upgrade your OpenCV version to 3.4.1 as this issue has been fixed.

Eduardo gravatar imageEduardo ( 2018-04-12 04:12:45 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-04-11 07:28:11 -0600

CUDA 9.0 does not support compute capability 2.1, its supports compute 3.0-7.0 according to Wikipedia.

.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-04-11 05:56:42 -0600

Seen: 675 times

Last updated: Apr 11 '18