Caffe installation fails on Linux system with GCC5

195 views
Skip to first unread message

Jan Vojt

unread,
Sep 17, 2015, 7:00:51 PM9/17/15
to Caffe Users
Hi,

I am using Linux Debian unstable (however I strongly believe the same situation would happen on testing - Stretch). The problem I have is that NVIDIA CUDA clearly claims to not support GCC 5. OK, so I compiled gcc 4.9.3, and wanted to use this one to compile caffe with. However, I still cannot get it to work.
I tried all combinations of compiling caffe with gcc 5.2.1/4.9.3 against CUDA 7.0/6.5.

Whenever I use gcc 4.9.3, I get an error similar to the following:

/usr/lib/x86_64-linux-gnu/libopencv_core.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'

What I understand from this is, that opencv I installed using package manager is compiled using gcc-5, and thus the library is not backwards compatible with gcc-4. I tried to compile opencv using gcc-4, but again got a similar error for opencv's dependency.

Now my questions are:
  1. Has anyone been able to successfully compile caffe on Debian Stretch/sid? Or other system with gcc-5 as a default compiler?
  2. How many dependent libraries would I need to manually compile with gcc-4 to get caffe build working? Is it worth it, or am I better off just installing Debian stable with gcc-4 and using that until CUDA supports gcc-5?
I will be grateful for sharing your experiences, or hearing advice/ideas how to deal with this problem. Thanks!
Reply all
Reply to author
Forward
0 new messages