kern/46576: FreeBSD 4.6 broke linux emulation install w/SVR4 emulation enabled.

Dan Strick strick at covad.net
Fri Aug 27 02:20:26 PDT 2004


>
> Synopsis: FreeBSD 4.6 broke linux emulation install w/SVR4 emulation enabled.
>
> ...
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=46576
>

I believe I also submitted a PR on this one a while back.

The cause of the problem seems to be that Linux (or at least the Redhat
Linux executable binaries used by most of the Linux emulation ports)
uses the ELF OS ABI code assigned for SYSV (which happens to be zero)
and not the code assigned for LINUX.  Perhaps Linux ELF executables are
simply not branded by default.

(See the symbols ELFOSABI* defined in /usr/include/sys/elf_common.h.)

I won't speculate as to whose "fault" this is.  The upshot is that if
you have enabled both the SVR4 and LINUX emulators, FreeBSD may choose
the wrong emulator some of the time.  I vaguely recall that there is
a sysctl variable that can establish a default brand other than zero.
I don't see how this can help if you have both Linux and SVR4 binaries
on your system.

Since I didn't actually have any SVR4 binaries to run at the time, my
workaround was simply to disable the SVR4 emulator.  I think I recently
read in one of the FreeBSD mailing lists that SVR4 emulation is scheduled
for the scrap heap since nobody seems to be using it.  Perhaps this is
one reason why.

Perhaps the Linux emulator ports should rebrand all Linux ELF files
before installing them.

Dan Strick
strick at covad.net


More information about the freebsd-bugs mailing list