[Bf-blender-cvs] [be03b73] master: Fix T39757: missing cuda libary on linx, now also try to find libcuda.so.1.

Brecht Van Lommel noreply at git.blender.org
Sat May 17 15:30:53 CEST 2014


Commit: be03b735c53fc96e7d83bff61a00b8bf3c2f91b6
Author: Brecht Van Lommel
Date:   Sat May 17 15:14:20 2014 +0200
https://developer.blender.org/rBbe03b735c53fc96e7d83bff61a00b8bf3c2f91b6

Fix T39757: missing cuda libary on linx, now also try to find libcuda.so.1.

I'm not sure this should be needed, but some particular systems don't have
libcuda.so so we do this now.

===================================================================

M	intern/cycles/util/util_cuda.cpp

===================================================================

diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp
index e914063..e6510bf 100644
--- a/intern/cycles/util/util_cuda.cpp
+++ b/intern/cycles/util/util_cuda.cpp
@@ -180,16 +180,22 @@ bool cuLibraryInit()
 #ifdef _WIN32
 	/* expected in c:/windows/system or similar, no path needed */
 	const char *path = "nvcuda.dll";
+	const char *alternative_path = NULL;
 #elif defined(__APPLE__)
 	/* default installation path */
 	const char *path = "/usr/local/cuda/lib/libcuda.dylib";
+	const char *alternative_path = NULL;
 #else
 	const char *path = "libcuda.so";
+	const char *alternative_path = "libcuda.so.1";
 #endif
 
 	/* load library */
 	DynamicLibrary *lib = dynamic_library_open(path);
 
+	if(lib == NULL && alternative_path)
+		lib = dynamic_library_open(path);
+
 	if(lib == NULL)
 		return false;




More information about the Bf-blender-cvs mailing list