Ask Your Question

Cthulhu's profile - activity

2015-07-06 18:28:47 -0600 received badge  Notable Question (source)
2014-11-15 10:53:38 -0600 received badge  Popular Question (source)
2013-08-25 02:45:12 -0600 received badge  Scholar (source)
2013-08-25 02:44:57 -0600 commented answer Build problem (latest opencv, cuda-5.5)

Thanks, that got me past this error!

2013-08-25 02:44:44 -0600 received badge  Supporter (source)
2013-08-24 17:27:20 -0600 received badge  Editor (source)
2013-08-24 17:26:06 -0600 asked a question Build problem (latest opencv, cuda-5.5)

I use ubuntu, use following cmake options:

cmake .. -DBUILD_EXAMPLES:BOOL="1" -DBUILD_opencv_world:BOOL="1" -DWITH_TBB:BOOL="1" \ -DENABLE_FAST_MATH:BOOL="1" -DENABLE_AVX:BOOL="1" -DINSTALL_C_EXAMPLES:BOOL="1" \ -DCMAKE_INSTALL_PREFIX:STRING="/opt/opencv-cuda" -DCUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda-5.5/" \ -DCUDA_FAST_MATH:BOOL="1" -DWITH_NVCUVID:BOOL="1" -DWITH_CUBLAS:BOOL="1" -DBUILD_DOCS:BOOL="1"

cuda-related output of cmake:

-- CUDA detected: 5.5
-- CUDA NVCC target flags: -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_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
...
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  YES
--     USE NVCUVID:                 YES
--     NVIDIA GPU arch:             11 12 13 20 21 30 35
--     NVIDIA PTX archs:            30
--     Use fast math:               YES

When I compile, however, I get the following errors:

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(67): error: no instance of overloaded function "atomicAdd" matches the argument list
        argument types are: (float *, float)

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(77): error: identifier "__longlong_as_double" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(77): error: identifier "__double_as_longlong" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(76): error: no instance of overloaded function "atomicCAS" matches the argument list
        argument types are: (unsigned long long *, unsigned long long, <error-type>)

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(79): error: identifier "__longlong_as_double" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(113): error: identifier "__longlong_as_double" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(113): error: identifier "__double_as_longlong" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(112): error: no instance of overloaded function "atomicCAS" matches the argument list
        argument types are: (unsigned long long *, unsigned long long, <error-type>)

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(115): error: identifier "__longlong_as_double" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(149): error: identifier "__longlong_as_double" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(149): error: identifier "__double_as_longlong" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(148): error: no instance of overloaded function "atomicCAS" matches the argument list
        argument types are: (unsigned long long *, unsigned long long, <error-type>)

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/atomic.hpp(151): error: identifier "__longlong_as_double" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp(231): error: identifier "__double2int_rn" is undefined

/home/cthulhu/src/opencv/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp(259): error: identifier "__double2uint_rn" is undefined

15 errors detected in the compilation of "/tmp/tmpxft_000067a1_00000000-22_gpu_mat.compute_11.cpp1.ii".
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:264 (message):
  Error generating file
  /home/cthulhu/src/opencv/build/modules/core/CMakeFiles/cuda_compile.dir ...
(more)