build with CUDA 5.0 (Bug #2843)


Added by Boris Mansencal about 12 years ago. Updated over 11 years ago.


Status:Cancelled Start date:2013-02-28
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:build/install
Target version:-
Affected version:branch 'master' (2.4.9) Operating System:
Difficulty: HW Platform:
Pull request:

Description

I am trying to compile the current github head of OpenCV (02/28/2013) with CUDA enabled.

I am on a Fedora 17 with gcc 4.6.3 & cuda 5.0 (V0.2.1221).
on a system with a Xeon W3565, a Nvidia Quadro 5000 with nvidia driver 310.32.

I know nvcc is working.

With make VERBOSE=1, I get the following error :

-- Generating /home/mansenca/tools/opencv_github/build/modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_global_motion.cu.o
/usr/local/cuda-5.0/bin/nvcc /home/mansenca/tools/opencv_github/modules/gpu/src/cuda/global_motion.cu -c -o /home/mansenca/tools/opencv_github/build/modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_global_motion.cu.o -m64 -DHAVE_CVCONFIG_H -Xcompiler ,\"-W\",\"-Wall\",\"-Werror=return-type\",\"-Werror=non-virtual-dtor\",\"-Werror=address\",\"-Werror=sequence-point\",\"-Wformat\",\"-Werror=format-security\",\"-Winit-self\",\"-Wpointer-arith\",\"-Wshadow\",\"-fdiagnostics-show-option\",\"-Wno-long-long\",\"-pthread\",\"-fomit-frame-pointer\",\"-msse\",\"-msse2\",\"-msse3\",\"-ffunction-sections\",\"-Wno-undef\",\"-Wno-missing-declarations\",\"-Wno-unused-but-set-variable\",\"-O3\",\"-DNDEBUG\",\"-DNDEBUG\" -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=compute_30 -Xcompiler -DCVAPI_EXPORTS -Xcompiler -fPIC -DNVCC -I/usr/local/cuda-5.0/include -I/home/mansenca/tools/opencv_github/modules/gpu/src/nvidia/NPP_staging -I/home/mansenca/tools/opencv_github/modules/gpu/src/nvidia/core -I/home/mansenca/tools/opencv_github/modules/gpu/src/nvidia -I/home/mansenca/tools/opencv_github/modules/gpu/src/cuda -I/home/mansenca/tools/opencv_github/modules/legacy/include -I/home/mansenca/tools/opencv_github/modules/ml/include -I/home/mansenca/tools/opencv_github/modules/photo/include -I/home/mansenca/tools/opencv_github/modules/nonfree/include -I/home/mansenca/tools/opencv_github/modules/video/include -I/home/mansenca/tools/opencv_github/modules/objdetect/include -I/home/mansenca/tools/opencv_github/modules/calib3d/include -I/home/mansenca/tools/opencv_github/modules/features2d/include -I/home/mansenca/tools/opencv_github/modules/highgui/include -I/home/mansenca/tools/opencv_github/modules/flann/include -I/home/mansenca/tools/opencv_github/modules/imgproc/include -I/home/mansenca/tools/opencv_github/modules/core/include -I/home/mansenca/tools/opencv_github/build/modules/gpu -I/home/mansenca/tools/opencv_github/modules/gpu/src -I/home/mansenca/tools/opencv_github/modules/gpu/include -I/home/mansenca/tools/opencv_github/build -I/home/mansenca/tools/tbb41_20130116oss/include -I/home/mansenca/tools/eigen-3.1.1 -I/usr/local/cuda-5.0/include
/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/launch_closure.inl(72): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/launch_closure.inl(101): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/fast_scan.inl(515): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/fast_scan.inl(524): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/fast_scan.inl(533): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/fast_scan.inl(598): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/fast_scan.inl(610): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/fast_scan.inl(619): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/safe_scan.inl(331): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/safe_scan.inl(346): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/safe_scan.inl(360): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/safe_scan.inl(414): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/safe_scan.inl(430): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/safe_scan.inl(448): error: kernel launches from templates are not allowed in system files

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/copy_if.inl(181): error: kernel launches from templates are not allowed in system files

15 errors detected in the compilation of "/tmp/tmpxft_00007502_00000000-16_global_motion.cpp4.ii".
-- Removing /home/mansenca/tools/opencv_github/build/modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_global_motion.cu.o
/usr/bin/cmake -E remove /home/mansenca/tools/opencv_github/build/modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_global_motion.cu.o
CMake Error at cuda_compile_generated_global_motion.cu.o.cmake:256 (message):
Error generating file
/home/mansenca/tools/opencv_github/build/modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_global_motion.cu.o

make2: * [modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_global_motion.cu.o] Error 1
make2: Leaving directory `/home/mansenca/tools/opencv_github/build'
make1:
[modules/gpu/CMakeFiles/opencv_gpu.dir/all] Error 2
make1: Leaving directory `/home/mansenca/tools/opencv_github/build'
make: *
* [all] Error 2


Associated revisions

Revision 75742fcd
Added by Andrey Pavlenko over 10 years ago

Merge pull request #2843 from berak:f_export_bow_24

History

Updated by Marina Kolpakova about 12 years ago

  • Assignee changed from Andrey Kamaev to Marina Kolpakova

Updated by Boris Mansencal about 12 years ago

I have the same error trying to compile the just released 2.4.4 version.

Updated by Marina Kolpakova almost 12 years ago

  • Assignee deleted (Marina Kolpakova)

Updated by Vladislav Vinogradov over 11 years ago

/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/launch_closure.inl(72): error: kernel launches from templates are not allowed in system files
/usr/local/cuda-5.0/include/thrust/detail/backend/cuda/detail/launch_closure.inl(101): error: kernel launches from templates are not allowed in system files

This error is related with Thrust library and CUDA toolkit, not OpenCV. Try to install CUDA toolkit to another location (home directory).

  • Status changed from Open to Cancelled

Updated by Fiarad Mohammed over 11 years ago

There is no need to reinstall CUDA toolkit according to
https://code.google.com/p/thrust/issues/detail?id=359#c5
Try removing the variable CPLUS_INCLUDE_PATH from your environment. This may be why nvcc is confusing the contents of /usr/local/cuda/include for system files. A quick check would be to do

$ export CPLUS_INCLUDE_PATH=

and then try the build as you normally would.

Also available in: Atom PDF