MantisBT - CMake
View Issue Details
0014122CMakeModulespublic2013-05-01 11:062014-02-10 10:44
Marcel Loose 
Robert Maynard 
normalminoralways
closedfixed 
LinuxUbuntu12.10
CMake 2.8.9 
 
0014122: FindCUDA fails to find libcuda.so
FindCUDA fails to find libcuda.so on a vanilla Ubuntu 12.10 system. The library is located in the directory /usr/lib/nvidia-current, which is not searched by default.
See the discussion on the mailing list: http://www.cmake.org/pipermail/cmake/2013-April/054601.html [^]
No tags attached.
Issue History
2013-05-01 11:06Marcel LooseNew Issue
2013-05-01 11:16Robert MaynardAssigned To => Robert Maynard
2013-05-01 11:16Robert MaynardStatusnew => assigned
2013-05-24 10:53Robert MaynardNote Added: 0033129
2013-05-24 10:53Robert MaynardStatusassigned => acknowledged
2013-05-24 11:57Marcel LooseNote Added: 0033130
2013-08-08 13:10Robert MaynardNote Added: 0033686
2013-08-08 13:10Robert MaynardStatusacknowledged => resolved
2013-08-08 13:10Robert MaynardResolutionopen => fixed
2014-02-10 10:44Robert MaynardNote Added: 0035070
2014-02-10 10:44Robert MaynardStatusresolved => closed

Notes
(0033129)
Robert Maynard   
2013-05-24 10:53   
I have merged a fix for this into CMake next. Are you able to verify for me that it fixes your problem on ubuntu machines.
(0033130)
Marcel Loose   
2013-05-24 11:57   
I checked out 'next' branch and build new cmake. Problem is still there; it got even worse, because cmake 'next' doesn't add libcuda.so to CUDA_LIBRARIES even it was found by setting the environment variable CUDA_LIB_PATH=/usr/lib/nvidia-current

Here's the difference in output for cmake 2.8.9 without and with setting CUDA_LIB_PATH=/usr/lib/nvidia-current

19c19
< -- CUDA_CUDA_LIBRARY = CUDA_CUDA_LIBRARY-NOTFOUND
---
> -- CUDA_CUDA_LIBRARY = /usr/lib/nvidia-current/libcuda.so
25c25
< -- CUDA_LIBRARIES = /usr/lib/x86_64-linux-gnu/libcudart.so
---
> -- CUDA_LIBRARIES = /usr/lib/x86_64-linux-gnu/libcudart.so;/usr/lib/nvidia-current/libcuda.so

And here's the difference between these two runs with cmake 'next':

19c19
< -- CUDA_CUDA_LIBRARY = CUDA_CUDA_LIBRARY-NOTFOUND
---
> -- CUDA_CUDA_LIBRARY = /usr/lib/nvidia-current/libcuda.so

As you can see, in both cases it will still only find libcuda.so when setting an environment variable. However, cmake 'next' doesn't even add libcuda.so to CUDA_LIBRARIES!
(0033686)
Robert Maynard   
2013-08-08 13:10   
merged the fix into master and slated for 2.8.12
(0035070)
Robert Maynard   
2014-02-10 10:44   
Closing resolved issues that have not been updated in more than 4 months.