clang linker error in new version of caffe

227 views
Skip to first unread message

Dmitry Yutkin

unread,
Mar 6, 2016, 3:36:36 AM3/6/16
to Caffe Users
When I do 
make all

I get this errors:
...
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
make: *** Waiting for unfinished jobs....
CXX/LD -o .build_release/tools/extract_features.bin
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "caffe::Net<float>::Forward(float*)", referenced from:
      int feature_extraction_pipeline<float>(int, char**) in extract_features.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/extract_features.bin] Error 1 

 

Bo Moon

unread,
Mar 6, 2016, 7:52:40 AM3/6/16
to Caffe Users
I have this error as well. If it's relevant, I'm building on OSX El Capitan, with CPU_ONLY option and using OpenBLAS. For the time being I've been using an earlier build from January, but I'm running into some Python issues that have since been fixed, so it'd be nice to be on the latest version.
Message has been deleted

Dmitry Yutkin

unread,
Mar 6, 2016, 9:29:37 AM3/6/16
to Caffe Users
I also tried to compile previous versions but they have issues with python wrapper (fixed in PL). If I use the newer versions, I face with compile issue from my top msg.

Makefile.config
CPU_ONLY := 1
BLAS
:= open
BLAS_INCLUDE
:= /usr/local/opt/openblas/include
BLAS_LIB
:= /usr/local/opt/openblas/lib
PYTHON_INCLUDE
:= /usr/include/python2.7 \
       
/usr/local/lib/python2.7/site-packages/numpy/core/include
PYTHON_LIB
:= /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/ /usr/lib
PYTHON_INCLUDE
+= $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include


PYTHON_LIB
+= $(shell brew --prefix numpy)/lib
WITH_PYTHON_LAYER
:= 1
INCLUDE_DIRS
:= $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS
:= $(PYTHON_LIB) /usr/local/lib /usr/lib
INCLUDE_DIRS
+= $(shell brew --prefix)/include
LIBRARY_DIRS
+= $(shell brew --prefix)/lib


BUILD_DIR
:= build
DISTRIBUTE_DIR
:= distribute
TEST_GPUID
:= 0
Q
?= @

Reply all
Reply to author
Forward
Message has been deleted
0 new messages