0
votes

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
1
How did you install cudnn? I have many working ubuntu machines with cuda8 and gcc5. I just installed a corresponding cudnn, which shows CUDNN_MAJOR 7 CUDNN_MINOR 1 CUDNN_PATCHLEVEL 2. And how about your cuda? Is cuda sample like deviceQuery working as usual?halfelf
sudo dpkg -i cuDNN v5.1 Runtime Library for Ubuntu14.04 (Deb) sudo dpkg -i cuDNN v5.1 Developer Library for Ubuntu14.04 (Deb)Hana90
then : sudo cp /usr/lib/x86_64-linux-gnu/libcudnn.so.5 /usr/local/cuda/lib64/libcudnn.so.5 sudo cp /usr/lib/x86_64-linux-gnu/libcudnn.so.5.1.10 /usr/local/cuda/lib64/libcudnn.so.5.1.10Hana90
sudo cp /usr/lib/x86_64-linux-gnu/libcudnn_static_v5.a /usr/local/cuda/lib64/libcudnn_static_v5.a sudo cp /usr/include/x86_64-linux-gnu/cudnn_v5.h /usr/local/cuda/include/cudnn.hHana90

1 Answers

1
votes

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