I am running FreeBSD on a Sony VAIO-ZX1SP (Centrino, 512Mb Ram) The current kernel is RELENG-6_1, cvsupped Aug 12 at 19:58 UTC. The kernel configuration includes: options COMPAT_LINUX options LINPROCFS I have completely pkg_delete'd any linux packages, then deleted /compat/linux. At startup, I run: if [ -x /compat/linux/sbin/ldconfig ]; then /compat/linux/sbin/ldconfig fi I updated ports with cvsup on 14 Aug at 18:31 UTC, then did an install of /usr/ports/www/linux-opera, which also installed linux-aspell-0.50.4.1_1 linux-expat-1.95.8 linux-fontconfig-2.2.3_5 linux-opera-9.01.20060728_1 linux-xorg-libs-6.8.2_5 linux_base-fc-4_7 My environment does not contain any LD_* settings. sysctl -a " grep linux gives: compat.linux.osname: Linux compat.linux.osrelease: 2.4.2 compat.linux.oss_version: 198144 Yet, when I try to run linux opera I get: jes@jes-2.demon.nl:/home/jes% printenv | grep LD_ jes@jes-2.demon.nl:/home/jes% linux-opera ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored. /usr/local/share/linux-opera/bin/opera: error while loading shared libraries: /usr/lib/libpthread.so.0: ELF file OS ABI invalid jes@jes-2.demon.nl:/home/jes% In fact, if I try: jes@jes-2.demon.nl:/home/jes% /compat/linux/bin/ls /tmp /compat/linux/bin/ls: error while loading shared libraries: /usr/lib/libpthread.so.0: ELF file OS ABI invalid I've been struggling with this for a while and would like some help (there are some other linux binaries I'd like to be able to run as well). Kernel config and dmesg.boot available on request, I've attached a bzip2'ed kdump from a ktrace of running (as root) # ktrace -i /compat/linux/bin/ls /tmp /compat/linux/bin/ls: error while loading shared libraries: /usr/lib/libpthread.so.0: ELF file OS ABI invalid # How-To-Repeat: Anything trying to load libpthread fails
I forgot to attach the kdump output file -- Jim Segrave jes@jes-2.demon.nl
Responsible Changed From-To: freebsd-ports-bugs->freebsd-emulation Over to maintainer
From your kdump.out: ----- 13316 ls NAMI "/compat/linux/usr/lib/libpthread.so.0" 13316 ls NAMI "/usr/lib/libpthread.so.0" 13316 ls RET open 3 13316 ls CALL read(0x3,0xbfbfe42c,0x200) 13316 ls GIO fd 3 read 512 bytes ----- Can you tell me what is the file /usr/lib/libpthread.so.0? At my FreeBSD-6.1 I have only /usr/lib/libpthread.so.2. Is it a stale/old file or did you create a symlink for some purpose? What if you delete (or temporarily move away) this file?
State Changed From-To: open->feedback Awaiting for a feedback.
I last cvsupped the ports tree (capture of cvsup output in this file) -rw-r--r-- 1 root wheel 38174 Aug 14 20:31 ports.cvsupdate This is with a ports-all cvsup file Today (22 Aug) I did a pkg_delete of all linux packages, umount /usr/compat/linux/proc rm -rf /compat/linux I then went to /usr/ports/emulators/linux_base-fc4 and did make distclean make install After this I checked for libpthreads with a find / -name libpthread\* | tee /tmp/libpthread.find This produced: /usr/lib/libpthread.a /usr/lib/libpthread_p.a /usr/lib/libpthread.so.1 /usr/lib/libpthread.so /usr/lib/libpthread.so.0 /usr/lib/libpthread.so.2 /usr/local/lib/compat/libpthread.so.1 /usr/src/lib/libpthread /usr/src/lib/libthread_db/arch/alpha/libpthread_md.c /usr/src/lib/libthread_db/arch/amd64/libpthread_md.c /usr/src/lib/libthread_db/arch/i386/libpthread_md.c /usr/src/lib/libthread_db/arch/ia64/libpthread_md.c /usr/src/lib/libthread_db/arch/sparc64/libpthread_md.c /usr/src/lib/libthread_db/libpthread_db.c /usr/src/lib/libthread_db/libpthread_db.h /usr/compat/linux/lib/obsolete/linuxthreads/libpthread-0.10.so /usr/compat/linux/lib/obsolete/linuxthreads/libpthread.so.0 /usr/compat/linux/lib/libpthread-2.3.6.so /usr/compat/linux/lib/libpthread.so.0 /usr/obj/usr/src/tmp/usr/lib/libpthread.a /usr/obj/usr/src/tmp/usr/lib/libpthread.so.2 /usr/obj/usr/src/tmp/usr/lib/libpthread.so /usr/obj/usr/src/lib/libpthread /usr/obj/usr/src/lib/libpthread/libpthread.a /usr/obj/usr/src/lib/libpthread/libpthread.so /usr/obj/usr/src/lib/libpthread/libpthread.so.2 /usr/obj/usr/src/lib/libpthread/libpthread_p.a /usr/obj/usr/src/lib/libthread_db/libpthread_db.o /usr/obj/usr/src/lib/libthread_db/libpthread_md.o /usr/obj/usr/src/lib/libthread_db/libpthread_db.So /usr/obj/usr/src/lib/libthread_db/libpthread_md.So /usr/obj/usr/src/lib/libthread_db/libpthread_db.po /usr/obj/usr/src/lib/libthread_db/libpthread_md.po /usr/ports/emulators/linux_base-fc4/work/lib/libpthread-2.3.6.so /usr/ports/emulators/linux_base-fc4/work/lib/libpthread.so.0 /usr/ports/emulators/linux_base-fc4/work/lib/obsolete/linuxthreads/libpt= hread-0.10.so /usr/ports/emulators/linux_base-fc4/work/lib/obsolete/linuxthreads/libpt= hread.so.0 /tmp/libpthread.find So I have to conclude that the libpthread.so.0 was installed by = linux_base-fc4 And it still fails the same way: root@jes-2.demon.nl:/usr/ports/emulators/linux_base-fc4# set | grep LD OLDPWD=3D/usr/ports/emulators/linux_base-8 root@jes-2.demon.nl:/usr/ports/emulators/linux_base-fc4# = /usr/compat/linux/bin/ls /usr/compat/linux/bin/ls: error while loading shared libr aries: /usr/lib/libpthread.so.0: ELF file OS ABI invalid root@jes-2.demon.nl:/usr/ports/emulators/linux_base-fc4#
This problem was cleared by deleting a rather ancient FreeBSD /usr/lib/libpthread.so.0 which was no longer used by any application. I admit to being puzzled why the existence of such a FreeBSD file would have any effect, but removing it was sufficient to clear the problem.
This problem was cured by deleting an ancient FreeBSD /usr/lib/libpthread.so.0, which was unused by any program. I'm still unclear as to why a Linux application would see that library, but somehow that was happening.
State Changed From-To: feedback->closed The submitter deleted the stale file and the problem has gone. Thanks for the feedback!