[Bf-cycles] Cycles does not build with CUDA

Robert Feld robertmfeld at googlemail.com
Thu Aug 25 23:46:59 CEST 2011


Hi Dan,

finally I found the problem and worked around it...

> You have /usr/local/cuda/lib in your lib search path?
After putting /usr/local/cuda/lib in my Lib search path (via the 
recommended way of creating a .conf file in /etc/ld.so.conf.d/) I still 
could not compile Cycles with CUDA.

I found that CMake is looking for the libcuda.so which in my Ubuntu 
11.04 (with CUDA Toolkit installed)  is not present in /usr/local/cuda/lib.

I however found it in /usr/lib/nvidia-current (it is part of the 
official NVIDIA driver package for Ubuntu) and added that path to 
intern/cycles/cmake/external_libs.cmake because it does not use standard 
lib paths because of the parameter NO_DEFAULT_PATH in the cmake file.

(svn diff)
--- intern/cycles/cmake/external_libs.cmake    (Revision 39655)
+++ intern/cycles/cmake/external_libs.cmake    (Arbeitskopie)
@@ -94,10 +94,16 @@
      set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE 
STRING "CUDA architectures to build for")
      set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of 
register to use")

-    find_library(CUDA_LIBRARIES NAMES cuda PATHS ${CYCLES_CUDA}/lib 
${CYCLES_CUDA}/lib/Win32 NO_DEFAULT_PATH)
+    find_library(CUDA_LIBRARIES NAMES cuda PATHS 
/usr/lib/nvidia-current ${CYCLES_CUDA}/lib ${CYCLES_CUDA}/lib64 
${CYCLES_CUDA}/lib/Win32 NO_DEFAULT_PATH)

That worked for me. However I am not sure it is the best solution ...

I would consider this to be a bug in the build system. How do I report it?

Kind regards,
Robert


> Dan
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles



More information about the Bf-cycles mailing list