p The exceptions include programs that use the .Tn SunOS kvm library, and various system calls, .Fn ioctl Ns '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.
p Static executables will normally run without any extra setup. This procedure details the directories and files that must be set up to allow dynamically linked executables to work.
p The files you need are on your .Tn SunOS machine. You need to worry about the legal issues of ensuring that you have a right to use the required files on your machine. On your .Nx machine, do the following: l -enum -offset 123 t .Li mkdir -p /emul/sunos/usr/lib /emul/sunos/usr/5lib t .Li cp SunOS:/usr/lib/lib*.so.*.* NetBSD:/emul/sunos/usr/lib t .Li cp SunOS:/usr/5lib/lib*.so.*.* NetBSD:/emul/sunos/usr/5lib t .Li cp SunOS:/usr/lib/ld.so NetBSD:/emul/sunos/usr/lib/ld.so t If you ever expect to use YP, you will want to create a link: d -literal -compact ln -s /var/run/ypbind.lock /etc/ypbind.lock .Ed .El
p Alternatively, you can use an NFS mount to accomplish the same effect. On your .Nx machine, do the following: l -enum -offset 123 t .Li mkdir -p /emul/sunos/usr t .Li mount SunOS:/usr /emul/sunos/usr .El
p This will place the .Tn SunOS libraries on your .Nx machine in a location where the .Tn SunOS compatibility code will look for first, where they do not conflict with the standard libraries. .Sh NOTES When using .Nm on .Nx Ns Tn /sparc64 , the .Dv COMPAT_NETBSD32 option must also be used. .Sh BUGS A list of things which fail to work in compatibility mode should be here.
p .Tn SunOS executables can not handle directory offset cookies > 32 bits. Should such an offset occur, you will see the message .Dq sunos_getdents: dir offset too large for emulated program . Currently, 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 offset translation enabled. See the .Fl X option to .Xr mount_nfs 8 . The .Fl 2 option to .Xr mount_nfs 8 will also have the desired effect, but is less preferable.
p The .Nx Ns Tn /sparc64 support is less complete than the other ports.