180 lines
6.3 KiB
Text
180 lines
6.3 KiB
Text
$NetBSD: README.MacOSX,v 1.29 2016/01/06 07:15:23 yyamano Exp $
|
|
|
|
This file describes the use of current versions of pkgsrc with
|
|
multiple versions of Darwin and OS X, omitting information about previous pkgsrc
|
|
versions.
|
|
|
|
* Darwin vs OS X
|
|
|
|
(Apple has renamed Mac OS X to OS X, but the filename
|
|
remains.)
|
|
|
|
OS X consists of Darwin (kernel/userland) plus Mac stuff on top.
|
|
pkgsrc used to target Darwin, but given the tools issued discussed
|
|
below it is not clear that it works on Darwin without OS X. Darwin
|
|
from Apple is no longer open source.
|
|
|
|
Users of non-OS X Darwin are invited to submit patches to this file.
|
|
The only known project is:
|
|
http://www.puredarwin.org/
|
|
|
|
Until then, this file remains OS X-centric.
|
|
|
|
* OS X specific bootstrap arguments
|
|
|
|
Providing the --binary-macpkg flag to the bootstrap script causes it
|
|
to prepare a bootstrap kit as a native OS X package instead of using
|
|
the conventional .tar.bz2 format. This requires the package-maker
|
|
application to be installed.
|
|
|
|
* system tools issues
|
|
|
|
** native headers vs SDK
|
|
|
|
OS X used to include system headers in /usr/include, so that one
|
|
could treat it like a relatively normal POSIX system. Starting at
|
|
approximately 10.9, headers were no longer available at the standard
|
|
location, and one has to use an SDK that puts headers someplace else.
|
|
pkgsrc supports this, but there has been some confusion where a 10.9
|
|
system produced binaries for 10.10, which only mostly works. The
|
|
confusion is believed to be resolved.
|
|
|
|
** gcc vs clang
|
|
|
|
Older versions of OS X (when XCode is installed) provided gcc, and
|
|
pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present.
|
|
|
|
** i386 vs x86_64 ABI issue
|
|
|
|
OS X 10.6 and higher supports x86-64 binaries on Intel Macs with
|
|
x86-64 processors, which is now most of them.
|
|
|
|
This has caused problems with packages which get confused because
|
|
"MACHINE_ARCH" is in some OS versions set to "i386" (on a 64-bit
|
|
system!).
|
|
version: uname -m : uname -p
|
|
10.6: i386 : i386
|
|
10.9: x86_64 : i386
|
|
|
|
On Intel machines, pkgsrc currently defaults to i386 mode (--abi=32)
|
|
on OS X, and can be set to x86_64 mode (--abi=64).
|
|
Note that a pkgsrc build in x86_64 mode will not run on an Intel Mac
|
|
that is i386 only. For a longer discussion, see:
|
|
http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html
|
|
|
|
As of 2015-11, changing the default to x86_64 is imminent.
|
|
|
|
** sed in 10.9
|
|
|
|
The sed that comes with 10.9 appears to be broken; it exits when
|
|
called on files with UTF-8 or other apparently-binary content.
|
|
Therefore, pkgsrc uses nbsed on 10.9.
|
|
|
|
* Developer tools and prerequisites
|
|
|
|
** XCode
|
|
|
|
This section applies to 10.6 through 10.10.
|
|
|
|
If you haven't already, you will need to install the OS X
|
|
Developer Tools package (XCode) to obtain a compiler, etc. The
|
|
procedure depends on the version of OS X; recent versions use the
|
|
App Store.
|
|
|
|
** Command-line Tools
|
|
|
|
In 10.11, XCode has been reported as unsuitable [TODO: add details,
|
|
but it seems it doesn't include an SDK for itself]. Instead, it is
|
|
recommend to install command-line tools.
|
|
|
|
Command Line Tools for Xcode can be obtained from
|
|
https://developer.apple.com/downloads/
|
|
|
|
** cvs
|
|
|
|
Note that as of 10.9, cvs is no longer provided by Apple. You can build
|
|
devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs,
|
|
it may be useful to `git clone https://github.com/jsonn/pkgsrc.git`.
|
|
|
|
** X11
|
|
|
|
X11 used to be built into OS X, but as of 10.8 it is no longer
|
|
included. You can install XQuartz from
|
|
http://xquartz.macosforge.org/landing/, or try the newly-added pkgsrc
|
|
version.
|
|
|
|
* OS X Versions
|
|
|
|
Because Apple drops support for previous hardware faster than the
|
|
hardware fails, many machines cannot be upgraded to recent versions of
|
|
OS X, creating a greater than usual desire to support old systems.
|
|
Because of the particular history of deprecation, most systems tend to
|
|
run relatively recent versions or specific older versions (10.6 and
|
|
10.5).
|
|
|
|
The stance of pkgsrc is generally to avoid breaking older systems
|
|
unless keeping support would cause difficulty, and to accept clean
|
|
patches when there is no harm to non-deprecated versions. This
|
|
section is partly to document what versions tend to be used and why,
|
|
and partly to enable cleaning up bug reports without fixes for very
|
|
old systems.
|
|
|
|
pkgsrc PRs about 10.5 or older that do not contain fixes may be closed
|
|
without fixing.
|
|
|
|
OS X 10.11 is considered new and there may be issues.
|
|
|
|
OS X 10.10 is considered current.
|
|
|
|
OS X 10.9 (Darwin 13.4.0) is considered current.
|
|
|
|
OS X 10.8 is old, and there are no no known reasons to it instead of a
|
|
newer version.
|
|
|
|
OS X 10.7 is the last version that works on a few Intel Macs, e.g. the
|
|
Mac Pro 1.1 and 2.1 and some Mac Minis.
|
|
|
|
OS X 10.6 is the last version that works on Intel Macs lacking amd64
|
|
support, e.g. Mac Minis and Macbooks with Core Duo. (There is an
|
|
active bulk build for 10.6.)
|
|
|
|
OS X 10.5 is the last version that works on PowerPC Macs. As of 2015
|
|
reports of using 10.5 are very rare.
|
|
|
|
OS X 10.4 (Darwin 8.11.0) is the last version that works on PowerPC G3
|
|
and slower G4 Macs.
|
|
|
|
* Bulk builds
|
|
|
|
Clearly, it is desirable for a bulk build to be useful on as many
|
|
computers as possible. The main issues are which ABI and which OS X
|
|
version. Targeting older versions makes a build run on more systems,
|
|
and targeting newer versions makes the build closer to what would be
|
|
obtained from bootstrapping on a newer version and thus avoids some
|
|
issues. This section has pointers to active bulk builds.
|
|
|
|
** 10.4, --abi=32 powerpc, gcc
|
|
|
|
Sevan Janiyan <Sevan@NetBSD.org> provides a bulk build for the -current branch
|
|
(--abi=32, OS X 10.4/PowerPC, gcc 4.0.1 from Xcode 2.5, X11_TYPE=modular):
|
|
https://www.geeklan.co.uk/?p=1579
|
|
US repo: http://sevan.mit.edu/packages
|
|
Euro mirror: http://pkgsrc.geeklan.co.uk/packages/current/Darwin-8
|
|
See
|
|
https://mail-index.netbsd.org/pkgsrc-bulk/2015/11/07/msg012171.html
|
|
|
|
** 10.6, --abi=32 i386, gcc
|
|
|
|
Joyent provide a bulk build for quarterly branches (--abi=32, OS X
|
|
10.6, and therefore gcc 4.2.1, XQuartz, X11_TYPE=native):
|
|
http://pkgsrc.joyent.com/install-on-osx/
|
|
which should run on any version from 10.6 and up.
|
|
|
|
Note that sed on 10.9 is broken, but a bootstrap on 10.6 will not
|
|
avoid it, so while one can install this bootstrap on 10.9 and run
|
|
binary packages, building packages will not in general work.
|
|
|
|
** 10.9, --abi=64 x86-64, clang
|
|
|
|
Joyent provide a bulk build for 10.9/x86_64, and therefore clang, at
|
|
the same URL as above.
|