Unsupported compiler?

I am trying to install the CUDA 5.0 toolkit on a new system. It installs the driver, and I can run e.g. nvidia_settings, but when I run the .run file a second time (after shutown and reboot) to install CUDA, it fails with an “unsupported compiler” message. This machine has gcc 4.7.1. What compiler version do I need to have?

See section “Supported Operating Systems for Windows, Linux, and Mac OS X” in the CUDA 5.0 release notes, which can be found here:


  1. Add those two lines into “cuda.h”
    #undef _GLIBCXX_USE_INT128
  2. Modify host_config.h:80 as :
    #if GNUC > 4 || (GNUC == 4 && GNUC_MINOR > 7)

Ubuntu12.10 with CUDA5.0 tested

Thanks for the reply. I’d already found another workaround - install the older version of gcc (4.3 IIRC) and switch the symlinks in the bin directory so “gcc” points to that version during install.

I wonder if your solution will let CUDA do compiles with the 4.7 compiler, too, instead of having to swap symlinks around?

Hi Galago,

please excuse my noob question, I assume the cuda.h file is the ope in /usr/include/linux/ and not the one in the kernel headers. However, I cannot find host_config.h in my system (Ubuntu 12.10), where is it supposed to be?