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

.



Relevant Pages

  • Re: Getting a C++ Application to compile on AIX 5.1 VACPP
    ... The current output of the compile is as follows. ... INSERT: Shared object libC.a: 398 symbols imported. ... RESOLVE: 0 of 4863 symbols were kept. ... MISMATCH: No type mismatches exist. ...
    (comp.unix.aix)
  • Re: [SLE] Downgrading packages with Yast2
    ... use ldd and apply some sed post-processing and you'll get a list ... of the shared object files required: ... Randall Schulz ...
    (SuSE)
  • Re: printk() with log level-Compilation error
    ... > lib/modules is WRONG engineering practice. ... > source headers, not at lib/modules. ... to the point where it is imposible to compile a module. ... The most reliable way is by pointing at them. ...
    (comp.os.linux.development.system)
  • problems with gcc after running up2date
    ... When trying to compile a newer version of CVS I got the following errors. ... ent size in shared object, consider re-linking ...
    (comp.os.linux.setup)
  • Re: printk() with log level-Compilation error
    ... > how it is upposed to look in a shell script. ... Yep - and not having the sources that you used to compile the currently ... running kernel on the machine in question would also kill it. ... The most reliable way is by pointing at them. ...
    (comp.os.linux.development.system)