感谢支持
我们一直在努力

Ubuntu 16.10 下安装Caffe遇到: “未定义引用” 问题

Ubuntu 16.10 下安装Caffe遇到: “未定义引用” 问题

解决办法:
Hi all,

Thanks for the thread.  I just install 15.10 and this saved me from a lot of troubles.
With the latest version 15.10.1, only hacking CUDA is not enough. The error is because google-glog got built with -D_GLIBCXX_USE_CXX11_ABI=0 while everything else use the default option!
This is also the cause of the error that Locke Lee haveshown.

I have made a full guide, (feel free to correct my English :D)

///////////////////////////////////////////////////////
1. HACK CUDA
+As all other packages in ubuntu 15.10 is built with GCC 5(.2) but CUDA (7.5) not allow >4.9 gcc version!
+We would like to “hack” CUDA to compile cuda files with gcc-5 as follows:

a) sudo gedit /usr/local/cuda/include/host_config.h

b) change line 113 to #if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 2)

///////////////////////////////////////////////////////
2. FIX google-glog
+Some bad guys build google-glog with wrong gcc abi config! And the wrong build is in
the official repository. Fack!
+i.e when all other package is built with -D_GLIBCXX_USE_CXX11_ABI=1 (default). They built it with
-D_GLIBCXX_USE_CXX11_ABI=0! We need to built it ourself!

a)
sudo apt-get remove libgoogle-glog-dev libgoogle-glog0v5
cd ~ //other folder is ok
apt-get source libgoogle-glog-dev
cd google-glog-0.3.4
./configure

b) The generated makefile have some mistakes (?)
– change line 613 to ACLOCAL=aclocal-1.15
– change line 619 to AUTOMAKE=automake-1.15

c)
make // this will have some errors, dont worry
automake –add-missing
make -j 16 //or 100,whatever
sudo make install

//////////////////////////////////////////////////////////
Now we can build caffe! Profit!

2 **!!!!如果 遇到:::error: version mismatch. This is Automake 1.15.1,

解决办法看这里
http://askubuntu.com/questions/550824/intltool-automake-version-mismatch

Caffe 深度学习入门教程  http://www.linuxidc.com/Linux/2016-11/136774.htm

Ubuntu 16.04 安装配置Caffe 图文详解 http://www.linuxidc.com/Linux/2016-12/138870.htm

Ubuntu 16.04下Matlab2014a+Anaconda2+OpenCV3.1+Caffe安装 http://www.linuxidc.com/Linux/2016-07/132860.htm

Ubuntu 16.04系统下CUDA7.5配置Caffe教程 http://www.linuxidc.com/Linux/2016-07/132859.htm

Caffe在Ubuntu 14.04 64bit 下的安装 http://www.linuxidc.com/Linux/2015-07/120449.htm

深度学习框架Caffe在Ubuntu下编译安装  http://www.linuxidc.com/Linux/2016-07/133225.htm

Caffe + Ubuntu 14.04 64bit + CUDA 6.5 配置说明  http://www.linuxidc.com/Linux/2015-04/116444.htm

Ubuntu 16.04上安装Caffe http://www.linuxidc.com/Linux/2016-08/134585.htm

Caffe配置简明教程 ( Ubuntu 14.04 / CUDA 7.5 / cuDNN 5.1 / OpenCV 3.1 )  http://www.linuxidc.com/Linux/2016-09/135016.htm

Ubuntu 16.04上安装Caffe(CPU only)  http://www.linuxidc.com/Linux/2016-09/135034.htm

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-12/138903.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu 16.10 下安装Caffe遇到: “未定义引用” 问题
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏