[CUDA] cmake error when when running WITH_CUDA on linux

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[CUDA] cmake error when when running WITH_CUDA on linux

ireneo_funes_1884
Hi,

I am trying to install OpenCV on a PC with linux (Ubuntu 12.04) and cuda
on it. I would like to compile opencv with CUDA support, but cmake exist
with the following error (thus not generating the Makefile):

CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the
CMake files:
CUDA_nvcuvid_LIBRARY (ADVANCED)
     linked by target "opencv_gpu" in directory
xxxxx/OpenCV-2.4.3/modules/gpu

Apparently, CUDA_nvcuvid_LIBRARY refers to a video decoder library
available only on Windows
<http://www.cmake.org/cmake/help/v2.8.8/cmake.html> . I would like to
know if there is a workaround to this problem in linux.

my Linux kernel: 3.2.0-37-generic #58-Ubuntu (x86_64)
GPU card:        GeForce GTX 280
CUDA toolkit:    5.0
nvidia driver:   NVIDIA UNIX x86_64 Kernel Module  304.64

Thanks!
Pablo

Reply | Threaded
Open this post in threaded view
|

Re: [CUDA] cmake error when when running WITH_CUDA on linux

ireneo_funes_1884
Hi,

I was able to solve the problem. CMake was not able to find the library
libnvcuvid.so. The solution was to add a symbolic link in /usr/lib to
the library file.

sudo ln -s [path_to_libnvcuvid.so] /usr/lib/libnvcuvid.so

In my system, the path to libnvcuvid.so is
/usr/lib/nvidia-current/libnvcuvid.so

This is a library for video decoding in the GPU
<https://developer.nvidia.com/nvidia-codec-libraries> , and it is part
of the CUDA driver (or at least it was on the driver's libraries
folder).

Best,
pablo


--- In [hidden email], "ireneo_funes_1884"  wrote:
>
> Hi,
>
> I am trying to install OpenCV on a PC with linux (Ubuntu 12.04) and
cuda
> on it. I would like to compile opencv with CUDA support, but cmake
exist
> with the following error (thus not generating the Makefile):
>
> CMake Error: The following variables are used in this project, but
they

> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
> CMake files:
> CUDA_nvcuvid_LIBRARY (ADVANCED)
>      linked by target "opencv_gpu" in directory
> xxxxx/OpenCV-2.4.3/modules/gpu
>
> Apparently, CUDA_nvcuvid_LIBRARY refers to a video decoder library
> available only on Windows
>  . I would like to
> know if there is a workaround to this problem in linux.
>
> my Linux kernel: 3.2.0-37-generic #58-Ubuntu (x86_64)
> GPU card:        GeForce GTX 280
> CUDA toolkit:    5.0
> nvidia driver:   NVIDIA UNIX x86_64 Kernel Module  304.64
>
> Thanks!
> Pablo
>