Ask Your Question
0

Problems with 2.4.9 and OS X 10.8.5

asked 2014-05-23 13:09:28 -0600

thistle gravatar image

updated 2014-06-04 06:23:42 -0600

berak gravatar image

I am still using OpenCV 2.4.4 because I have never been able to compile the subsequent releases on my OS X machines.

Since I am sick at home, today I decided to try again and upgrade OpenCV to the latest 2.4.9 version. As with previous versions, the compilation failed.

The problem is related to the CUDA compilation. During the CMake processing, I get this (for me) obscure error message.

- 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
  CMake Warning (dev) at cmake/OpenCVDetectCUDA.cmake:245 (link_directories):
  This command specifies the relative path

     -Wl,/usr/local/cuda

  as a link directory.

 Policy CMP0015 is not set: link_directories() treats paths relative to the
 source dir.  Run "cmake --help-policy CMP0015" for policy details.  Use the
 cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
cmake/OpenCVFindLibsPerf.cmake:24 (include)
CMakeLists.txt:468 (include)

This warning is for project developers.  Use -Wno-dev to suppress it.

May be that's why the compilation fails? Indeed, it fails exactly when linking GPU-related object files.

Cheers

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-04 05:15:03 -0600

mbertini gravatar image

updated 2014-06-04 05:15:45 -0600

The solution has been reported in StackOverflow: just comment with a # the line

list(APPEND CUDA_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_cudart}"

in opencv/cmake/FindCUDA.cmake

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-05-23 13:09:28 -0600

Seen: 414 times

Last updated: Jun 04 '14