open_cv core build fails
Hi,
I am trying to build open cv with the following:
- Visual Studio 2017 15.4.1
- OS: Windows 8.1 64 bit
- OpenCV 3.3.1
- CMake 3.9.4 win64 x64
- 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
Maybe related:
Build issue with VS2017 and Cuda 9.0
Build error: "cmd.exe" exited with code 1.
If so, retry with latest master or update your OpenCV with the fixes.
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
You should upgrade your OpenCV version to 3.4.1 as this issue has been fixed.