facebookresearch / DetectAndTrack

The implementation of an algorithm presented in the CVPR18 paper: "Detect-and-Track: Efficient Pose Estimation in Videos"
Apache License 2.0
1k stars 186 forks source link

[Solved] Environment conflict: Caffe2 Compilation VS Conda Packages #31

Closed yanxiangyi closed 6 years ago

yanxiangyi commented 6 years ago

Caffe2 compilation requires system protobuf, 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:

  1. Add -DCMAKE_CXX_FLAGS=-D__GLIBCXX_USE_CXX11_ABI=0 to the cmake command.

  2. Use system versions of gflags, protobuf, opencv, or leveldb (try installing with apt-get). Uninstall these libraries from Anaconda and try to build again.

Finally successfully build on:

  1. Ubuntu 16.04
  2. Anaconda (python 2.7)
  3. OpenCV 3.4.1
  4. GCC 5.4
  5. CUDA 9.0
  6. cuDNN 7.1.2
  7. numpy 1.14.3
rohitgirdhar commented 6 years ago

Great, thanks for sharing!