Back to Cuda

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).

2 thoughts on “Back to Cuda

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *