Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcpy error when compiling cuda=1 #36

Closed
Psy-Fer opened this issue Jan 9, 2019 · 1 comment
Closed

memcpy error when compiling cuda=1 #36

Psy-Fer opened this issue Jan 9, 2019 · 1 comment

Comments

@Psy-Fer
Copy link

Psy-Fer commented Jan 9, 2019

When I compiled on my dev machine, I got the following error:

make cuda=1
nvcc -x cu -g -O2 -std=c++11 -lineinfo -Xcompiler -Wall -I./htslib -DHAVE_CUDA=1 -rdc=true -c src/f5c.cu -o build/f5c_cuda.o
/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;
^
Makefile:76: recipe for target 'build/f5c_cuda.o' failed
make: *** [build/f5c_cuda.o] Error 1

To fix it, set the following line:

CUDA_CFLAGS+="-D_FORCE_INLINES" make cuda=1

I don't really understand how or why this works, but it does.

:)

@lamcw lamcw closed this as completed Jan 25, 2019
@hasindu2008
Copy link
Owner

Thanks @Psy-Fer. We added the problem and the reported solution to the troubleshooting page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants