Problems installing CUDA on 64 bit Ubuntu 8.04

Hello all.

I have installed the latest (Redhat 5.x 64 bit) drivers from the Nvidia website along with the SDK and toolkit. When I try to make the files in NVIDIA_CUDA_SDK I get the following error message:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.3/…/…/…/…/lib/libcuda.so when searching for -lcuda
/usr/bin/ld: skipping incompatible /usr/lib/…/lib/libcuda.so when searching for -lcuda
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.3/…/…/…/libcuda.so when searching for -lcuda
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libcuda.so when searching for -lcuda
/usr/bin/ld: skipping incompatible /usr/lib64/libcuda.so when searching for -lcuda
/usr/bin/ld: skipping incompatible /usr/lib/libcuda.so when searching for -lcuda
/usr/bin/ld: cannot find -lcuda

I have also installed the:
sudo apt-get install libc6-dev-i386

I have been busting my head at this for a few days, and come to the conclusion: I need help :)

Please help and thanks for your time. Just ask if you need more information.

Ubuntu-8.04 is not currently supported with CUDA (only 7.04 & 7.10). Even if you resolve the problem above, you will very likely run into issues with the version of gcc that ships with 8.04.

A next release of CUDA (after 2.0) will support Ubuntu-8.04.

So what choices do I have. Reinstall 7.10 or ?

It sounds like you’ve somehow installed an incompatible version of the driver and the toolkit, so I would double check that everything’s okay there first. But as netllama said, gcc 4.3 doesn’t play nicely with CUDA sometimes and isn’t officially supported yet.

Shouldn’t this do the trick then:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.1 60 --slave /usr/bin/g++ g++ /usr/bin/g+±4.1

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.2 40 --slave /usr/bin/g++ g++ /usr/bin/g+±4.2

never the less - same error. But I am reading this section as install 7.10 if I want to use CUDA?

It really should just work (I’m running Ubuntu 8.04 and CUDA 2.0b2 on my home machine); are you sure that you installed the 64-bit toolkit?

(gcc 4.3 fails pretty hard on the thread migration API sample and I believe compiling cutil)

This is the run down of what I did:

  1. Clean install of Ubuntu 8.04 - 64 bit

  2. Downloaded Redhat 5x - 64 bit drivers, toolkit and sdk (offical nvidia site).

  3. Installed the Nvidia drivers, then Toolkit then SDK

  4. Installed sudo apt-get install libc6-dev-i386

  5. Went to NVIDIA_CUDA_SDK and did make

Above error returned to me.

As a fix I tried:

sudo apt-get install build-essential libglut3-dev gcc-4.1 g+±4.1 -y

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.1 60 --slave /usr/bin/g++ g++ /usr/bin/g+±4.1

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.2 40 --slave /usr/bin/g++ g++ /usr/bin/g+±4.2

Same error.

Install the toolkit for Ubuntu 7.10. I’m wondering if it’s set some options that are trying to use RHEL’s paths instead of Ubuntu’s.

whoops double post

Didn’t solve the problem either. Thanks though.

Update:

I re-did the following:

  1. Clean install of 64 bit Ubuntu 8.04
  2. Download the Redhat Linux 5.x driver, toolkit and sdk
  3. Installed the drivers, toolkit and sdk
  4. apt-get install libc6-dev-i386
  5. apt-get install build-essential libglut3-dev gcc-4.1 g+±4.1 -y
  6. Did make and it compilled nicely…

NB:
Make sure that you copy the correct libcuda.so version from the toolkit you download (else your in a world of hurt):

sudo cp libcuda.so.177.13 /usr/local/cuda/lib/libcuda.so

I fixed GLU problems in kubuntu 8.04 when I found out that the 2.0b installer didn’t make the link:

/usr/lib32/libGLU.so -> /usr/lib32/libGLU.so.1

As soon as I recreated that link, my GLU problems went away.

libGLU is not part of CUDA in any way, nor is it part of the NVIDIA display driver. If you’re missing a symlink, its due to an OS packaging problem.