Caffe2 compilation requires systemprotobuf, leveldb, gflags, opencv, etc rather than those installed from conda. Please refer to this issue from Caffe2.
According to README.md, we install these packages by conda first, and then compile Caffe2, which will lead to errors like:
undefined reference to google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string
undefined reference to leveldb::Status::ToString[abi:cxx11]()
undefined reference to google::protobuf::internal::empty_string_[abi:cxx11]
I've solved this problem by:
Add -DCMAKE_CXX_FLAGS=-D__GLIBCXX_USE_CXX11_ABI=0 to the cmake command.
Use system versions of gflags, protobuf, opencv, or leveldb (try installing with apt-get). Uninstall these libraries from Anaconda and try to build again.
Caffe2 compilation requires system
protobuf
,leveldb
,gflags
,opencv
, etc rather than those installed from conda. Please refer to this issue fromCaffe2
.According to
README.md
, we install these packages by conda first, and then compileCaffe2
, which will lead to errors like:I've solved this problem by:
Add
-DCMAKE_CXX_FLAGS=-D__GLIBCXX_USE_CXX11_ABI=0
to the cmake command.Use system versions of
gflags
,protobuf
,opencv
, orleveldb
(try installing withapt-get
). Uninstall these libraries from Anaconda and try to build again.Finally successfully build on: