misc/102474: linux_base-fc-4_8 appears broken, does not allow to run Linux binaries

Markus Hoenicka markus at mhoenicka.de
Thu Aug 24 11:20:24 UTC 2006


>Number:         102474
>Category:       misc
>Synopsis:       linux_base-fc-4_8 appears broken, does not allow to run Linux binaries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 24 11:20:23 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Markus Hoenicka
>Release:        6.1-RELEASE
>Organization:
>Environment:
FreeBSD yeti.mininet 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
After setting up Linux binary support as per the handbook and the additional instructions displayed during the installation (using the linux_base-fc-4_8 port as of 2006-08-23), both some programs contained in the port as well as external Linux binaries behave strangely. ldconfig more or less works:

yeti# /compat/linux/sbin/ldconfig -v
/compat/linux/sbin/ldconfig: PATH `/lib' given more than once
/compat/linux/sbin/ldconfig: PATH `/usr/lib' given more than once
/lib:
  libpcre.so.0 -> libpcre.so.0.0.1
[lot more output to follow...]

However, Linux ldd can't display which libraries are used by Linux ldconfig:
yeti# /compat/linux/usr/bin/ldd /compat/linux/sbin/ldconfig
/compat/linux/usr/bin/ldd: /lib/ld-linux.so.2: not found
ldd: /lib/ld-linux.so.2 $exited with unknown exit code (127)

And you can't run a Linux binary installed by a port which only depends on linux_base-fc-4_8:
yeti# /usr/local/bin/915resolution
915resolution: error while loading shared libraries: /usr/lib/libc.so.6: ELF file OS ABI invalid

>How-To-Repeat:
In order to return to a clean state, I've removed everything Linuxish from my box.  This is not required to see the problem, but it is meant to show that the failure does not depend on a botched system installation:

- pkg_delete all linux_? ports
- unmount linprocfs
- rm -r /compat/linux
- remove the linprocfs entry from /etc/fstab
- remove the Linux ABI support from /etc/rc.conf
- reboot

Now I should have a box without any Linux stuff left over.

- cd /usr/ports/emulators/linux_base-fc-4
- make && make install
- add "linproc /compat/linux/proc linprocfs rw 0 0" to /etc/fstab
- add the Linux ABI support to /etc/rc.conf: linux_enable="YES"
- reboot (or mount linproc manually)
- verify that Linux support is in the kernel: "kldstat|grep linux" returns linux.ko
- verify that linproc is mounted: "mount" returns linprocfs on /usr/compat/linux/proc (linprocfs, local)
- cd /usr/ports/sysutils/915resolution
- make && make install
- run /usr/local/bin/915resolution, or any of the abovementioned Linux commands, to see the errors
>Fix:
none
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list