2016-03-06 134 views
0

如果我尝试建立来自Caffe的最新版本,它会导致这个错误:Caffe编译失败:体系结构x86_64的未定义符号?

$ make all 
CXX/LD -o .build_release/tools/caffe.bin 
clang: warning: argument unused during compilation: '-pthread' 
Undefined symbols for architecture x86_64: 
    "caffe::Net<float>::Forward(float*)", referenced from: 
     test() in caffe.o 
     time() in caffe.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make: *** [.build_release/tools/caffe.bin] Error 1 

我建立在OSX,OpenBLAS和CPU_ONLY。我在这里发现了一个kind of similar issue,但它似乎是一个已解决的问题,我没有得到完全相同的错误,但它可能是相关的?我还可以在一个月前建立并运行一个较早版本的Caffe,所以我认为最近有些事情发生了变化。

关于如何克服这个错误的任何想法?

回答

0

这表明当compile.On OSX这个问题会发生usually.I猜测的链接问题Makefile.config发生问题。你可以改变

# To customize your choice of compiler, uncomment and set the following. 
# N.B. the default for Linux is g++ and the default for OSX is clang++ 
CUSTOM_CXX := g++ 

,并确认了一些路径是正确的。

0

我有完全相同的问题。它现在解决了。 检查系统库路径中是否已经有libcaffe.so(可能是/ usr/local/lib)。如果是这样,请删除现有的libcaffe.so并重新构建。

相关问题