Darknet: Compile error: ‘memcpy’ was not declared in this scope

Created on 4 Apr 2018  Â·  3Comments  Â·  Source: pjreddie/darknet

I get this error message while compiling:

nvcc -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/convolutional_kernels.cu -o obj/convolutional_kernels.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;
^
compilation terminated due to -Wfatal-errors.
Makefile:88: recipe for target 'obj/convolutional_kernels.o' failed
make: *
* [obj/convolutional_kernels.o] Error 1

Most helpful comment

Hi, I already solved it.
I edit the Makefile to

ifeq ($(GPU), 1)
COMMON+= -DGPU -I/usr/local/cuda/include/
CFLAGS+= -DGPU -D_FORCE_INLINES
LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand
endif

It's base on some workaround solution....
like https://github.com/BVLC/caffe/issues/4046

2018-04-13 14:25 GMT+08:00 Amerry-c notifications@github.com:

hi,I also met this problem, did you solve it?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pjreddie/darknet/issues/638#issuecomment-381036517,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI6be3djCuDAzPu9YnIWioqcJj2ggHCDks5toETfgaJpZM4TGQxk
.

All 3 comments

I get this issue, too.

i sloved it reference to https://github.com/pjreddie/darknet/issues/200 @Kenhouse @kthordarson

Hi, I already solved it.
I edit the Makefile to

ifeq ($(GPU), 1)
COMMON+= -DGPU -I/usr/local/cuda/include/
CFLAGS+= -DGPU -D_FORCE_INLINES
LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand
endif

It's base on some workaround solution....
like https://github.com/BVLC/caffe/issues/4046

2018-04-13 14:25 GMT+08:00 Amerry-c notifications@github.com:

hi,I also met this problem, did you solve it?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pjreddie/darknet/issues/638#issuecomment-381036517,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI6be3djCuDAzPu9YnIWioqcJj2ggHCDks5toETfgaJpZM4TGQxk
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cadip92 picture cadip92  Â·  3Comments

ryuzakinho picture ryuzakinho  Â·  4Comments

job2003 picture job2003  Â·  3Comments

arianaa30 picture arianaa30  Â·  3Comments

AndyZX picture AndyZX  Â·  3Comments