Ask Your Question
0

MSB6006 Error when building OpenCV from source in VS2015

asked 2015-07-28 14:00:39 -0600

morphogencc gravatar image

updated 2015-07-30 10:53:04 -0600

I'm following the instructions here for compiling OpenCV 2.4.11 from source. I'm using Windows 7 and Visual Studio 2015.

I'm rebuilding from source using Visual Studio 2015 because of bizarre problems I'm experiencing with std::vector deallocating improperly on my computer (See here).

The compilation always fails with a series of LNK1104 errors. However, I noticed that a small subset of the modules failed with a MSB6006 cmd.exe exited with code 1 error; when I try to compile these I get:

EDIT: The previous message was from a misconfiguration in which CUDA computing architecture I was using; I resolved the error and I am still getting a MSB6006 error:

------ Rebuild All started: Project: opencv_core, Configuration: Debug x64 ------
  Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj
  nvcc fatal   : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported

  CMake Error at cuda_compile_generated_matrix_operations.cu.obj.cmake:206 (message):
    Error generating
    C:/sdf3/opencv-2.4.11/vs2015-build/modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj


C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.

They seem to crash because Visual Studio 2015 isn't supported. What can I do to make VS2015 supported for building OpenCV?

thanks!

============================================================

UPDATE: I tried this with OpenCV 2.4.8, and I run into the same error.

============================================================

Original error message for future reference:

------ Rebuild All started: Project: opencv_core, Configuration: Debug x64 ------
  Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj
  nvcc fatal   : Unsupported gpu architecture 'compute_11'

  CMake Error at cuda_compile_generated_matrix_operations.cu.obj.cmake:206 (message):
    Error generating
    C:/sdf3/opencv-2.4.11/vs2015-build/modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj


C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.
edit retag flag offensive close merge delete

Comments

Actually what the error says is that you are trying to build OpenCV with CUDA for the 1.1 compute capability, but your system doesn't have a graphics card with the capability and thus it crashes during built. Take your card ID and look up the compute capability at the NVIDIA Compute Capability website. Then set the correct value in CMAKE before running make.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-29 03:04:26 -0600 )edit

I have a Geforce GTX 680, which as compatibility with 3.0. In CMake, CUDA_ARCH_BIN is set to 3.0 3.5 and CUDA_ARCH_PTX is blank. When I do that, it doesn't compile with a new message -- 'nvcc fatal : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported'

morphogencc gravatar imagemorphogencc ( 2015-07-29 10:43:49 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-09-17 00:27:58 -0600

Tetragramm gravatar image

CUDA does not support VS2015 yet. I just downloaded the source and CUDA, and there's a slightly different error message.

Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Release/cuda_compile_generated_gpu_mat.cu.obj nvcc fatal : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported

CMake Error at cuda_compile_generated_gpu_mat.cu.obj.cmake:206 (message): Error generating F:/libraries/OpenCV/AVX2Solution/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Release/cuda_compile_generated_gpu_mat.cu.obj

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1.

I realize you've probably figured this out by now, but hopefully it will help someone else.

edit flag offensive delete link more

Comments

Traceback (most recent call last): File "C:\OPENCV30\opencv_contrib-master\modules\matlab\generator\gen_matlab.py", line 204, in <module> mwg.gen(args.moduleroot, args.modules, args.extra, args.outdir) File "C:\OPENCV30\opencv_contrib-master\modules\matlab\generator\gen_matlab.py", line 32, in gen import rst_parser ImportError: No module named rst_parser CMake does not need to re-run because C:\OPENCV30\cvmatlab1\modules\matlab\CMakeFiles\generate.stamp is up-to-date. Generating Matlab source files C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.

I got this error while try to connect with matlab 2015a

Aj-611 gravatar imageAj-611 ( 2016-04-16 09:30:31 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-28 14:00:39 -0600

Seen: 6,381 times

Last updated: Jul 30 '15