手机版
你好,游客 登录 注册
背景:
阅读新闻

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

[日期:2016-12-28] 来源:Linux社区  作者:jbddygb [字体: ]

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

linux
相关资讯       Caffe 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款