2

I'm trying to build Caffe 1.0.0-rc3 on CentOS 6.3. I've tried building Caffe w/both Boost 1.61.0 and Boost 1.5.6 using both GCC 5.2.0 and GCC 4.9.3 and get the same, exact fatal error:

CXX/LD -o .build_release/tools/caffe.bin g++ .build_release/tools/caffe.o -o .build_release/tools/caffe.bin -pthread -fPIC -DCAFFE_VERSION=1.0.0-rc3 -DNDEBUG -O2 -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DCPU_ONLY -I/hpc/apps/python27/include/python2.7 -I/hpc/apps/python27/externals/numpy/1.9.2/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I.build_release/src -I./src -I./include -I/hpc/apps/atlas/3.10.2/include -Wall -Wno-sign-compare -lcaffe -L/hpc/apps/python27/lib -L/usr/local/lib -L/usr/lib -L/hpc/apps/atlas/3.10.2/lib -L.build_release/lib -lglog -lgflags -lprotobuf -lboost_system -lboost_filesystem -lm -lhdf5_hl -lhdf5 -lleveldb -lsnappy -llmdb -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lstdc++ -lcblas -latlas \ -Wl,-rpath,\$ORIGIN/../lib

.build_release/tools/caffe.o: In function main': caffe.cpp:(.text.startup+0x40): undefined reference togoogle::SetVersionString(std::string const&)' collect2: error: ld returned 1 exit status make: *** [.build_release/tools/caffe.bin] Error 1

Does the gflags library provide the definition of SetVersionString? All I could find in the include file gflags.h was an extern function prototype but no definition of SetVersionString anywhere.

Could the google namespace could be the issue? I only ask because of the latest github update to gflags:

'This release fixes a few bugs in the configuration of gflags_declare.h and adds a separate GFLAGS_INCLUDE_DIR CMake variable to the build configuration. Setting GFLAGS_NAMESPACE to "google" no longer changes also the include path of the public header files. This allows the use of the library with other Google projects such as glog which still use the deprecated "google" namespace for the gflags library, but include it as "gflags/gflags.h".'

Will
  • 21
  • 2

0 Answers0