Reputation: 925
I want to make the faster rcnn, I have a VM with UBUNTU 17.10 64bit. I install CUDA8 and CuDNN 6 then CUDNN 5. However, when I want to build the lib folder in faster project, I got this
error: /usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported! ^~~~~ error: command '/usr/local/cuda/bin/nvcc' failed
with exit status 1
Although the default gcc version is:
$ gcc --version
gcc-5 (Ubuntu 5.5.0-1ubuntu2) 5.4.1 20171010
This is to verify the CudNN version is 5:
$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 5
#define CUDNN_MINOR 1
#define CUDNN_PATCHLEVEL 10
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
CUDA version:
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
I tried some suggestion to install gcc 4.9 but it can't be downloaded!
$ sudo apt install gcc-4.9 g++-4.9
Package g++-4.9 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-4.9' has no installation candidate
E: Package 'g++-4.9' has no installation candidate
Upvotes: 0
Views: 1014
Reputation: 3596
error: /usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
There is a ABI standard change from gcc 5.0 to support C++11. I think if you want to use some feature of C++11, you'd better to find a new version for cuda as mentioned by @harlelf.
Package g++-4.9 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
This is an usual problem when using apt-get, you need add a PPA repository as followings.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
Upvotes: 1