[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#822783: eztrace-contrib: FTBFS with libc 2.23: 'memcpy' was not declared in this scope



On 31 May 2016 at 11:35, Samuel Thibault <sthibault@debian.org> wrote:
> So reassigning to cuda, perhaps a proper fix can be done in the .h files
> there without having to ask upstream :)

I'll have to check if Nvidia's license allows us to fix bugs in their
headers. ;)

Here we have a minimal reproducer from the Ubuntu bug [1]:

$ echo '#include <stdio.h>' > dummy.cpp
$ g++ -c -O2 dummy.cpp
$ cp dummy.cpp dummy.cu
$ nvcc -c -O2 dummy.cu
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*,
const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;

Again, defining _FORCE_INLINES works around the problem:
$ nvcc -c -O2 -D_FORCE_INLINES dummy.cu


[1] https://bugs.launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/+bug/1589751


Reply to: