使用Cmake编译py-fast-rcnn并遇到"链接错误"什么时候"做运行测试"

时间:2017-01-20 16:28:26

标签: gcc cmake caffe

Linking CXX executable ../../../test/test.testbin
CMakeFiles/test.testbin.dir/test_benchmark.cpp.o: In function `void boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000l> >(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000l> const&)':
test_benchmark.cpp:(.text._ZN5boost11this_thread5sleepINS_9date_time18subsecond_durationINS_10posix_time13time_durationELl1000EEEEEvRKT_[_ZN5boost11this_thread5sleepINS_9date_time18subsecond_durationINS_10posix_time13time_durationELl1000EEEEEvRKT_]+0x27d): undefined reference to `boost::this_thread::hidden::sleep_until(timespec const&)'
collect2: error: ld returned 1 exit status
make[3]: *** [test/test.testbin] Error 1
make[2]: *** [src/caffe/test/CMakeFiles/test.testbin.dir/all] Error 2
make[1]: *** [src/caffe/test/CMakeFiles/runtest.dir/rule] Error 2
make: *** [runtest] Error 2
[rbao@ml-01 build]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

当我&#34; make runtest&#34;时,这个错误出现在py-fast-rcnn的Cmake编译的最后几步。它看起来像链接器问题,但我不知道如何解决它。我的猜测是gcc boost的版本可能不兼容。

1 个答案:

答案 0 :(得分:0)

我通过删除Anaconda解决了这个问题,似乎Anaconda对我手动设置的依赖关系有一些中断。