On 31/05/2016 11:27, Aurelien Jarno wrote:
I am not fully sure the bug is actually in on the libc sid. It looks
like that nvcc redefines part of this header in a way that is not
compatible with the new version of the header.

I think I've found where this is happening.
In file /usr/include/common_functions.h installed by nvidia-cuda-dev, line 73, is the following:

extern __host__ __device__ __device_builtin__ __cudart_builtin__
   void* __cdecl memcpy(void*, const void*, size_t) __THROW;

Removing, or commenting out (as per the attached patch), this line fixes the build of eztrace-contrib and theano.

Does this seem like a sane fix?

--- a/usr/include/common_functions.h
+++ b/usr/include/common_functions.h
@@ -70,7 +70,7 @@
 #endif /* !__CUDACC_RTC__ */
 extern _CRTIMP __host__ __device__ __device_builtin__ __cudart_builtin__ clock_t __cdecl clock(void) __THROW;
 extern         __host__ __device__ __device_builtin__ __cudart_builtin__ void*   __cdecl memset(void*, int, size_t) __THROW;
-extern         __host__ __device__ __device_builtin__ __cudart_builtin__ void*   __cdecl memcpy(void*, const void*, size_t) __THROW;
+//extern         __host__ __device__ __device_builtin__ __cudart_builtin__ void*   __cdecl memcpy(void*, const void*, size_t) __THROW;
 #if !defined(__CUDACC_RTC__)
 }
 #endif /* !__CUDACC_RTC__ */

Reply via email to