[csw-users] Wrong ELF class - ELFCLASS32?

Victor Hooi victorhooi at yahoo.com
Thu Jul 28 07:44:48 CEST 2011


heya,

Scratch that - installing the OpenCSW openssh-client package doesn't solve
the issue =(:

If I put the OpenCSW "scp" first in my path, and call "scp" it still insists
on calling /usr/bin/ssh, for some reason:

bash$ export PATH=/db/pub/eq/csw/bin:$PATH
> bash$ scp opencsw.tar username at server_hostname:/tmp
> ld.so.1: ssh: fatal: relocation error: file /usr/bin/ssh: symbol
> SUNWcry_installed: referenced symbol not found
> lost connection


However, if I call the absolute path to OpenCSW's "scp", it seems to be
still hardcoded to look for the "ssh" binary in /opt/csw, despite my PATH:

bash$ /db/pub/eq/csw/bin/scp opencsw.tar hooivic at sydeqexcd02:/tmp
> /opt/csw/bin/ssh: No such file or directory
> lost connection


Not sure how to break/fix that hardcoding...hmm.

Cheers,
Victor

2011/7/28 Victor Hooi <victorhooi at yahoo.com>

> Hi,
>
> Sorry to reply to myself, but forgot to attach ldd output - hopefully
> that's helpful as well:
>
> bash$ ldd /bin/scp
>>
>> libsocket.so.1 => /lib/libsocket.so.1
>>  libc.so.1 => /lib/libc.so.1
>>  libnsl.so.1 => /lib/libnsl.so.1
>> libmp.so.2 => /lib/libmp.so.2
>>  libmd.so.1 => /lib/libmd.so.1
>> libscf.so.1 => /lib/libscf.so.1
>>  libdoor.so.1 => /lib/libdoor.so.1
>> libuutil.so.1 => /lib/libuutil.so.1
>>  libgen.so.1 => /lib/libgen.so.1
>> libm.so.2 => /lib/libm.so.2
>> bash$ scp opencsw.tar hooivic at sydeqexcd03:/tmp
>>
>> ld.so.1: ssh: fatal: relocation error: file /usr/bin/ssh: symbol
>> SUNWcry_installed: referenced symbol not found
>> lost connection
>> bash$ ldd /usr/bin/ssh
>>
>> libsocket.so.1 => /lib/libsocket.so.1
>>  libnsl.so.1 => /lib/libnsl.so.1
>> libz.so.1 => /db/pub/eq/csw/lib/libz.so.1
>>  libz.so.1 (SUNW_1.1) => (version not found)
>> libcrypto.so.0.9.7 => /db/pub/eq/csw/lib/libcrypto.so.0.9.7
>>  libgss.so.1 => /usr/lib/libgss.so.1
>>
>> libc.so.1 => /lib/libc.so.1
>>  libmp.so.2 => /lib/libmp.so.2
>> libmd.so.1 => /lib/libmd.so.1
>>  libscf.so.1 => /lib/libscf.so.1
>> libdl.so.1 => /lib/libdl.so.1
>>  libcmd.so.1 => /lib/libcmd.so.1
>> libdoor.so.1 => /lib/libdoor.so.1
>>  libuutil.so.1 => /lib/libuutil.so.1
>> libgen.so.1 => /lib/libgen.so.1
>>  libm.so.2 => /lib/libm.so.2
>
>
> A workaround is just to use the OpenSSL clients from OpenCSW - however,
> this probably isn't the only system binary that's going to break due to
> changing LD_LIBRARY_PATH. Hmm, perhaps I'm holding it wrong...lol.
>
> Is there a smarter way of relocating these packages? (apart from symlinking
> from /opt).
>
> Cheers,
> Victor
>
> 2011/7/28 Victor Hooi <victorhooi at yahoo.com>
>
>> heya,
>>
>> Hmm, I noticed something strange with setting LD_LIBRARY_PATH/32/64 etc.
>>
>> If I set them as above:
>>
>> export
>> LD_LIBRARY_PATH=/db/pub/eq/csw/lib:/db/pub/eq/csw/lib/svn:/db/pub/eq/csw/bdb48/lib:$LD_LIBRARY_PATH
>> export
>> LD_LIBRARY_PATH_32=/db/pub/eq/csw/lib:/db/pub/eq/csw/lib/svn:/db/pub/eq/csw/bdb48/lib:$LD_LIBRARY_PATH_32
>> export LD_LIBRARY_PATH_64=/db/pub/eq/csw/lib/64:$LD_LIBRARY_PATH_64
>>
>> It seems to break scp:
>>
>> bash$ scp opencsw.tar username at server_hostname:/tmp
>>> ld.so.1: ssh: fatal: relocation error: file /usr/bin/ssh: symbol
>>> SUNWcry_installed: referenced symbol not found
>>
>>
>> I've put the output from truss at the end of the email.
>>
>> Is this the sort of issue they were referring to here?
>>
>> http://blogs.oracle.com/rie/entry/tt_ld_library_path_tt
>>
>> Is there any way to fix the above - to have the OpenCSW binaries work, and
>> not break the existing Solaris binaries?
>>
>> Hmm, and still puzzled by the Emacs thing - and setting EMACSDATA didn't
>> seem to have any effect.
>>
>> Output from truss and scp:
>>
>> bash$ truss scp opencsw.tar username at server_hostname:/tmp
>>> execve("/usr/bin/scp", 0x08047694, 0x080476A4)  argc = 3
>>>
>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFF0000
>>> resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
>>> resolvepath("/usr/bin/scp", "/usr/bin/scp", 1023) = 12
>>> sysconfig(_CONFIG_PAGESIZE) = 4096
>>> stat64("/usr/bin/scp", 0x08047420) = 0
>>>
>>> open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/libsocket.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/svn/libsocket.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/bdb48/lib/libsocket.so.1", 0x08046CC0) Err#2
>>> ENOENT
>>> stat64("./libsocket.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/lib/libsocket.so.1", 0x08046CC0) = 0
>>> resolvepath("/lib/libsocket.so.1", "/lib/libsocket.so.1", 1023) = 19
>>> open("/lib/libsocket.so.1", O_RDONLY) = 3
>>>
>>> mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0)
>>> = 0xFEFB0000
>>>  mmap(0x00010000, 114688, PROT_NONE,
>>> MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEF90000
>>> mmap(0xFEF90000, 44002, PROT_READ|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEF90000
>>> mmap(0xFEFAB000, 2645, PROT_READ|PROT_WRITE,
>>> MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 45056) = 0xFEFAB000
>>> munmap(0xFEF9B000, 65536) = 0
>>> memcntl(0xFEF90000, 12080, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>> close(3) = 0
>>> stat64("/db/pub/eq/csw/lib/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/svn/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/bdb48/lib/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("./libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/lib/libc.so.1", 0x08046CC0) = 0
>>>
>>> resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
>>> open("/lib/libc.so.1", O_RDONLY) = 3
>>> mmap(0xFEFB0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0)
>>> = 0xFEFB0000
>>> mmap(0x00010000, 1212416, PROT_NONE,
>>> MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE60000
>>> mmap(0xFEE60000, 1105861, PROT_READ|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEE60000
>>> mmap(0xFEF7E000, 30311, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1105920) = 0xFEF7E000
>>> mmap(0xFEF86000, 4256, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFEF86000
>>> munmap(0xFEF6E000, 65536) = 0
>>> memcntl(0xFEE60000, 124344, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>> close(3) = 0
>>> stat64("/db/pub/eq/csw/lib/libnsl.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/svn/libnsl.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/bdb48/lib/libnsl.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("./libnsl.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/lib/libnsl.so.1", 0x08046CC0) = 0
>>> resolvepath("/lib/libnsl.so.1", "/lib/libnsl.so.1", 1023) = 16
>>> open("/lib/libnsl.so.1", O_RDONLY) = 3
>>> mmap(0xFEFB0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0)
>>> = 0xFEFB0000
>>> mmap(0x00010000, 647168, PROT_NONE,
>>> MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEDC0000
>>> mmap(0xFEDC0000, 526189, PROT_READ|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEDC0000
>>> mmap(0xFEE51000, 19893, PROT_READ|PROT_WRITE,
>>> MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 528384) = 0xFEE51000
>>> mmap(0xFEE56000, 30056, PROT_READ|PROT_WRITE,
>>> MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFEE56000
>>> munmap(0xFEE41000, 65536) = 0
>>> memcntl(0xFEDC0000, 58076, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>> close(3) = 0
>>> stat64("/db/pub/eq/csw/lib/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/svn/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/bdb48/lib/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("./libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/svn/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/bdb48/lib/libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> stat64("./libc.so.1", 0x08046CC0) Err#2 ENOENT
>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFC0000
>>> mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEFA0000
>>> munmap(0xFEFB0000, 32768) = 0
>>> getcontext(0x08047290)
>>> getrlimit(RLIMIT_STACK, 0x08047288) = 0
>>> getpid() = 3707 [3706]
>>> lwp_private(0, 1, 0xFEFA2A00) = 0x000001C3
>>> setustack(0xFEFA2A60)
>>> sigfillset(0xFEF85DE0) = 0
>>> sysi86(SI86FPSTART, 0xFEF86750, 0x0000133F, 0x00001F80) = 0x00000001
>>> sysconfig(_CONFIG_PAGESIZE) = 4096
>>> brk(0x0806B398) = 0
>>> brk(0x0806D398) = 0
>>> stat64("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3",
>>> 0x08046640) = 0
>>>
>>> resolvepath("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3",
>>> "/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3", 1023) = 52
>>> open("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3", O_RDONLY) =
>>> 3
>>> mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0)
>>> = 0xFEFB0000
>>> mmap(0x00010000, 86016, PROT_NONE,
>>> MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEDA0000
>>> mmap(0xFEDA0000, 14986, PROT_READ|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEDA0000
>>> mmap(0xFEDB3000, 5010, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 12288) = 0xFEDB3000
>>> munmap(0xFEDA4000, 61440) = 0
>>> memcntl(0xFEDA0000, 5500, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>> close(3) = 0
>>> stat64("/db/pub/eq/csw/lib/libc.so.1", 0x080465A0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/lib/svn/libc.so.1", 0x080465A0) Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/bdb48/lib/libc.so.1", 0x080465A0) Err#2 ENOENT
>>> stat64("./libc.so.1", 0x080465A0) Err#2 ENOENT
>>> munmap(0xFEFB0000, 32768) = 0
>>> getuid() = 2322418 [2322418]
>>> brk(0x0806D398) = 0
>>> brk(0x0806F398) = 0
>>> getuid() = 2322418 [2322418]
>>> mmap(0x00010000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFED80000
>>> getuid() = 2322418 [2322418]
>>> getuid() = 2322418 [2322418]
>>> open64("/var/run/name_service_door", O_RDONLY) = 3
>>> fstat64(3, 0x08047220) = 0
>>> fcntl(3, F_SETFD, 0x00000001) = 0
>>> door_info(3, 0xFEF7F4C4) = 0
>>> door_call(3, 0x08047468) = 0
>>> ioctl(2, TCGETA, 0x08047638) = 0
>>> schedctl() = 0xFEFED000
>>> sigaction(SIGPIPE, 0x080475A0, 0x08047620) = 0
>>> pipe() = 4 [5]
>>> pipe() = 6 [7]
>>> pipe() = 8 [9]
>>> close(4) = 0
>>> close(5) = 0
>>> fork1() = 3708
>>> lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF
>>> [0x0000FFFF]
>>> close(6) = 0
>>> close(9) = 0
>>> ld.so.1: ssh: fatal: relocation error: file /usr/bin/ssh: symbol
>>> SUNWcry_installed: referenced symbol not found
>>> read(8, 0x0804760C, 1) = 0
>>> lost connection
>>> write(2, " l o s t   c o n n e c t".., 16) = 16
>>> _exit(1)
>>
>>
>> Cheers,
>> Victor
>>
>> 2011/7/28 Victor Hooi <victorhooi at yahoo.com>
>>
>>> Hi,
>>>
>>> I managed to get it working by setting the LD_LIBRARY_PATH_32/64
>>> variables as suggested =):
>>>
>>> export LD_LIBRARY_PATH_32=/db/pub/eq/csw/opt/csw/lib
>>> export LD_LIBRARY_PATH_64=/db/pub/eq/csw/opt/csw/lib/64
>>>
>>> The 64-bit one is the one that seems to have done it. Thanks to Maciej
>>> and Dago for their replies.
>>>
>>> For completeness, I've included the truss output from a working and
>>> non-working system (before I set the LD_LIBRARY_PATH_32/64 variables) at the
>>> end of this email.
>>>
>>> Bzip2 now works, as does gdb. However, I noticed emacs has issues:
>>>
>>> bash$ ./emacs
>>>> Warning: arch-dependent data dir
>>>> (/opt/csw/libexec/emacs/23.1/i386-pc-solaris2.8/) does not exist.
>>>> Warning: arch-independent data dir (/opt/csw/share/emacs/23.1/etc/) does
>>>> not exist.
>>>> Warning: Lisp directory `/opt/csw/share/emacs/23.1/site-lisp' does not
>>>> exist.
>>>> Warning: Lisp directory `/opt/csw/share/emacs/site-lisp' does not exist.
>>>> Warning: Lisp directory `/opt/csw/share/emacs/23.1/lisp' does not exist.
>>>> Warning: Lisp directory `/opt/csw/share/emacs/23.1/leim' does not exist.
>>>> Error: charsets directory (/opt/csw/share/emacs/23.1/etc/charsets) does
>>>> not exist.
>>>> Emacs will not function correctly without the character map files.
>>>> Please check your installation!
>>>> Cannot open load file: warnings
>>>
>>>
>>> Any suggestions on the cleanest way to solve the above? Assume for not we
>>> can't touch /opt, or create symlinks there.
>>>
>>> This whole relocating from /opt to /usr/local is quite painful *sigh*. Ah
>>> well, it's one of the strange requirements we have - we can install things
>>> to /usr/local, but not /opt.
>>>
>>> Cheers,
>>> Victor
>>>
>>> Working system:
>>>
>>> victorh at puppet:/opt/csw/bin$ truss bzip2
>>>> execve("/usr/bin/bzip2", 0x08047D6C, 0x08047D74)  argc = 1
>>>> sysinfo(SI_MACHINE, "i86pc", 257)               = 6
>>>> mmap(0x00000000, 32, PROT_READ|PROT_WRITE|PROT_EXEC,
>>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFB0000
>>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1,
>>>> 0) = 0xFEFA0000
>>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1,
>>>> 0) = 0xFEF90000
>>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF80000
>>>> memcntl(0xFEFB7000, 32064, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>>> memcntl(0x08050000, 6636, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>>> resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
>>>> resolvepath("/usr/bin/bzip2", "/usr/bin/bzip2", 1023) = 14
>>>> sysconfig(_CONFIG_PAGESIZE)                     = 4096
>>>> stat64("/usr/bin/bzip2", 0x080479B0)            = 0
>>>> open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
>>>> stat64("/lib/libbz2.so.1", 0x08047160)          Err#2 ENOENT
>>>> stat64("/usr/lib/libbz2.so.1", 0x08047160)      = 0
>>>> resolvepath("/usr/lib/libbz2.so.1", "/usr/lib/libbz2.so.1", 1023) = 20
>>>> open("/usr/lib/libbz2.so.1", O_RDONLY)          = 3
>>>> mmapobj(3, MMOBJ_INTERPRET, 0xFEF80A58, 0x080471CC, 0x00000000) = 0
>>>> close(3)                                        = 0
>>>> memcntl(0xFEF50000, 6184, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF40000
>>>> stat64("/lib/libc.so.1", 0x08047160)            = 0
>>>> resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
>>>> open("/lib/libc.so.1", O_RDONLY)                = 3
>>>> mmapobj(3, MMOBJ_INTERPRET, 0xFEF40080, 0x080471CC, 0x00000000) = 0
>>>> close(3)                                        = 0
>>>> memcntl(0xFEDF0000, 187200, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>>> mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC,
>>>> MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEDE0000
>>>> getcontext(0x08047810)
>>>> getrlimit(RLIMIT_STACK, 0x08047808)             = 0
>>>> getpid()                                        = 12236 [12235]
>>>> lwp_private(0, 1, 0xFEDE2A40)                   = 0x000001C3
>>>> setustack(0xFEDE2AA0)
>>>> sysi86(SI86FPSTART, 0xFEF38CD4, 0x0000133F, 0x00001F80) = 0x00000001
>>>> schedctl()                                      = 0xFEDDA000
>>>> sigaction(SIGSEGV, 0x08047BD0, 0x08047C50)      = 0
>>>> sigaction(SIGBUS, 0x08047BD0, 0x08047C50)       = 0
>>>> sysconfig(_CONFIG_PAGESIZE)                     = 4096
>>>> ioctl(1, TCGETA, 0x08047B80)                    = 0
>>>> fstat64(2, 0x08046C00)                          = 0
>>>> bzip2write(2, " b z i p 2", 5)                  = 5
>>>> : I won't write compressed data to a terminal.
>>>> write(2, " :   I   w o n ' t   w r".., 47)      = 47
>>>> bzip2write(2, " b z i p 2", 5)                  = 5
>>>> : For help, type: `write(2, " :   F o r   h e l p ,  ".., 19)   = 19
>>>> bzip2write(2, " b z i p 2", 5)                  = 5
>>>>  --help'.
>>>> write(2, "   - - h e l p ' .\n", 10)            = 10
>>>> _exit(1)
>>>
>>>
>>> Non-working system:
>>>
>>> execve("bzip2", 0x080478B4, 0x080478BC)  argc = 1
>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFF0000
>>> resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
>>> getcwd("/db/pub/eq/csw/opt/csw/bin", 1017)      = 0
>>> resolvepath("/db/pub/eq/csw/opt/csw/bin/bzip2",
>>> "/db/pub/eq/csw/opt/csw/bin/bzip2", 1023) = 32
>>> sysconfig(_CONFIG_PAGESIZE)                     = 4096
>>> stat64("/db/pub/eq/csw/opt/csw/bin/bzip2", 0x08047640) = 0
>>> open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
>>> stat64("/db/pub/eq/csw/opt/csw/bdb48/lib/libc.so.1", 0x08046EE0) Err#2
>>> ENOENT
>>> stat64("/db/pub/eq/csw/opt/csw/lib/svn/libc.so.1", 0x08046EE0) Err#2
>>> ENOENT
>>> stat64("/db/pub/eq/csw/opt/csw/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/boost/current/lib/libc.so.1", 0x08046EE0)
>>> Err#2 ENOENT
>>> stat64("/usr/sfw/lib/libc.so.1", 0x08046EE0)    Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/log4cplus/current/lib/libc.so.1",
>>> 0x08046EE0) Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/xerces-c/current/lib/libc.so.1", 0x08046EE0)
>>> Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/omex/current/lib/libc.so.1", 0x08046EE0)
>>> Err#2 ENOENT
>>> stat64("./libc.so.1", 0x08046EE0)               Err#2 ENOENT
>>> stat64("/data/oracle/product/client/11.2.0.1/lib/libc.so.1", 0x08046EE0)
>>> Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/quickfix/current/lib/libc.so.1", 0x08046EE0)
>>> Err#2 ENOENT
>>> stat64("/db/pub/eq/Marvin//Libs/libc.so.1", 0x08046EE0) Err#2 ENOENT
>>> stat64("./libc.so.1", 0x08046EE0)               Err#2 ENOENT
>>> stat64("/lib/libc.so.1", 0x08046EE0)            = 0
>>> resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
>>> open("/lib/libc.so.1", O_RDONLY)                = 3
>>> mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0)
>>> = 0xFEFB0000
>>> mmap(0x00010000, 1212416, PROT_NONE,
>>> MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE80000
>>> mmap(0xFEE80000, 1105861, PROT_READ|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEE80000
>>> mmap(0xFEF9E000, 30311, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1105920) = 0xFEF9E000
>>> mmap(0xFEFA6000, 4256, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFEFA6000
>>> munmap(0xFEF8E000, 65536)                       = 0
>>> memcntl(0xFEE80000, 124344, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>> close(3)                                        = 0
>>> mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEF90000
>>> munmap(0xFEFB0000, 32768)                       = 0
>>> getcontext(0x080474B0)
>>> getrlimit(RLIMIT_STACK, 0x080474A8)             = 0
>>> getpid()                                        = 8908 [8907]
>>> lwp_private(0, 1, 0xFEF92A00)                   = 0x000001C3
>>> setustack(0xFEF92A60)
>>> sysi86(SI86FPSTART, 0xFEFA6750, 0x0000133F, 0x00001F80) = 0x00000001
>>> sysconfig(_CONFIG_PAGESIZE)                     = 4096
>>> brk(0x080615C0)                                 = 0
>>> brk(0x080635C0)                                 = 0
>>> stat64("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3",
>>> 0x08046880) = 0
>>> resolvepath("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3",
>>> "/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3", 1023) = 52
>>> open("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3", O_RDONLY) =
>>> 3
>>> mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0)
>>> = 0xFEFB0000
>>> mmap(0x00010000, 86016, PROT_NONE,
>>> MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE60000
>>> mmap(0xFEE60000, 14986, PROT_READ|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEE60000
>>> mmap(0xFEE73000, 5010, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 12288) = 0xFEE73000
>>> munmap(0xFEE64000, 61440)                       = 0
>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFC0000
>>> memcntl(0xFEE60000, 5500, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
>>> close(3)                                        = 0
>>> stat64("/db/pub/eq/csw/opt/csw/bdb48/lib/libc.so.1", 0x080467E0) Err#2
>>> ENOENT
>>> stat64("/db/pub/eq/csw/opt/csw/lib/svn/libc.so.1", 0x080467E0) Err#2
>>> ENOENT
>>> stat64("/db/pub/eq/csw/opt/csw/lib/libc.so.1", 0x080467E0) Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/boost/current/lib/libc.so.1", 0x080467E0)
>>> Err#2 ENOENT
>>> stat64("/usr/sfw/lib/libc.so.1", 0x080467E0)    Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/log4cplus/current/lib/libc.so.1",
>>> 0x080467E0) Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/xerces-c/current/lib/libc.so.1", 0x080467E0)
>>> Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/omex/current/lib/libc.so.1", 0x080467E0)
>>> Err#2 ENOENT
>>> stat64("./libc.so.1", 0x080467E0)               Err#2 ENOENT
>>> stat64("/data/oracle/product/client/11.2.0.1/lib/libc.so.1", 0x080467E0)
>>> Err#2 ENOENT
>>> stat64("/db/pub/eq/tools/lib/quickfix/current/lib/libc.so.1", 0x080467E0)
>>> Err#2 ENOENT
>>> stat64("/db/pub/eq/Marvin//Libs/libc.so.1", 0x080467E0) Err#2 ENOENT
>>> stat64("./libc.so.1", 0x080467E0)               Err#2 ENOENT
>>> munmap(0xFEFB0000, 32768)                       = 0
>>> open("/proc/self/auxv", O_RDONLY)               = 3
>>> fxstat(2, 3, 0x080477D0)                        = 0
>>> read(3, "D807\0\0EF7F04\bDE07\0\0".., 168)      = 168
>>> close(3)                                        = 0
>>> sysinfo(SI_ISALIST, "amd64 pentium_pro+mmx pentium_pro pentium+mmx
>>> pentium i486 i386 i86", 255) = 68
>>> access("amd64/bzip2", X_OK)                     = 0
>>> execve("amd64/bzip2", 0x080478B4, 0x080478BC)  argc = 1
>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF3F0000
>>> resolvepath("/usr/lib/amd64/ld.so.1", "/lib/amd64/ld.so.1", 1023) = 18
>>> getcwd("/db/pub/eq/csw/opt/csw/bin", 1011)      = 0
>>> resolvepath("/db/pub/eq/csw/opt/csw/bin/amd64/bzip2",
>>> "/db/pub/eq/csw/opt/csw/bin/amd64/bzip2", 1023) = 38
>>> stat("/db/pub/eq/csw/opt/csw/bin/amd64/bzip2", 0xFFFFFD7FFFDFF540) = 0
>>> open("/var/ld/64/ld.config", O_RDONLY)          Err#2 ENOENT
>>> stat("/db/pub/eq/csw/opt/csw/bdb48/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/db/pub/eq/csw/opt/csw/lib/svn/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60)
>>> Err#2 ENOENT
>>> stat("/db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) = 0
>>> resolvepath("/db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0",
>>> "/db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0.6", 1023) = 42
>>> open("/db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0", O_RDONLY) = 3
>>> mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0)
>>> = 0xFFFFFD7FFF3A0000
>>> close(3)                                        = 0
>>> stat("/db/pub/eq/tools/lib/boost/current/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/usr/sfw/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/db/pub/eq/tools/lib/log4cplus/current/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/db/pub/eq/tools/lib/xerces-c/current/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/db/pub/eq/tools/lib/omex/current/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("./libbz2.so.1.0", 0xFFFFFD7FFFDFEE60)     Err#2 ENOENT
>>> stat("/data/oracle/product/client/11.2.0.1/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/db/pub/eq/tools/lib/quickfix/current/lib/libbz2.so.1.0",
>>> 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/db/pub/eq/Marvin//Libs/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2
>>> ENOENT
>>> stat("./libbz2.so.1.0", 0xFFFFFD7FFFDFEE60)     Err#2 ENOENT
>>> mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
>>> MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF390000
>>> stat("/opt/csw/lib/amd64/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/lib/64/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> stat("/usr/lib/64/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT
>>> ld.so.1: bzip2: fatal: /db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0: wrong
>>> ELF class: ELFCLASS32
>>> write(2, " l d . s o . 1 :   b z i".., 93)      = 93
>>> munmap(0xFFFFFD7FFF3A0000, 32768)               = 0
>>> lwp_self()                                      = 1
>>>
>>> On Thu, Jul 28, 2011 at 07:12, Dagobert Michelsen <dam at opencsw.org>wrote:
>>>
>>>> Hi,
>>>>
>>>> Am 27.07.2011 um 21:57 schrieb Maciej Bliziński:
>>>> > >> 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
>>>>
>>>> I would say isaexec. Try
>>>>  LD_LIBRARY_PATH_32=/db/pub/eq/csw/opt/csw/lib
>>>>  LD_LIBRARY_PATH_64=/db/pub/eq/csw/opt/csw/lib/64
>>>>
>>>> Please see ld.so.1(1) for details.
>>>>
>>>>
>>>> Best regards
>>>>
>>>>  -- Dago
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users at lists.opencsw.org
>>>> https://lists.opencsw.org/mailman/listinfo/users
>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/users/attachments/20110728/fe54f7de/attachment-0001.html>


More information about the users mailing list