[英]error /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope while building caffe
I'm trying to compile caffe following this guide: https://gist.github.com/wangruohui/679b05fcd1466bb0937f 我正在尝试按照本指南编译caffe: https : //gist.github.com/wangruohui/679b05fcd1466bb0937f
However when I get too make all
I get the error 然而,当我得到
make all
我得到的错误
NVCC src/caffe/layers/hdf5_data_layer.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;
^
Makefile:585: recipe for target '.build_release/cuda/src/caffe/layers/hdf5_data_layer.o' failed
But /usr/include/string.h isn't even in the caffe code so what gives? 但是/usr/include/string.h甚至不在caffe代码中,那么是什么给出了? This is in an ubuntu variant that closely follows 16.04
这是一个密切关注16.04的ubuntu变体
Seeing as the source of the code is a well known repo I think the problem is probably in the Makefile or the Makefile.config 看作代码的来源是一个众所周知的回购,我认为问题可能在Makefile或Makefile.config中
After a long time looking through various internet sources I solved this problem by going to the Makefile and changing the line 经过很长一段时间浏览各种互联网资源后,我通过转到Makefile并更改了这一行解决了这个问题
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
into 成
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
For me this was on line 406
对我来说,这是在
406
线上
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.