incompatible libcudart.so sdk build issues

I am trying to build sdk on a kubuntu hardy (8.04). and I am seeing two kinds of error:

  1. In projects/reduction: errors from nvcc

    nvcc 1) ELF not found
    nvcc 2) syntax error “(” (expecting “)”)

  2. in project/simpleCUBLAS

    /usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcudart.so when searching for -lcudart
    /usr/bin/ld: cannot find -lcudart

I searched the forum for related issues but couldnt find any.

Details:
I used CUDA driver (174.55 for RHEL 5.x) and SDK (v2.0 for RHEL 5.x) and am using gcc/g++ 4.2 although I did try with 4.1 as well (some thread mentioned problems with 4.2 Is that true?)

I am building as “make emu=1” My system does not have a CUDA enabled gpu but i guess emu=1 should build fine on it.

please help. thanks

I can’t say, but I recommend trying 4.1. In my experience with Ubuntu, you must replace the /usr/bin/gcc symlink to 4.2 with one that points to /usr/bin/gcc-4.1, or it won’t work right. Did you try that approach?

I’m running Ubuntu 8.04. I haven tried CUBLAS, but all the other projects have compiled and worked using 4.1.

If you’re running the 64bit Kubuntu, then you need to install the 32bit compatibility libraries that ship with the OS. Ubuntu-8.04 will be supported in a future (not 2.0) release of CUDA.

In my experience (CUDA 1.0 up to 2.0beta on OpenSuse 10.3 and CentOS5), CUDA mostly hiccups on some advanced syntaxes found in 4.2 files (you either have to use GCC 4.1 or use patched files [snapback]358898[/snapback][snapback]358744[/snapback]) . But produces compatible binary anyway.

Your problem sounds more of conflicting versions of libraries (did you install some other version before installing the 2.0 CUDA ?)

Also, emulation in CUDA is painfully slow. Even getting an ultra low-end graphic card can dramatically speed up thing (I started testing using a laptop’s 8600. Now I have a 9800 on a dedicated machine).

…aaargh! i feel dumb! I think i was using x86_64 version of the tool kit on 32bit. uninstalled and re-installed 32 bit toolkit and things work fine. although a different error now. /usr/local/cuda/lib has libcudart.so but no libcuda.so but sample apps like simpleTextureDrv uses the the USEDRVAPI=1 and that tries to use -lcuda instead of -lcudart and then fails.

Thanks for all the replies

In CUDA version 1.0, libcuda is in /usr/local/cuda/lib

CUDA version 1.1 and up doesn’t ship libcuda anymore. Instead, libcuda is provided by the driver and is located in /usr/lib/ and/or /usr/lib64/

For that you need a recent driver that does ship with the necessary libraries. (Normally a link is provided at nVidia’s download page).

So either upgrade your driver or downgrade your CUDA.