Ask Your Question

Revision history [back]

lastest opencv master build with cuda, compilation error on linux

Hi Guys, I just pulled the latest master 0ecd7913f8a0623a64e84e926d4fc6bcaff80461 and tried to compile it with cuda support (5.0), I ended up with the same error both on linux (ubuntu 12.04) and osx (10.7.4), no problems compiling 2.4.5 though.

Here's the error: Building NVCC (Device) object modules/cudev/test/CMakeFiles/opencv_test_cudev.dir//./opencv_test_cudev_generated_test_arithm_op.cu.o In file included from tmpxft_00005826_00000000-18_test_arithm_op.compute_11.cudafe1.stub.c:1:0: /tmp/tmpxft_00005826_00000000-18_test_arithm_op.compute_11.cudafe1.stub.c:11:40815: error: reference to ‘_GLOBAL__N__61_tmpxft_00005826_00000000_21_test_arithm_op_compute_35_cpp1_ii_71482d89’ is ambiguous git-opencv-master/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp:56:97: error: candidates are: namespace _GLOBAL__N__61_tmpxft_00005826_00000000_21_test_arithm_op_compute_35_cpp1_ii_71482d89 { } git-opencv-master/modules/ts/include/opencv2/ts/gpu_test.hpp:317:97: error: namespace cvtest::_GLOBAL__N__61_tmpxft_00005826_00000000_21_test_arithm_op_compute_35_cpp1_ii_71482d89 { } /tmp/tmpxft_00005826_00000000-18_test_arithm_op.compute_11.cudafe1.stub.c:11:40815: error: reference to ‘_GLOBAL__N__61_tmpxft_00005826_00000000_21_test_arithm_op_compute_35_cpp1_ii_71482d89’ is ambiguous git-opencv-master/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp:56:97: error: candidates are: namespace _GLOBAL__N__61_tmpxft_00005826_00000000_21_test_arithm_op_compute_35_cpp1_ii_71482d89 { } git-opencv-master/modules/ts/include/opencv2/ts/gpu_test.hpp:317:97: error: namespace cvtest::_GLOBAL__N__61_tmpxft_00005826_00000000_21_test_arithm_op_compute_35_cpp1_ii_71482d89 { } /tmp/tmpxft_00005826_00000000-18_test_arithm_op.compute_11.cudafe1.stub.c:11:40920: error: expected primary-expression before ‘short’

...

CMake Error at opencv_test_cudev_generated_test_arithm_op.cu.o.cmake:256 (message): Error generating file git-opencv-master/build_with_cuda/modules/cudev/test/CMakeFiles/opencv_test_cudev.dir//./opencv_test_cudev_generated_test_arithm_op.cu.o

... denotes similar errors with 'int', 'float', 'unsigned int', 'unsigned short' Anyone running into similar problems, any ideas how to solve it? cheers, mle