COMPAT_DARWIN(8)

NAME
compat_darwin - setup procedure for running Darwin binaries from MacOS X

DESCRIPTION
NetBSD supports running Darwin binaries. This works on PowerPC ports, and i386 should be supported in the future. For now, most text based and X11 based program should work. Applications using the Quartz displaying system may work, but local display is not yet supported: running MacOS X's Quartz display server on NetBSD is a work in progress.

The Darwin compatibility feature is active for kernels compiled with the COMPAT_DARWIN, COMPAT_MACH, and EXEC_MACHO options enabled.

All Darwin binaries are dynamically linked. As COMPAT_DARWIN only emulates the Darwin system calls, you will need various Darwin userland files, such as the shared libraries and the dynamic linker. Theses files are kept in a “shadow root” directory, named /emul/darwin. Each time a Darwin binary has to use a file, it will look it up in /emul/darwin first. This feature is used to prevent conflict between native and foreign libraries and configuration files.

There are two ways of setting up the /emul/darwin tree.

1.  The easiest way is to install the Darwin library package in pkgsrc/emulators/darwin_lib. This package uses files provided by the OpenDarwin project. Therefore, it does not contain Apple's MacOS X proprietary libraries, which are required in order to run any Quartz-based application. If you need some files not installed by the package, read on.

2.  You can also install Darwin or MacOS X files in /emul/darwin by hand. To do this, you need a Darwin system. In order to know what libraries a program needs, just use the
        otool -L program
    command on Darwin. Alternatively, you can use ktrace(1) and kdump(1) to discover what files the program attempts to open.

Please note that you need a valid MacOS X license if you copy Apple proprietary libraries and programs from a MacOS X system.

SEE ALSO
kdump(1), ktrace(1), options(4)

AUTHORS
COMPAT_DARWIN and COMPAT_MACH layers were written by Emmanuel Dreyfus <manu@NetBSD.org> with some help from Christos Zoulas <christos@NetBSD.org>

EXEC_MACHO was integrated into NetBSD by Christos Zoulas <christos@NetBSD.org>.

The pkgsrc/emulators/darwin_lib package was created by James Whitwell <abacau@yahoo.com.au>.

BUGS
Many. COMPAT_DARWIN is still very experimental.