0%

Set up Caffe after Updating Ubuntu from 14.04 to 16.04

Today I accidentally upgraded my Ubuntu 14.04 to Ubuntu 16.04. Then evidently Caffe can not be built. Several modifications are of need to bypass the issues.

  1. hack the Cuda source code. Suppress the error of unsupported GNU version! gcc versions later than 4.9 are not supported! by replacing #if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 9) with #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 9).
  2. config the Makefile of Caffe. Replace NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) with NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

Other steps of using Caffe can be found here and here.