2003-11-12 16:04:18 +03:00
|
|
|
.\" $NetBSD: compat_darwin.8,v 1.3 2003/11/12 13:04:18 grant Exp $
|
2003-09-29 13:56:04 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2003 Emmanuel Dreyfus
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed for the NetBSD Project
|
2003-09-29 14:05:35 +04:00
|
|
|
.\" by Emmanuel Dreyfus.
|
2003-09-29 13:56:04 +04:00
|
|
|
.\" 4. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.Dd September 29, 2003
|
|
|
|
.Dt COMPAT_DARWIN 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm compat_darwin
|
|
|
|
.Nd setup procedure for running Darwin binaries from MacOS X
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nx
|
2003-09-29 14:05:35 +04:00
|
|
|
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
|
2003-09-29 13:56:04 +04:00
|
|
|
.Nx
|
|
|
|
is a work in progress.
|
|
|
|
.Pp
|
2003-09-29 14:05:35 +04:00
|
|
|
The Darwin compatibility feature is active for kernels compiled
|
|
|
|
with the
|
2003-09-29 13:56:04 +04:00
|
|
|
.Dv COMPAT_DARWIN ,
|
|
|
|
.Dv COMPAT_MACH ,
|
|
|
|
and
|
|
|
|
.Dv EXEC_MACHO
|
|
|
|
options enabled.
|
|
|
|
.Pp
|
2003-09-29 14:05:35 +04:00
|
|
|
All Darwin binaries are dynamically linked.
|
|
|
|
As
|
2003-09-29 13:56:04 +04:00
|
|
|
.Dv COMPAT_DARWIN
|
2003-09-29 14:05:35 +04:00
|
|
|
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
|
2003-09-29 13:56:04 +04:00
|
|
|
.Dq shadow root
|
|
|
|
directory, named
|
|
|
|
.Pa /emul/darwin .
|
2003-09-29 14:05:35 +04:00
|
|
|
Each time a Darwin binary has to use a file, it will look it up in
|
|
|
|
.Pa /emul/darwin
|
|
|
|
first.
|
|
|
|
This feature is used to prevent conflict between native and foreign
|
|
|
|
libraries and configuration files.
|
2003-09-29 13:56:04 +04:00
|
|
|
.Pp
|
|
|
|
There are two ways of setting up the
|
2003-09-29 14:05:35 +04:00
|
|
|
.Pa /emul/darwin
|
2003-09-29 13:56:04 +04:00
|
|
|
tree.
|
|
|
|
.Bl -enum
|
|
|
|
.It
|
|
|
|
The easiest way is to install the Darwin library package in
|
|
|
|
.Pa pkgsrc/emulators/darwin_lib .
|
|
|
|
This package uses files provided by the OpenDarwin project.
|
2003-09-29 14:05:35 +04:00
|
|
|
Therefore, it does not contain Apple's MacOS X proprietary libraries,
|
2003-09-29 13:56:04 +04:00
|
|
|
which are required in order to run any Quartz-based application.
|
|
|
|
If you need some files not installed by the package, read on.
|
|
|
|
.It
|
2003-09-29 14:05:35 +04:00
|
|
|
You can also install Darwin or MacOS X files in
|
2003-09-29 13:56:04 +04:00
|
|
|
.Pa /emul/darwin
|
2003-09-29 14:05:35 +04:00
|
|
|
by hand.
|
|
|
|
To do this, you need a Darwin system.
|
|
|
|
In order to know what libraries a program needs, just use the
|
2003-09-29 13:56:04 +04:00
|
|
|
.Dl otool -L program
|
2003-09-29 14:05:35 +04:00
|
|
|
command on Darwin.
|
|
|
|
Alternatively, you can use
|
|
|
|
.Xr ktrace 1
|
2003-09-29 13:56:04 +04:00
|
|
|
and
|
|
|
|
.Xr kdump 1
|
2003-09-29 14:05:35 +04:00
|
|
|
to discover what files the program attempts to open.
|
2003-09-29 13:56:04 +04:00
|
|
|
.El
|
|
|
|
.Pp
|
2003-09-29 14:05:35 +04:00
|
|
|
Please note that you need a valid MacOS X license if you copy Apple
|
2003-09-29 13:56:04 +04:00
|
|
|
proprietary libraries and programs from a MacOS X system.
|
2003-09-29 14:05:35 +04:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr kdump 1 ,
|
|
|
|
.Xr ktrace 1 ,
|
|
|
|
.Xr options 4
|
|
|
|
.Sh AUTHORS
|
|
|
|
.Dv COMPAT_DARWIN
|
|
|
|
and
|
|
|
|
.Dv COMPAT_MACH
|
|
|
|
layers were written by
|
2003-11-12 16:04:18 +03:00
|
|
|
.An Emmanuel Dreyfus Aq manu@NetBSD.org
|
2003-09-29 14:05:35 +04:00
|
|
|
with some help from
|
2003-11-12 16:04:18 +03:00
|
|
|
.An Christos Zoulas Aq christos@NetBSD.org
|
2003-09-29 13:56:04 +04:00
|
|
|
.Pp
|
|
|
|
.Dv EXEC_MACHO
|
2003-09-29 14:05:35 +04:00
|
|
|
was integrated into
|
|
|
|
.Nx
|
2003-09-29 13:56:04 +04:00
|
|
|
by
|
2003-11-12 16:04:18 +03:00
|
|
|
.An Christos Zoulas Aq christos@NetBSD.org .
|
2003-09-29 13:56:04 +04:00
|
|
|
.Pp
|
2003-09-29 14:05:35 +04:00
|
|
|
The
|
|
|
|
.Pa pkgsrc/emulators/darwin_lib
|
|
|
|
package was created by
|
|
|
|
.An James Whitwell Aq abacau@yahoo.com.au .
|
|
|
|
.Sh BUGS
|
|
|
|
Many.
|
|
|
|
.Dv COMPAT_DARWIN
|
|
|
|
is still very experimental.
|