[csw-users] Wrong ELF class - ELFCLASS32?

Maciej Bliziński maciej at opencsw.org
Wed Jul 27 21:57:24 CEST 2011


Looks like my first reply was unsuccessful. I blame the phone. Let's try
again.

Em 27/07/2011 08:26, "Victor Hooi" <victorhooi at yahoo.com> escreveu:
>>
>> Hi,
>
>
> I have two Solaris sytems, one which we have root-access for and the other
only a normal user account.
>
> On the system for which we have root, I've installed pkg-util and some
OpenCSW packages (e.g. vim, bz2ip, gdb etc.).
>
> I've then tarred up the /opt/csw directory, and transferred it to the
other system in which we only have limited access (and write access only to
~ and "/db/pub/eq").
>
> I then set the LD_LIBRARY_PATH to point to the /db/pub/eq/csw/opt/csw/lib
directory.
>
> I then try to run the programs (yes, I do know this whole thing is a
dirty, dirty hack, but this was the quickest way of getting a decent
development buildchain up on the limited-access system).

Fair enough, if you have a rough idea about what you're doing.

> Some of them (e.g. vim, ruby or Python) do work.
>
> Others, however, give an ELFCLASS32 error:
>
>> bash$ ./bzip2
>> ld.so.1: bzip2: fatal: /db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0: wrong
ELF class: ELFCLASS32
>> Killed

Can you run it under truss and compare outputs from a working abd a broken
system?

>
>> bash$ ./gdb
>> ld.so.1: gdb: fatal: /db/pub/eq/csw/opt/csw/lib/libncurses.so.5: wrong
ELF class: ELFCLASS32
>> Killed
>
>
> Uname on the root-access box (on which OpenCSW was installed):
>
>> SunOS puppet 5.11 snv_151a i86pc i386 i86pc Solaris
>
>
> Uname on the limited-access box (where we are trying to run the
tranplanted binaries):
>
>> SunOS eqaegd05 5.10 Generic_144489-06 i86pc i386 i86pc
>
>
> Both bzip2 and libbz2.so appear to be 32-bit (at least from what I can
tell):
>
>> bash$ file bzip2
>> bzip2:          ELF 32-bit LSB executable 80386 Version 1 [FPU],
dynamically linked, not stripped, no debugging information available

Can you look at the inode number of the bzip2 binary and the isaexec binary?
Is it the same?

>> bash$ file ../lib/libbz2.so
>> ../lib/libbz2.so:       ELF 32-bit LSB dynamic lib 80386 Version 1 [FPU],
dynamically linked, stripped
>
>
> What would be causing this error? And how would I fix it?

One guess is that it is the 32 vs 64 bit issue after all. If that's true,
adding $ISALIST or 64 to the search path could help.

LD_LIBRARY_PATH='/db/pub/eq/csw/opt/csw/lib/64'

Or

LD_LIBRARY_PATH='/db/pub/eq/csw/opt/csw/lib/$ISALIST'

Maciej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/users/attachments/20110727/04634dfb/attachment.html>


More information about the users mailing list