# Unsupported compiler?

**URL:** <https://forums.developer.nvidia.com/t/unsupported-compiler/27362>\
**Category:** CUDA Setup and Installation\
**Created:** [November 17, 2012, 5:28am UTC](https://forums.developer.nvidia.com/t/unsupported-compiler/27362 "2012-11-17T05:28:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesqf](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jamesqf](https://forums.developer.nvidia.com/u/jamesqf)\
**Post date:** [November 17, 2012, 5:28am UTC](https://forums.developer.nvidia.com/t/unsupported-compiler/27362/1 "2012-11-17T05:28:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![njuffa](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@njuffa](https://forums.developer.nvidia.com/u/njuffa)\
**Post date:** [November 17, 2012, 6:38am UTC](https://forums.developer.nvidia.com/t/unsupported-compiler/27362/2 "2012-11-17T06:38:36Z")

</div>

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

[url][http://developer.download.nvidia.com/compute/cuda/5\_0/rel/docs/CUDA\_Toolkit\_Release\_Notes\_And\_Errata.txt[/url]](http://developer.download.nvidia.com/compute/cuda/5_0/rel/docs/CUDA_Toolkit_Release_Notes_And_Errata.txt%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![galago](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/galago/32/12212_2.png) [@galago](https://forums.developer.nvidia.com/u/galago)\
**Post date:** [November 28, 2012, 3:37pm UTC](https://forums.developer.nvidia.com/t/unsupported-compiler/27362/3 "2012-11-28T15:37:45Z")

</div>

1. Add those two lines into “cuda.h”  
#undef \_GLIBCXX\_ATOMIC\_BUILTINS  
#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

---

<div class="post-metadata">

**Author:** ![jamesqf](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jamesqf](https://forums.developer.nvidia.com/u/jamesqf)\
**Post date:** [November 28, 2012, 7:04pm UTC](https://forums.developer.nvidia.com/t/unsupported-compiler/27362/4 "2012-11-28T19:04:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![grossetti](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@grossetti](https://forums.developer.nvidia.com/u/grossetti)\
**Post date:** [March 19, 2013, 10:30am UTC](https://forums.developer.nvidia.com/t/unsupported-compiler/27362/5 "2013-03-19T10:30:21Z")

</div>

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?

Thanks,  
Gabriel
