Compilation Error When Building OpenCV 3.0-alpha on Linux (Bug #3894)


Added by Ryan Forbes over 10 years ago. Updated over 10 years ago.


Status:Cancelled Start date:2014-09-03
Priority:Normal Due date:
Assignee:Ryan Forbes % Done:

0%

Category:build/install
Target version:3.0-alpha
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

When trying to do "make" on a 64-bit SUSE Linux Enterprise Server 11.1 OS w/, I see the following compilation error.

@@[ 12%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
/recondev/vol3/forbes/opencv-master/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp(187): error: identifier "cudaTextureObject_t" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00000911_00000000-12_gpu_mat.compute_30.cpp1.ii".
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:266 (message):
Error generating file
/recondev/vol3/forbes/opencv-master/release/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

make2: * [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o] Error 1
make1:
[modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *
* [all] Error 2@

It should be noted that this system has 6 nVidia M2075 GPUs. I saw on a post to add the -D CUDA_ARCH_BIN="3.0" to cmake. This is the cmake command being run:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_ARCH_BIN="3.0" ..

However after adding that, the following error now shows up:

[ 12%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
/recondev/vol3/forbes/opencv-master/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp(187): error: identifier "cudaTextureObject_t" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00000911_00000000-12_gpu_mat.compute_30.cpp1.ii".
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:266 (message):
Error generating file
/recondev/vol3/forbes/opencv-master/release/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

make2: * [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o] Error 1
make1:
[modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *
* [all] Error 2@

I was not able to find information on this error anywhwere. I should mention that I am able to build opencv2.4.9 on this same system.


History

Updated by Steven Puttemans over 10 years ago

Hi Ryan, since you are building for that card, the CUDA GPU doc (https://developer.nvidia.com/cuda-gpus) clearly states you have compute capability 2.0. This means you are trying to build advanced cuda kernels for your system. That simply won't work.

Try changing your command to

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_ARCH_BIN="2.0" ..

Also are you aware you are not building the extra modules? This is a big change in openCV 3.0 alpha. I also suggest people to grab the latest 3.0 master branch from github. Me and some others have fixed several problems in the alpha build.

  • Status changed from New to Cancelled

Updated by Steven Puttemans over 10 years ago

  • Assignee changed from Roman Donchenko to Ryan Forbes

Also available in: Atom PDF