Caffe:make:*** [.build_release / src / caffe / util / blocking_queue.o]错误1

时间:2018-04-20 03:20:12

标签: caffe

当我在ubuntu16.04中制作caffe时,我收到此错误:

CXX src/caffe/util/blocking_queue.cpp
In file included from /usr/local/include/boost/bind/bind.hpp:2187:0,
                 from /usr/local/include/boost/bind.hpp:22,
                 from /usr/local/include/boost/thread/detail/thread.hpp:30,
                 from /usr/local/include/boost/thread/thread_only.hpp:22,
                 from /usr/local/include/boost/thread/thread.hpp:12,
                 from /usr/local/include/boost/thread.hpp:13,
                 from src/caffe/util/blocking_queue.cpp:1:
/usr/local/include/boost/bind/bind_mf_cc.hpp:52:6: error: expected unqualified-id before ‘:>’ token
     >:>type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
      ^
Makefile:584: recipe for target '.build_release/src/caffe/util/blocking_queue.o' failed
make: *** [.build_release/src/caffe/util/blocking_queue.o] Error 1

有人知道如何修复它吗?非常感谢你!

1 个答案:

答案 0 :(得分:0)

您使用的是g++的哪个版本?确保它至少为4.8

版本

我建议您安装g++-4.8并在Makefile.config (CUSTOM_CXX :=g++-4.8)中选择它,然后重新编译。

另外,请确保您使用适当版本的boost lib来使用您正在使用的g++的特定版本。