To: None <current-users@sun-lamp.CS.Berkeley.EDU,>
From: Theo de Raadt <>
List: current-users
Date: 06/17/1994 15:41:24
for those of you with sparc machines, or m68k architectures that have
support for the sunos compat stuff, i wrote up a quick little manual
page. it explains the steps needed so that dynamically linked
executables will work.

it works for me, but i am not user much out of my sunos-compiled
/usr/local partition (which I mount over nfs from a sunos machine :-)

i include the man page so that people can play with it and report
problems to me.


COMPAT_SUNOS(8)         NetBSD System Manager's Manual         COMPAT_SUNOS(8)

     COMPAT_SUNOS - setup procedure for m68k and sparc architectures

     NETBSD/sparc and some of the NetBSD/m68k architectures can run SunOS exe-
     cutables. Most executables will work.

     The exceptions include programs that use the SunOS kvm library, and vari-
     ous system calls, ioctl()'s, or kernel semantics that are difficult to
     emulate.  The number of reasons why a program might fail to work is
     (thankfully) longer than the number of programs that fail to run.

     Static executables will normally run without any extra setup.  This pro-
     cedure details the directories and files that must be setup to allow dy-
     namically linked executables to work.

     The files you need are on your Sun machine.  You need to worry about the
     legal issues of ensuring that you have a right to use the required files
     on your machine.

     1.   On your NetBSD machine, do the following:
          mkdir /sun
          mkdir /sun/lib
          mkdir /sun/5lib
          ln -s /sun/5lib /usr/5lib

     2.   cp SunOS:/usr/lib/lib*.so.*.* NetBSD:/sun/lib

     3.   cp SunOS:/usr/5lib/lib*.so.*.* NetBSD:/sun/5lib

     4.   cp SunOS:/usr/lib/ NetBSD:/usr/lib/

     5.   On your NetBSD machine, edit the binary using a binary editor.
          In the binary, change every occurance of a path that starts with
          /usr so that it starts with /sun. Note that the strings "/usr" and
          "/sun" are the same length.

     This will place the SunOS libraries on your NetBSD machine in a location
     where they do not conflict with the standard libraries, and also teach
     the SunOS dynamic linker to search for the SunOS dynamic libraries in
     that place.

     A list of things which fail to work in compatibility mode should be here.

4th Berkeley Distribution        June 16, 1994                               1