how to install cuda 4.0 or 4.1 RC2 on opensuse 12.1?

How to install cuda 4.0 or 4.1 (recent stable version) on opensuse 12.1 64bit to be able compile every demos apps from CUDA SDK?

CUDA Toolkit 4.1 | NVIDIA Developer Zone
CUDA Toolkit 4.0 | NVIDIA Developer Zone

The cuda supported gcc compiler version looks like <4.5.x.

Thanks for any help.

I have just installed CUDA Toolkit 4.1 on openSUSE 12.1 64bit, and successfully built the examples in the SDK. Well, there were lots of warnings, but the build completed. As openSUSE 12.1 is not supported, I had to jump through a couple of hoops. But even a noob like me could do it!

  1. You need an earlier version of gcc. I got gcc43 from the repository at

  2. You need the nvcc compiler to use the earlier versions of gcc. As root, I created a folder /opt/gcc43/ and added links to the gcc43 compilers, i.e.

ln -s /usr/bin/gcc-4.3 /opt/gcc43/gcc
ln -s /usr/bin/g++-4.3 /opt/gcc43/g++

To point nvcc to those links, i edited (as root) /usr/local/cuda/bin/nvcc.profile to include the line …

compiler-bindir = /opt/gcc43/
  1. If you try to make the SDK samples now, the linker will not find all the libraries. Read the Release notes! You need to add some more links to /usr/lib64, things like
ln -s /usr/lib64/ /usr/lib64/

… and a few other libraries. For me, just GLU, glut, Xmu and Xi.

Presto - it worked! Good luck.