Solution to get nvcc to use gcc-3.4 instead of a newer version Archlinux 64Bit, CUDA SDK 2.0 beta

As root, do the following:

[codebox]mkdir /usr/gcc-3.4

ln -s /usr/bin/gcc-3.4 /usr/gcc-3.4/gcc

ln -s /usr/bin/g+±3.4 /usr/gcc-3.4/g++[/codebox]

Then change the #Compilers section in the commons/ of your CUDA SDK installation into the following:

[codebox]# Compilers

NVCC := $(CUDA_INSTALL_PATH)/bin/nvcc --compiler-bindir /usr/gcc-3.4/

CXX := g+±3.4

CC := gcc-3.4

LINK := g+±3.4 -fPIC[/codebox]

I’m not sure though whether the -fPIC flag for the linker command g++ is needed on 32bit or not.

If you have tried to compile (make) the SDK in the past and you got any errors or warnings, go into the root directory of your CUDA SDK instllation and do a make clean, then a make:

[codebox]cd ~/NVIDIA_CUDA_SDK

make clean


You’ll find the compiled binaries of the source codes in ~/NVIDIA_CUDA_SDK/projects/ in ~/NVIDIA_CUDA_SDK/bin/linux/release.