Re: wrong ELF class: ELFCLASS32



Hello Shankar,
Try this

ldd /usr/ucblib/librpcsoc.so
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V890/lib/libc_psr.so.1

You should also have:

/usr/ucblib/librpcsoc.so
/usr/ucblib/sparcv9/librpcsoc.so

ldd /usr/ucblib/sparcv9/librpcsoc.so
libnsl.so.1 => /usr/lib/64/libnsl.so.1
libsocket.so.1 => /usr/lib/64/libsocket.so.1
libc.so.1 => /usr/lib/64/libc.so.1
libdl.so.1 => /usr/lib/64/libdl.so.1
libmp.so.2 => /usr/lib/64/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V890/lib/sparcv9/libc_psr.so.1


ld.so.1: sort: fatal: /usr/ucblib/librpcsoc.so: wrong ELF class:
ELFCLASS32
Killed

As you can see the message you are getting shows that you are pointing
to a 32 bit shared object.

The solution is to insure you compile with a compiler that is 64bit
capable or any shared object is 64 bit format.

file /usr/ucblib/sparcv9/librpcsoc.so
/usr/ucblib/sparcv9/librpcsoc.so: ELF 64-bit MSB dynamic lib
SPARCV9 Version 1, dynamically linked, not stripped

So you can edit your LD_LIBRARY_PATH to include /usr/ucblib/sparcv9
Try this:

setenv LD_LIBRARY_PATH /usr/ucblib/sparcv9:$LD_LIBRARY_PATH

Please be aware of these differences.

ROuNIN

.