Hi,<div><br></div><div>I managed to get it working by setting the LD_LIBRARY_PATH_32/64 variables as suggested =):</div><div><br></div><div><div>export LD_LIBRARY_PATH_32=/db/pub/eq/csw/opt/csw/lib</div><div>export LD_LIBRARY_PATH_64=/db/pub/eq/csw/opt/csw/lib/64</div>
<div><br></div><div>The 64-bit one is the one that seems to have done it. Thanks to Maciej and Dago for their replies.</div><div><br></div><div><div>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.</div>
</div><div><br></div><div>Bzip2 now works, as does gdb. However, I noticed emacs has issues:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
bash$ ./emacs<br>Warning: arch-dependent data dir (/opt/csw/libexec/emacs/23.1/i386-pc-solaris2.8/) does not exist.<br>Warning: arch-independent data dir (/opt/csw/share/emacs/23.1/etc/) does not exist.<br>Warning: Lisp directory `/opt/csw/share/emacs/23.1/site-lisp' does not exist.<br>
Warning: Lisp directory `/opt/csw/share/emacs/site-lisp' does not exist.<br>Warning: Lisp directory `/opt/csw/share/emacs/23.1/lisp' does not exist.<br>Warning: Lisp directory `/opt/csw/share/emacs/23.1/leim' does not exist.<br>
Error: charsets directory (/opt/csw/share/emacs/23.1/etc/charsets) does not exist.<br>Emacs will not function correctly without the character map files.<br>Please check your installation!<br>Cannot open load file: warnings</blockquote>
</div><div><br></div><div>Any suggestions on the cleanest way to solve the above? Assume for not we can't touch /opt, or create symlinks there.</div><div><br></div><div>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.</div>
<div><br></div><div>Cheers,</div><div>Victor</div><div><br></div><div>Working system:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
victorh@puppet:/opt/csw/bin$ truss bzip2<br>execve("/usr/bin/bzip2", 0x08047D6C, 0x08047D74) argc = 1<br>sysinfo(SI_MACHINE, "i86pc", 257) = 6<br>mmap(0x00000000, 32, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFB0000<br>
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFA0000<br>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF90000<br>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF80000<br>
memcntl(0xFEFB7000, 32064, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br>memcntl(0x08050000, 6636, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br>resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12<br>resolvepath("/usr/bin/bzip2", "/usr/bin/bzip2", 1023) = 14<br>
sysconfig(_CONFIG_PAGESIZE) = 4096<br>stat64("/usr/bin/bzip2", 0x080479B0) = 0<br>open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT<br>stat64("/lib/libbz2.so.1", 0x08047160) Err#2 ENOENT<br>
stat64("/usr/lib/libbz2.so.1", 0x08047160) = 0<br>resolvepath("/usr/lib/libbz2.so.1", "/usr/lib/libbz2.so.1", 1023) = 20<br>open("/usr/lib/libbz2.so.1", O_RDONLY) = 3<br>
mmapobj(3, MMOBJ_INTERPRET, 0xFEF80A58, 0x080471CC, 0x00000000) = 0<br>close(3) = 0<br>memcntl(0xFEF50000, 6184, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF40000<br>
stat64("/lib/libc.so.1", 0x08047160) = 0<br>resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14<br>open("/lib/libc.so.1", O_RDONLY) = 3<br>mmapobj(3, MMOBJ_INTERPRET, 0xFEF40080, 0x080471CC, 0x00000000) = 0<br>
close(3) = 0<br>memcntl(0xFEDF0000, 187200, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br>mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEDE0000<br>
getcontext(0x08047810)<br>getrlimit(RLIMIT_STACK, 0x08047808) = 0<br>getpid() = 12236 [12235]<br>lwp_private(0, 1, 0xFEDE2A40) = 0x000001C3<br>setustack(0xFEDE2AA0)<br>
sysi86(SI86FPSTART, 0xFEF38CD4, 0x0000133F, 0x00001F80) = 0x00000001<br>schedctl() = 0xFEDDA000<br>sigaction(SIGSEGV, 0x08047BD0, 0x08047C50) = 0<br>sigaction(SIGBUS, 0x08047BD0, 0x08047C50) = 0<br>
sysconfig(_CONFIG_PAGESIZE) = 4096<br>ioctl(1, TCGETA, 0x08047B80) = 0<br>fstat64(2, 0x08046C00) = 0<br>bzip2write(2, " b z i p 2", 5) = 5<br>
: I won't write compressed data to a terminal.<br>write(2, " : I w o n ' t w r".., 47) = 47<br>bzip2write(2, " b z i p 2", 5) = 5<br>: For help, type: `write(2, " : F o r h e l p , ".., 19) = 19<br>
bzip2write(2, " b z i p 2", 5) = 5<br> --help'.<br>write(2, " - - h e l p ' .\n", 10) = 10<br>_exit(1)</blockquote><div><br></div><div>Non-working system:</div><div>
<br></div><div>execve("bzip2", 0x080478B4, 0x080478BC) argc = 1</div><div>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFF0000</div><div>resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12</div>
<div>getcwd("/db/pub/eq/csw/opt/csw/bin", 1017) = 0</div><div>resolvepath("/db/pub/eq/csw/opt/csw/bin/bzip2", "/db/pub/eq/csw/opt/csw/bin/bzip2", 1023) = 32</div><div>sysconfig(_CONFIG_PAGESIZE) = 4096</div>
<div>stat64("/db/pub/eq/csw/opt/csw/bin/bzip2", 0x08047640) = 0</div><div>open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT</div><div>stat64("/db/pub/eq/csw/opt/csw/bdb48/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div>
<div>stat64("/db/pub/eq/csw/opt/csw/lib/svn/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/csw/opt/csw/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/tools/lib/boost/current/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div>
<div>stat64("/usr/sfw/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/tools/lib/log4cplus/current/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/tools/lib/xerces-c/current/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div>
<div>stat64("/db/pub/eq/tools/lib/omex/current/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("./libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("/data/oracle/product/client/<a href="http://11.2.0.1/lib/libc.so.1">11.2.0.1/lib/libc.so.1</a>", 0x08046EE0) Err#2 ENOENT</div>
<div>stat64("/db/pub/eq/tools/lib/quickfix/current/lib/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/Marvin//Libs/libc.so.1", 0x08046EE0) Err#2 ENOENT</div><div>stat64("./libc.so.1", 0x08046EE0) Err#2 ENOENT</div>
<div>stat64("/lib/libc.so.1", 0x08046EE0) = 0</div><div>resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14</div><div>open("/lib/libc.so.1", O_RDONLY) = 3</div>
<div>mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFEFB0000</div><div>mmap(0x00010000, 1212416, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE80000</div><div>mmap(0xFEE80000, 1105861, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEE80000</div>
<div>mmap(0xFEF9E000, 30311, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1105920) = 0xFEF9E000</div><div>mmap(0xFEFA6000, 4256, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFEFA6000</div>
<div>munmap(0xFEF8E000, 65536) = 0</div><div>memcntl(0xFEE80000, 124344, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0</div><div>close(3) = 0</div><div>mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEF90000</div>
<div>munmap(0xFEFB0000, 32768) = 0</div><div>getcontext(0x080474B0)</div><div>getrlimit(RLIMIT_STACK, 0x080474A8) = 0</div><div>getpid() = 8908 [8907]</div>
<div>lwp_private(0, 1, 0xFEF92A00) = 0x000001C3</div><div>setustack(0xFEF92A60)</div><div>sysi86(SI86FPSTART, 0xFEFA6750, 0x0000133F, 0x00001F80) = 0x00000001</div><div>sysconfig(_CONFIG_PAGESIZE) = 4096</div>
<div>brk(0x080615C0) = 0</div><div>brk(0x080635C0) = 0</div><div>stat64("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3", 0x08046880) = 0</div>
<div>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</div><div>open("/usr/lib/locale/en_AU.ISO8859-1/en_AU.ISO8859-1.so.3", O_RDONLY) = 3</div>
<div>mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFEFB0000</div><div>mmap(0x00010000, 86016, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE60000</div><div>mmap(0xFEE60000, 14986, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEE60000</div>
<div>mmap(0xFEE73000, 5010, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 12288) = 0xFEE73000</div><div>munmap(0xFEE64000, 61440) = 0</div><div>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFC0000</div>
<div>memcntl(0xFEE60000, 5500, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0</div><div>close(3) = 0</div><div>stat64("/db/pub/eq/csw/opt/csw/bdb48/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div>
<div>stat64("/db/pub/eq/csw/opt/csw/lib/svn/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/csw/opt/csw/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/tools/lib/boost/current/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div>
<div>stat64("/usr/sfw/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/tools/lib/log4cplus/current/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/tools/lib/xerces-c/current/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div>
<div>stat64("/db/pub/eq/tools/lib/omex/current/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("./libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("/data/oracle/product/client/<a href="http://11.2.0.1/lib/libc.so.1">11.2.0.1/lib/libc.so.1</a>", 0x080467E0) Err#2 ENOENT</div>
<div>stat64("/db/pub/eq/tools/lib/quickfix/current/lib/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("/db/pub/eq/Marvin//Libs/libc.so.1", 0x080467E0) Err#2 ENOENT</div><div>stat64("./libc.so.1", 0x080467E0) Err#2 ENOENT</div>
<div>munmap(0xFEFB0000, 32768) = 0</div><div>open("/proc/self/auxv", O_RDONLY) = 3</div><div>fxstat(2, 3, 0x080477D0) = 0</div><div>read(3, "D807\0\0EF7F04\bDE07\0\0".., 168) = 168</div>
<div>close(3) = 0</div><div>sysinfo(SI_ISALIST, "amd64 pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86", 255) = 68</div><div>access("amd64/bzip2", X_OK) = 0</div>
<div>execve("amd64/bzip2", 0x080478B4, 0x080478BC) argc = 1</div><div>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF3F0000</div><div>resolvepath("/usr/lib/amd64/ld.so.1", "/lib/amd64/ld.so.1", 1023) = 18</div>
<div>getcwd("/db/pub/eq/csw/opt/csw/bin", 1011) = 0</div><div>resolvepath("/db/pub/eq/csw/opt/csw/bin/amd64/bzip2", "/db/pub/eq/csw/opt/csw/bin/amd64/bzip2", 1023) = 38</div><div>stat("/db/pub/eq/csw/opt/csw/bin/amd64/bzip2", 0xFFFFFD7FFFDFF540) = 0</div>
<div>open("/var/ld/64/ld.config", O_RDONLY) Err#2 ENOENT</div><div>stat("/db/pub/eq/csw/opt/csw/bdb48/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/db/pub/eq/csw/opt/csw/lib/svn/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div>
<div>stat("/db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) = 0</div><div>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</div>
<div>open("/db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0", O_RDONLY) = 3</div><div>mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFFFFFD7FFF3A0000</div><div>close(3) = 0</div>
<div>stat("/db/pub/eq/tools/lib/boost/current/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/usr/sfw/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/db/pub/eq/tools/lib/log4cplus/current/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div>
<div>stat("/db/pub/eq/tools/lib/xerces-c/current/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/db/pub/eq/tools/lib/omex/current/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div>
<div>stat("./libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/data/oracle/product/client/<a href="http://11.2.0.1/lib/libbz2.so.1.0">11.2.0.1/lib/libbz2.so.1.0</a>", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div>
<div>stat("/db/pub/eq/tools/lib/quickfix/current/lib/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/db/pub/eq/Marvin//Libs/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>
stat("./libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF390000</div><div>stat("/opt/csw/lib/amd64/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div>
<div>stat("/lib/64/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>stat("/usr/lib/64/libbz2.so.1.0", 0xFFFFFD7FFFDFEE60) Err#2 ENOENT</div><div>ld.so.1: bzip2: fatal: /db/pub/eq/csw/opt/csw/lib/libbz2.so.1.0: wrong ELF class: ELFCLASS32</div>
<div>write(2, " l d . s o . 1 : b z i".., 93) = 93</div><div>munmap(0xFFFFFD7FFF3A0000, 32768) = 0</div><div>lwp_self() = 1 </div></div><div><br><div class="gmail_quote">
On Thu, Jul 28, 2011 at 07:12, Dagobert Michelsen <span dir="ltr"><<a href="mailto:dam@opencsw.org">dam@opencsw.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
Am 27.07.2011 um 21:57 schrieb Maciej Bliziñski:<br>
<div class="im">> >> bash$ ./gdb<br>
> >> ld.so.1: gdb: fatal: /db/pub/eq/csw/opt/csw/lib/libncurses.so.5: wrong ELF class: ELFCLASS32<br>
> >> Killed<br>
> ><br>
> ><br>
> > Uname on the root-access box (on which OpenCSW was installed):<br>
> ><br>
> >> SunOS puppet 5.11 snv_151a i86pc i386 i86pc Solaris<br>
> ><br>
> ><br>
> > Uname on the limited-access box (where we are trying to run the tranplanted binaries):<br>
> ><br>
> >> SunOS eqaegd05 5.10 Generic_144489-06 i86pc i386 i86pc<br>
> ><br>
> ><br>
> > Both bzip2 and libbz2.so appear to be 32-bit (at least from what I can tell):<br>
> ><br>
> >> bash$ file bzip2<br>
> >> bzip2: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available<br>
><br>
> Can you look at the inode number of the bzip2 binary and the isaexec binary? Is it the same?<br>
><br>
> >> bash$ file ../lib/libbz2.so<br>
> >> ../lib/libbz2.so: ELF 32-bit LSB dynamic lib 80386 Version 1 [FPU], dynamically linked, stripped<br>
> ><br>
> ><br>
> > What would be causing this error? And how would I fix it?<br>
><br>
> 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.<br>
><br>
> LD_LIBRARY_PATH='/db/pub/eq/csw/opt/csw/lib/64'<br>
><br>
> Or<br>
><br>
> LD_LIBRARY_PATH='/db/pub/eq/csw/opt/csw/lib/$ISALIST<br>
<br>
</div>I would say isaexec. Try<br>
LD_LIBRARY_PATH_32=/db/pub/eq/csw/opt/csw/lib<br>
LD_LIBRARY_PATH_64=/db/pub/eq/csw/opt/csw/lib/64<br>
<br>
Please see ld.so.1(1) for details.<br>
<br>
<br>
Best regards<br>
<br>
-- Dago<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.opencsw.org">users@lists.opencsw.org</a><br>
<a href="https://lists.opencsw.org/mailman/listinfo/users" target="_blank">https://lists.opencsw.org/mailman/listinfo/users</a></blockquote></div><br></div></div>