构建Caffe时对boost :: thread函数的未定义引用

时间:2017-07-05 14:15:06

标签: python multithreading ubuntu boost caffe

我试图在Ubuntu 14.04上编译Caffe。我一直在链接阶段遇到undefined reference to 'boost::thread::...'错误。

我搜索了网络,发现很多人有类似的问题,并尝试了我发现的所有内容(这里列出的内容太多了)。

我尝试使用apt-get安装boost:

  • sudo apt-get install libboost-python-dev
  • sudo apt-get install libboost-all-dev

还尝试从源代码构建和安装:

  • sudo ./b2 --threading = multi -j4 --with-thread install
  • sudo ./b2 --threading = multi -j4 --with-thread install -a link = static

我一直在犯的错误是:

CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::join()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::~thread()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::start_thread()'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::join()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::~thread()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::start_thread()'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/caffe.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::join()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::~thread()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::start_thread()'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::join()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::~thread()'
.build_release/lib/libcaffe.so: undefined reference to `boost::thread::start_thread()'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/extract_features.bin] Error 1

0 个答案:

没有答案