Runtime 32/64 conflict on fresh Cuda 2.3 install on Ubuntu 9.04

I have just downloaded and installed the latest driver, toolkit, and sdk:

cudadriver_2.3_linux_64_190.16.run
cudatoolkit_2.3_linux_64_ubuntu9.04.run
cudasdk_2.3_linux.run

and after installing the libraries, setting path, etc., I can build the sdk.

However running applications in the sdk produces the error:

particles: error while loading shared libraries: libcudart.so.2: wrong ELF class: ELFCLASS32

so it looks like I am cross compiling. I do not want to compile for 32 bits, but for the native 64 bit machine.

I looked in the Release Notes, but didn’t see any way to force the 64 bits.

I did not have this problem on the machine I built a week ago using Cuda 2.2 and retrograde compiler, etc.

Is /usr/local/cuda/lib64 in /etc/ld.so.conf ?

No, and it isn’t in /etc/ld.so.conf.d/* either.

Also: no appearances of cuda in /etc/ld.so.conf or /etc/ld.so.conf.d/* on the machine that does not have the problem.

EDIT: adding a file /etc/ld.so.conf.d/cuda2.3.conf containing /usr/local/cuda/lib64 appears to make no difference.

/usr/local/cuda/lib64 is there, and appears to have sensible shared objects in it.

EDIT2: I just forced the issue by setting LD_LIBRARY_PATH to /usr/local/cuda/lib64. Unless someone explains what’s wrong with that, I’ll just use that.

Did you run ldconfig after adding the /etc/ld.so.conf.d/cuda2.3.conf file, otherwise the library path is not up to date.

N.

Good catch - I left that out. I took the forced LD_LIBRARY_PATH out of the .profile and went back to the cuda2.3.conf file, and, having run ldconfig, it works.

Hi,

I did everything you said and I could not run the SDK examples.

If I set LD_LIBRARY_PATH as /usr/local/cuda/lib, I get:

error while loading shared libraries: libcudart.so.2: wrong ELF class: ELFCLASS32

and if I set LD_LIBRARY_PATH as /usr/local/cuda/lib64, I get:

Segmentation fault

I have configured /etc/ld.conf.d/cuda-2.3.conf and ran ldconfig, but it still not working.

im getting this error:

“error while loading shared libraries: libcudart.so.2: wrong ELF class: ELFCLASS32”

my paths are in .profile

~/.profile: executed by the command interpreter for login shells.

This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login

exists.

see /usr/share/doc/bash/examples/startup-files for examples.

the files are located in the bash-doc package.

the default umask is set in /etc/profile; for setting the umask

for ssh logins, install and configure the libpam-umask package.

#umask 022

if running bash

if [ -n “$BASH_VERSION” ]; then
# include .bashrc if it exists
if [ -f “$HOME/.bashrc” ]; then
. “$HOME/.bashrc”
fi
fi

set PATH so it includes user’s private bin if it exists

if [ -d “$HOME/bin” ] ; then
PATH="$HOME/bin:$PATH"
fi

#/usr/local/cuda

CUDA_INSTALL_PATH=/usr/local/cuda
SDK_INSTALL_PATH=~/NVIDIA_GPU_Computing_SDK

PATH=$PATH:/usr/local/cuda/bin
LD_LIBRARY_PATH=/usr/local/cuda/lib64

export CUDA_INSTALL_PATH
export SDK_INSTALL_PATH
export PATH
export LD_LIBRARY_PATH

i dont know if that is ok. i assume its not because im getting an error xD.
i didnt quite understand what you all wrote up there.