Lunchtime Semaphore

from and to 372433 143758 48 N

Back to Cuda

June 29th, 2011 by

After one year without doing much with cuda (since this), I’m back!

Last time, I had some problems with gcc 4.4 not being supported, I had to downgrade to 4.3. Sure enough, similar problem this time when trying to compile the SDK:

/usr/local/cuda/include/host_config.h:82:2: error: #error --
unsupported GNU version! gcc 4.5 and up are not supported!

This time, my standard gcc is 4.6… we are two versions back now.

The fix is simple: edit the common.mk files to have

CXX        := g++-4.4 -fPIC
CC         := gcc-4.4 -fPIC
LINK       := g++-4.4 -fPIC
NVCCFLAGS       := --compiler-bindir /usr/bin/gcc-4.4

(note that there are two common.mk to compile the whole SDK).

This entry was posted on Wednesday, June 29th, 2011 at 05:10 UTC and is filed under Cuda. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Loading Facebook Comments ...

2 responses about “Back to Cuda”

  1. Z said:

    Excellent!
    Thanks for the tip! It works perfectly with 4.1.28 on oneiric 11.10.

  2. Frontier Computing and Network Systems » CUDA error — unsupported GNU version! gcc 4.5 and up are not supported! said:

    [...] CUDALibraries/common and C/common. After wasting a lot of time finally found the source for the fix here and [...]

Leave a Reply