Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I am fairly sure the problem the problem has nothing to do with Mavericks or the CUDA 5.5 Toolkit directly, although the switch to libc++ on Mavericks does mean you have to install the CUDA toolkit specific for 10.9 (just released a short while ago). It was only from CUDA 5.5 onwards that the clang compiler was even supported on OS X.

The problem is most likely an incorrect setting of CUDA_HOST_COMPILER in the CMake settings. By default OpenCV chooses /usr/bin/cc (an alias for /usr/bin/clang), but this is unrecognized by the NVidia host compiler driver and hence the inappropriate compiler flags that are being passed to clang. The fix is simple: just change CUDA_HOST_COMPILER to /usr/bin/clang and everything should work just fine.

I am fairly sure the problem the problem has nothing to do with Mavericks or the CUDA 5.5 Toolkit directly, although the switch to libc++ on Mavericks does mean you have to install the CUDA toolkit specific for 10.9 (just released a short while ago). It was only from CUDA 5.5 onwards that the clang compiler was even supported on OS X.

The problem is most likely an incorrect setting of CUDA_HOST_COMPILER in the CMake settings. By default OpenCV chooses /usr/bin/cc (an alias for /usr/bin/clang), but this is unrecognized by the NVidia host compiler driver and hence the inappropriate compiler flags that are being passed to clang. The fix is simple: just change CUDA_HOST_COMPILER to /usr/bin/clang and everything should work just fine.

EDIT: This works only for opencv 2.6.4.2 currently. There is currently an issue when compiling OpenCV 2.4.7 with Cuda enabled that causes linker errors.

I am fairly sure the problem the problem has nothing to do with Mavericks or the CUDA 5.5 Toolkit directly, although the switch to libc++ on Mavericks does mean you have to install the CUDA toolkit specific for 10.9 (just released a short while ago). It was only from CUDA 5.5 onwards that the clang compiler was even supported on OS X.

The problem is most likely an incorrect setting of CUDA_HOST_COMPILER in the CMake settings. By default OpenCV chooses /usr/bin/cc (an alias for /usr/bin/clang), but this is unrecognized by the NVidia host compiler driver and hence the inappropriate compiler flags that are being passed to clang. The fix is simple: just change CUDA_HOST_COMPILER to /usr/bin/clang and everything should work just fine.

EDIT: This works only for opencv 2.6.4.2 2.4.6.2 currently. There is currently an issue when compiling OpenCV 2.4.7 with Cuda enabled that causes linker errors.

I am fairly sure the problem the problem has nothing to do with Mavericks or the CUDA 5.5 Toolkit directly, although the switch to libc++ on Mavericks does mean you have to install the CUDA toolkit specific for 10.9 (just released a short while ago). It was only from CUDA 5.5 onwards that the clang compiler was even supported on OS X.

The problem is most likely an incorrect setting of CUDA_HOST_COMPILER in the CMake settings. By default OpenCV chooses /usr/bin/cc (an alias for /usr/bin/clang), but this is unrecognized by the NVidia host compiler driver and hence the inappropriate compiler flags that are being passed to clang. The fix is simple: just change CUDA_HOST_COMPILER to /usr/bin/clang and everything should work just fine.

EDIT: This works only for opencv 2.4.6.2 currently. There is currently an issue when compiling I stand corrected, I am also unable to get OpenCV 2.4.7 to build with Cuda enabled that causes linker errors.on Mavericks. While setting CUDA_HOST_COMPILER is necessary, this only induces another error at link time.