Open tommy87 opened 9 years ago
i had the same problem
After some investigations i figured out, that it was a problem of the new GCC version. Most of the libs are now comiled against GCC 5 but CUDA with GCC > 4.9 is not supported.
One workaround is to get the latest CUDA version (>= 7.5) edit the CUDA header (i forget the name of the header...) and replace the GCC error line with a warning or remove it complitly. After that CUDA can be comilied against GCC 5.
But i get runtime errors....im not sure if its because of a wrong driver or of the GCC 5 version of CUDA....but for stability im now using Ubunut 14.04
Edit: its in line 113 in /usr/local/cuda/include/host_config.h
fail to build under ubuntu 15.10....
[ 1%] Built target proto
.......
[ 80%] Built target caffe
Linking CXX executable caffe
CMakeFiles/caffe.bin.dir/caffe.cpp.o: In function `main':
caffe.cpp:(.text.startup+0x108): undefined reference to`google::SetUsageMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/caffe.bin.dir/caffe.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)':
caffe.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x50): undefined reference to`google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
CMakeFiles/caffe.bin.dir/caffe.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
caffe.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x50): undefined reference to`google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
CMakeFiles/caffe.bin.dir/caffe.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, float>(int const&, float const&, char const*)':
caffe.cpp:(.text._ZN6google17MakeCheckOpStringIifEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIifEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x56): undefined reference to`google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:115: recipe for target 'tools/caffe' failed
make[2]: **\* [tools/caffe] Error 1
CMakeFiles/Makefile2:373: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed
make[1]: **\* [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: **\* [all] Error 2
I have the same problem
There is one possible solution from the following link: https://groups.google.com/forum/#!msg/caffe-users/a6TDx89IByY/49ZD6rtyCwAJ
Thats exactly what i wrote further up. But to make it easier to find, the part which must be edited is in line 113 in /usr/local/cuda/include/host_config.h
An additional step is required. One has to force GCC to use the old ABI (see https://gcc.gnu.org/gcc-5/changes.html#libstdcxx for details) with the flag -D_GLIBCXX_USE_CXX11_ABI=0 in the Makefile.
Having the same problem. Is there a reasonable work around for this. Eg. does altering line 113 of host_config.h
really fix the problem or does it cause runtime errors?
@juliebernauer is the additional setup you refer to a work around in itself or is it in addition to editing host_config.h
?
Would be great if the was a proper fix so caffe could be installed on the latest version of ubuntu.
The line 113 change is needed for CUDA 7.5 to work with GCC5.x since this is an unsupported compiler -> this is needed to compile (first message). The additional step I mentioned is needed too in addition to editing host_config.h so as to be able to link (i.e. have a caffe executable), this is due to a change in C++ -> this is needed for linking (fixing the issue described in kangyong commented on Nov 5, 2015)
Once that is done, caffe runs with CUDA and cuDNN. This also works on Debian stretch.
@juliebernauer but how to add the flag -D_GLIBCXX_USE_CXX11_ABI=0 in the Makefile?
i'm unable to build caffe unter ubuntu 15.10. I had no problems with previous versions of ubuntu and i tried to build caffe version 0.13, 0.14 and the master branch...
for building a have disabled CUDNN and also tried to disable CNMEM and build_python
build log: