Caffe: undefined reference to `google::base::CheckOpMessageBuilder::NewString

Created on 15 Dec 2015  ·  6Comments  ·  Source: BVLC/caffe

cmake found everything though:

-- The C compiler identification is GNU 5.2.1
-- The CXX compiler identification is GNU 5.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- thread
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found GFlags: /usr/include
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found Glog: /usr/local/include
-- Found glog (include: /usr/local/include, library: /usr/local/lib/libglog.so)
-- Found PROTOBUF: /usr/lib/x86_64-linux-gnu/libprotobuf.so
-- Found PROTOBUF Compiler: /usr/bin/protoc
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5_hl.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
-- Found LMDB: /usr/include
-- Found lmdb (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so)
-- Found LevelDB: /usr/include
-- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so)
-- Found Snappy: /usr/include
-- Found Snappy (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so)
-- CUDA detected: 7.5
-- Automatic GPU detection failed. Building for all known architectures.
-- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50
-- OpenCV found (/usr/share/OpenCV)
-- Found Atlas: /usr/include
-- Found Atlas (include: /usr/include, library: /usr/lib/libatlas.so)
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.10", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.10", minimum required is "2.7")
-- Found NumPy: /usr/lib/python2.7/dist-packages/numpy/core/include (found suitable version "1.8.2", minimum required is "1.7.1")
-- NumPy ver. 1.8.2 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

-- Found Git: /usr/bin/git (found version "2.5.0")

-- ****** Caffe Configuration Summary ******
-- General:
-- Version : (Caffe doesn't declare its version in headers)
-- Git : rc2-322-g9a6fef7
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- Release CXX flags : -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
-- Debug CXX flags : -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized

-- Build type : Release

-- BUILD_SHARED_LIBS : ON
-- BUILD_python : ON
-- BUILD_matlab : OFF
-- BUILD_docs : ON

-- CPU_ONLY : OFF

-- Dependencies:
-- BLAS : Yes (Atlas)
-- Boost : Yes (ver. 1.58)
-- glog : Yes
-- gflags : Yes
-- protobuf : Yes (ver. 2.6.1)
-- lmdb : Yes (ver. 0.9.15)
-- Snappy : Yes (ver. 1.1.3)
-- LevelDB : Yes (ver. 1.18)
-- OpenCV : Yes (ver. 2.4.9)

-- CUDA : Yes (ver. 7.5)

-- NVIDIA CUDA:
-- Target GPU(s) : Auto
-- GPU arch(s) : sm_20 sm_21 sm_30 sm_35 sm_50

-- cuDNN : Not found

-- Python:
-- Interpreter : /usr/bin/python2.7 (ver. 2.7.10)
-- Libraries : /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.10)

-- NumPy : /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)

-- Documentaion:
-- Doxygen : No

-- config_file :

-- Install:

-- Install path : /home/me/caffe/install

-- Configuring done
-- Generating done
-- Build files have been written to: /home/me/caffe

Most helpful comment

@shelhamer not all countries can log on https://groups.google.com/forum/#!forum/caffe-users
because google.com is blocked

All 6 comments

Linking CXX executable train_net
[ 95%] Built target train_net
CMakeFiles/extract_features.dir/extract_features.cpp.o: In function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': extract_features.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewStringabi:cxx11'
CMakeFiles/extract_features.dir/extract_features.cpp.o: In function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)': extract_features.cpp:(.text._ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x51): undefined reference togoogle::base::CheckOpMessageBuilder::NewStringabi:cxx11'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/extract_features.dir/build.make:119: recipe for target 'tools/extract_features' failed
make[2]: ** [tools/extract_features] Error 1
CMakeFiles/Makefile2:550: recipe for target 'tools/CMakeFiles/extract_features.dir/all' failed
make[1]: *
* [tools/CMakeFiles/extract_features.dir/all] Error 2

I have this problem too. I have changed g++ to g++-4.7 and remove default libproto blog, build by myself. But those don't work.

hi I am getting the same problem. how did you resolve it?

Hi,

Is there anyone has a solution for this problem? I got the similar problem.

.build_release/lib/libcaffe.so: undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: ** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
make: *
* Waiting for unfinished jobs....
.build_release/lib/libcaffe.so: undefined reference to google::base::CheckOpMessageBuilder::NewString()' collect2: error: ld returned 1 exit status Makefile:619: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1 .build_release/lib/libcaffe.so: undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_release/tools/upgrade_solver_proto_text.bin' failed
make: ** [.build_release/tools/upgrade_solver_proto_text.bin] Error 1
.build_release/tools/extract_features.o: In function std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': extract_features.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/extract_features.o: In function std::string* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)': extract_features.cpp:(.text._ZN6google17MakeCheckOpStringImmEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImmEEPSsRKT_RKT0_PKc]+0x51): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_release/tools/extract_features.bin' failed
make: *
* [.build_release/tools/extract_features.bin] Error 1
.build_release/tools/caffe.o: In function std::string* google::MakeCheckOpString<cudaError, cudaError>(cudaError const&, cudaError const&, char const*)': caffe.cpp:(.text._ZN6google17MakeCheckOpStringI9cudaErrorS1_EEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringI9cudaErrorS1_EEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/caffe.o: In function std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)': caffe.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_release/tools/caffe.bin' failed
make: *** [.build_release/tools/caffe.bin] Error 1
.build_release/tools/compute_image_mean.o: In function std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/compute_image_mean.o: In function std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/convert_imageset.o: In function std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)': convert_imageset.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to google::base::CheckOpMessageBuilder::NewString()' collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status Makefile:619: recipe for target '.build_release/tools/convert_imageset.bin' failed make: *** [.build_release/tools/convert_imageset.bin] Error 1 Makefile:619: recipe for target '.build_release/tools/compute_image_mean.bin' failed make: *** [.build_release/tools/compute_image_mean.bin] Error 1 Makefile:624: recipe for target '.build_release/examples/cifar10/convert_cifar_data.bin' failed make: *** [.build_release/examples/cifar10/convert_cifar_data.bin] Error 1

From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:

_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.

@shelhamer not all countries can log on https://groups.google.com/forum/#!forum/caffe-users
because google.com is blocked

Was this page helpful?
0 / 5 - 0 ratings