*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> compat_svr4 (8)              



NAME    [Toc]    [Back]

     compat_svr4 - setup for running  SVR4/iBCS2  binaries  under

DESCRIPTION    [Toc]    [Back]

     OpenBSD supports running SVR4/iBCS2 binaries.  This code has
been tested
     on i386 and sparc systems.  Most programs should  work,  but
not ones that
     use or depend on:

           kernel internal data structures
           the  /proc filesystem
           the ticotsord loopback rpc mechanism (NIS uses this)
           sound and video interfaces
           threads (ttsession uses threads)
           the streams administrative driver

     The  SVR4  compatibility  feature is active for kernels compiled with the
     COMPAT_SVR4 option and kern.emul.svr4 sysctl(8) enabled.

     Most SVR4 programs are dynamically linked.  This means  that
the shared
     libraries that the programs depend on and the runtime linker
are also
     needed.  Additionally, a "shadow root"  directory  for  SVR4
binaries on the
     OpenBSD  system  will have to be created.  This directory is
     /emul/svr4.  Any file operations done by SVR4  programs  run
under OpenBSD
     will  look  in  this directory first.  So, if a SVR4 program
opens, for example,
  /etc/passwd,  OpenBSD  will  first   try   to   open
     and if that does not exist open the `real' /etc/passwd file.
It is recommended
  that  SVR4  packages  that  include  configuration
files, etc., be
     installed  under  /emul/svr4, to avoid naming conflicts with
     OpenBSD counterparts.  Shared libraries should also  be  installed in the
     shadow tree.

     The simplest way to set up the system for SVR4 binaries is:
     1.   Make the necessary directories:

                (me@openbsd) mkdir -p /emul/svr4/{dev,etc}
                (me@openbsd) mkdir -p /emul/svr4/usr/{bin,lib}
                (me@openbsd)    mkdir   -p   /emul/svr4/usr/openwin/{bin,lib}

     2.   Copy files from an SVR4 system:

                (me@svr4) cd /usr/lib
                (me@svr4) tar -cf - . |                       rsh
openbsd 'cd /emul/svr4/usr/lib; tar -xpf -'

          If OpenWindows is going to be run:

                (me@svr4) cd /usr/openwin/lib
                (me@svr4)  tar -cf - . |                      rsh
openbsd 'cd /emul/svr4/usr/openwin/lib; tar -xpf -'

     3.   Set up the configuration files and devices:

                (me@openbsd) cd /usr/src/etc/etc.svr4
                (me@openbsd)    cp    netconfig     nsswitch.conf
                (me@openbsd) cp SVR4_MAKEDEV /emul/svr4/dev
                (me@openbsd)  cd  /emul/svr4/dev; sh SVR4_MAKEDEV

     An alternative method is to mount a whole SVR4 partition  in
     and  then  override  with  other  mounts  /emul/svr4/etc and

     Clearly, a complete SVR4 /dev directory cannot  be  used  as
     because  other  device  nodes, such as /dev/null, need to be
OpenBSD device

BUGS    [Toc]    [Back]

     Many system calls are still not emulated.  The streams  emulation is incomplete
 (socketpair does not work yet).

     Most  SVR4 executables can not handle directory offset cookies > 32 bits.
     More recent ones, compiled for large file  support  (Solaris
2.6 and up)
     can.   With  older programs, the message "svr4_getdents: dir
offset too
     large for emulated program" will appear when  this  happens.
     this  can  only  happen  on NFS mounted filesystems, mounted
from servers
     that return offsets with information in the upper  32  bits.
These errors
     should  rarely  happen,  but can be avoided by mounting this
filesystem with
     the -2 option to mount_nfs(8).

OpenBSD      3.6                           July      6,      1996
[ Back ]
 Similar pages
Name OS Title
compat_ibcs2 OpenBSD setup for running iBCS2 binaries under emulation
compat_hpux OpenBSD setup for running HP-UX binaries under emulation
compat_osf1 OpenBSD setup for running OSF/1 binaries under emulation
compat_freebsd OpenBSD setup for running FreeBSD binaries under emulation
compat_linux OpenBSD setup for running Linux binaries under emulation
compat_sunos OpenBSD setup for running SunOS binaries under emulation
compat_ultrix OpenBSD setup for running Ultrix binaries under emulation
compat_bsdos OpenBSD setup for running BSDI binaries under emulation
compat_aout OpenBSD setup for running a.out OpenBSD binaries on ELF systems
intro IRIX introduction to SVR4 networking functions and libraries
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service