caffe 包是从
caffe的github官网上下载的
https://github.com/BVLC/caffe我是准备安装openpose的,之后按照网上的流程来,可是不管怎么安装依赖项以及修改make.config都卡在最后了
[ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/util/blocking_queue.cpp.o [ 5%] Linking CXX shared library ../../lib/libcaffe.so [ 87%] Built target caffe [ 87%] Linking CXX executable caffe /home/xiaofeng/anaconda3/lib/libtbb.so.2:对‘__cxa_init_primary_exception@CXXABI_1.3.11’未定义的引用 /home/xiaofeng/anaconda3/lib/libtbb.so.2:对‘std::__exception_ptr::exception_ptr::exception_ptr(void*)@CXXABI_1.3.11’未定义的引用 collect2: error: ld returned 1 exit status tools/CMakeFiles/caffe.bin.dir/build.make:135: recipe for target 'tools/caffe' failed make[2]: *** [tools/caffe] Error 1 CMakeFiles/Makefile2:457: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2主要卡在了libtbb.so.2,然后我搜索了csdn以及stackoverflow都没有结果,后来这篇文章启发了我
https://blog.csdn.net/lucas1997/article/details/104558183
于是我把从github上下载的TBB包里面的libtbb.so.2和我电脑上的对比了一下,发现大小不同,一个是2.4MB,一个是2.8MB,于是直接把TBB包里面的libtbb.so.2 拷贝到 /home/xiaofeng/anaconda3中,就好了。。。
[ 2%] Built target caffeproto [ 87%] Built target caffe [ 87%] Linking CXX executable caffe [ 87%] Built target caffe.bin [ 87%] Linking CXX executable compute_image_mean [ 89%] Built target compute_image_mean [ 90%] Linking CXX executable upgrade_net_proto_text [ 90%] Built target upgrade_net_proto_text [ 90%] Linking CXX executable extract_features [ 91%] Built target extract_features [ 91%] Linking CXX executable upgrade_net_proto_binary [ 93%] Built target upgrade_net_proto_binary [ 94%] Linking CXX executable convert_imageset [ 94%] Built target convert_imageset [ 95%] Linking CXX executable upgrade_solver_proto_text [ 95%] Built target upgrade_solver_proto_text [ 97%] Linking CXX executable cifar10/convert_cifar_data [ 97%] Built target convert_cifar_data [ 97%] Linking CXX executable mnist/convert_mnist_data [ 97%] Built target convert_mnist_data [ 97%] Linking CXX executable cpp_classification/classification [ 97%] Built target classification [ 97%] Linking CXX executable siamese/convert_mnist_siamese_data [ 98%] Built target convert_mnist_siamese_data [ 98%] Linking CXX shared library ../lib/_caffe.so Creating symlink /home/xiaofeng/Downloads/caffe/python/caffe/_caffe.so -> /home/xiaofeng/Downloads/caffe/lib/_caffe.so [100%] Built target pycaffe原来网上的包也不可全信啊,以后出现undefined reference 最简单的方法不是修改代码,而是替换文件
