| @@ -1,61 +1,82 @@ | | | @@ -1,61 +1,82 @@ |
1 | $NetBSD: README.MacOSX,v 1.20 2015/02/22 17:11:34 gdt Exp $ | | 1 | $NetBSD: README.MacOSX,v 1.21 2015/11/06 15:48:52 gdt Exp $ |
| | | 2 | |
| | | 3 | This file describes the use of current versions of pkgsrc with |
| | | 4 | multiple versions of Mac OS X, omitting information about previous |
| | | 5 | pkgsrc versions. |
2 | | | 6 | |
3 | * system tools issues | | 7 | * system tools issues |
4 | | | 8 | |
| | | 9 | ** native headers vs SDK |
| | | 10 | |
| | | 11 | Mac OS X used to include system headers in /usr/include, so that one |
| | | 12 | could treat it like a relatively normal POSIX system. Starting at |
| | | 13 | approximately 10.9, headers were no longer available at the standard |
| | | 14 | location, and one has to use an SDK that puts headers someplace else. |
| | | 15 | pkgsrc supports this, but there has been some confusion where a 10.9 |
| | | 16 | system produced binaries for 10.10, which only mostly works. The |
| | | 17 | confusion is believed to be resolved. |
| | | 18 | |
5 | ** gcc vs clang | | 19 | ** gcc vs clang |
6 | | | 20 | |
7 | Older versions of Mac OS X (when XCode is installed) provided gcc, and | | 21 | Older versions of Mac OS X (when XCode is installed) provided gcc, and |
8 | pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present. | | 22 | pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present. |
9 | (In 2014Q2 and earlier, one must explicitly bootstrap with | | | |
10 | "--compiler=clang".) | | | |
11 | | | 23 | |
12 | ** i386 vs x86_64 ABI issue | | 24 | ** i386 vs x86_64 ABI issue |
13 | | | 25 | |
14 | Mac OS X 10.6 through 10.10 supports 64-bit binaries on most Intel | | 26 | Mac OS X 10.6 and higher supports x86-64 binaries on most Intel Macs. |
15 | Macs and builds those by default on such machine. This has caused | | 27 | This has caused problems with packages which get confused because |
16 | problems with packages which get confused because "MACHINE_ARCH" is in | | 28 | "MACHINE_ARCH" is in some OS versions set to "i386" (on a 64-bit |
17 | some OS versions set to "i386" (on a 64-bit system!). | | 29 | system!). |
18 | version: uname -m : uname -p | | 30 | version: uname -m : uname -p |
19 | 10.6: i386 : i386 | | 31 | 10.6: i386 : i386 |
20 | 10.9: x86_64 : i386 | | 32 | 10.9: x86_64 : i386 |
21 | | | 33 | |
22 | There are of course some packages which will fail in i386 mode, and | | 34 | On Intel machines, pkgsrc currently defaults to i386 mode (--abi=32) |
23 | some in x86_64 mode. Because of all this, the default for pkgsrc was | | 35 | on Mac OS X, and can be set to x86_64 mode (--abi=64). |
24 | set to use the 32-bit ABI, which results in packages being compiled | | 36 | Note that a pkgsrc build in x86_64 mode will not run on an Intel Mac |
25 | and run in i386 mode. In addition, there are some Intel Macs (older | | 37 | that is i386 only (some older Mac Minis and Macbooks). For a longer |
26 | Mac Minis) which can only run i386 and not x86_64. For a longer | | | |
27 | discussion, see: | | 38 | discussion, see: |
28 | http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html | | | |
29 | | | 39 | |
30 | As of 2014, the decision to default to i386 should probably be | | 40 | http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html |
31 | revisited. | | 41 | |
| | | 42 | As of 2015-11, changing the default to x86_64 is imminent. |
32 | | | 43 | |
33 | ** sed in 10.9 | | 44 | ** sed in 10.9 |
34 | | | 45 | |
35 | The sed that comes with 10.9 appears to be broken; it exits when | | 46 | The sed that comes with 10.9 appears to be broken; it exits when |
36 | called on files with UTF-8 or other apparently-binary content. | | 47 | called on files with UTF-8 or other apparently-binary content. |
37 | Therefore, pkgsrc uses nbsed on 10.9. | | 48 | Therefore, pkgsrc uses nbsed on 10.9. |
38 | | | 49 | |
39 | * Developer tools and prerequisites | | 50 | * Developer tools and prerequisites |
40 | | | 51 | |
41 | ** basic tools | | 52 | ** XCode |
| | | 53 | |
| | | 54 | This section applies to 10.6 through 10.10. |
42 | | | 55 | |
43 | If you haven't already, you will need to install the Mac OS X | | 56 | If you haven't already, you will need to install the Mac OS X |
44 | Developer Tools package (XCode) to obtain a compiler, etc. The | | 57 | Developer Tools package (XCode) to obtain a compiler, etc. The |
45 | procedure depends on the version of Mac OS X; recent versions use the | | 58 | procedure depends on the version of Mac OS X; recent versions use the |
46 | App Store. | | 59 | App Store. |
47 | | | 60 | |
48 | Note that as of 10.9, cvs is no longer provided. You can build | | 61 | ** Command-line Tools |
| | | 62 | |
| | | 63 | In 10.11, XCode has been reported as unsuitable [TODO: add details, |
| | | 64 | but it seems it doesn't include an SDK for itself]. Instead, it is |
| | | 65 | recommend to install command-line tools. |
| | | 66 | |
| | | 67 | ** cvs |
| | | 68 | |
| | | 69 | Note that as of 10.9, cvs is no longer provided by Apple. You can build |
49 | devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs, | | 70 | devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs, |
50 | it may be useful to `git clone https://github.com/jsonn/pkgsrc.git`. | | 71 | it may be useful to `git clone https://github.com/jsonn/pkgsrc.git`. |
51 | | | 72 | |
52 | ** X11 | | 73 | ** X11 |
53 | | | 74 | |
54 | X11 used to be built into Mac OS X, but as of 10.8 it is no longer | | 75 | X11 used to be built into Mac OS X, but as of 10.8 it is no longer |
55 | included. Install XQuartz from http://xquartz.macosforge.org/landing/ | | 76 | included. Install XQuartz from http://xquartz.macosforge.org/landing/ |
56 | | | 77 | |
57 | * Mac OS X Versions | | 78 | * Mac OS X Versions |
58 | | | 79 | |
59 | pkgsrc is a volunteer project, and individuals support/fix packages | | 80 | pkgsrc is a volunteer project, and individuals support/fix packages |
60 | and platforms as they choose. However, pkgsrc contributors as a group | | 81 | and platforms as they choose. However, pkgsrc contributors as a group |
61 | share both a bugtracker and norms about what is ok to break and what | | 82 | share both a bugtracker and norms about what is ok to break and what |
| @@ -72,29 +93,31 @@ in mind that there are no guarantees: | | | @@ -72,29 +93,31 @@ in mind that there are no guarantees: |
72 | listed in the issue tracker. Structural breakage is undesirable, | | 93 | listed in the issue tracker. Structural breakage is undesirable, |
73 | but a fair topic of discussion if keeping support is painful. | | 94 | but a fair topic of discussion if keeping support is painful. |
74 | Individual pkg PRs may be bounced to authors to retest with newer | | 95 | Individual pkg PRs may be bounced to authors to retest with newer |
75 | versions, and closed if that doesn't happen in 14 days. | | 96 | versions, and closed if that doesn't happen in 14 days. |
76 | | | 97 | |
77 | IGNORED means we are not willing to expend issue tracker resources | | 98 | IGNORED means we are not willing to expend issue tracker resources |
78 | (clutter for those reviewing the db) at all. PRs may be summarily | | 99 | (clutter for those reviewing the db) at all. PRs may be summarily |
79 | closed. We are also unconcerned with whether pkgsrc works on the | | 100 | closed. We are also unconcerned with whether pkgsrc works on the |
80 | system at all. | | 101 | system at all. |
81 | | | 102 | |
82 | Given the above definitions, the pkgsrc developers label versions of | | 103 | Given the above definitions, the pkgsrc developers label versions of |
83 | Mac OS X as follows: | | 104 | Mac OS X as follows: |
84 | | | 105 | |
85 | 10.10: current. [SUPPORTED] | | 106 | 10.11: current. [SUPPORTED] |
| | | 107 | |
| | | 108 | 10.10: recent. [SUPPORTED] |
86 | | | 109 | |
87 | 10.9 (13.1.0): somewhat old but not that crufty. [SUPPORTED] | | 110 | 10.9 (13.4.0): somewhat old but not that crufty. [SUPPORTED] |
88 | | | 111 | |
89 | 10.8: old. [SUPPORTED] | | 112 | 10.8: old. [SUPPORTED] |
90 | | | 113 | |
91 | 10.7: old. [SUPPORTED] | | 114 | 10.7: old. [SUPPORTED] |
92 | | | 115 | |
93 | 10.6 (10.8.0): very old [DEPRECATED] (But note that this is the | | 116 | 10.6 (10.8.0): very old [DEPRECATED] (But note that this is the |
94 | Joyent i386-mode build target.) | | 117 | Joyent i386-mode build target.) |
95 | | | 118 | |
96 | 10.5 and below: ancient, and PRs will be summarily closed. It is | | 119 | 10.5 and below: ancient, and PRs will be summarily closed. It is |
97 | acceptable to give zero consideration to causing structural | | 120 | acceptable to give zero consideration to causing structural |
98 | problems on 10.5 and below. [IGNORED] | | 121 | problems on 10.5 and below. [IGNORED] |
99 | | | 122 | |
100 | Because Apple provides 10.9 as a no-cost upgrade (from 10.6 or higher, | | 123 | Because Apple provides 10.9 as a no-cost upgrade (from 10.6 or higher, |
| @@ -102,28 +125,28 @@ it is fairly likely that 10.6-10.8 will | | | @@ -102,28 +125,28 @@ it is fairly likely that 10.6-10.8 will |
102 | they might have otherwise. (The rationale for supporting versions | | 125 | they might have otherwise. (The rationale for supporting versions |
103 | beyond the current and previous ones has been the difficulty for users | | 126 | beyond the current and previous ones has been the difficulty for users |
104 | to upgrade.) | | 127 | to upgrade.) |
105 | | | 128 | |
106 | * Bulk builds | | 129 | * Bulk builds |
107 | | | 130 | |
108 | Clearly, it is desirable for a bulk build to be useful on as many | | 131 | Clearly, it is desirable for a bulk build to be useful on as many |
109 | computers as possible. The main issues are which ABI and which OS X | | 132 | computers as possible. The main issues are which ABI and which OS X |
110 | version. Targetting older versions makes a build run on more systems, | | 133 | version. Targetting older versions makes a build run on more systems, |
111 | and targetting newer versions makes the build closer to what would be | | 134 | and targetting newer versions makes the build closer to what would be |
112 | obtained from bootstrappping on a newer version and thus avoids some | | 135 | obtained from bootstrappping on a newer version and thus avoids some |
113 | issues. | | 136 | issues. |
114 | | | 137 | |
115 | ** 10.6, --abi=32 | | 138 | ** 10.6, --abi=32 (i386), gcc |
116 | | | 139 | |
117 | Joyent provide a bulk build for quarterly branches (--abi=32, OSX | | 140 | Joyent provide a bulk build for quarterly branches (--abi=32, OSX |
118 | 10.6, and therefore gcc 4.2.1, XQuartz, X11_TYPE=native): | | 141 | 10.6, and therefore gcc 4.2.1, XQuartz, X11_TYPE=native): |
119 | http://pkgsrc.joyent.com/install-on-osx/ | | 142 | http://pkgsrc.joyent.com/install-on-osx/ |
120 | which should run on any version from 10.6 and up. | | 143 | which should run on any version from 10.6 and up. |
121 | | | 144 | |
122 | Note that sed on 10.9 is broken, but a bootstrap on 10.6 will not | | 145 | Note that sed on 10.9 is broken, but a bootstrap on 10.6 will not |
123 | avoid it, so while one can install this bootstrap on 10.9 and run | | 146 | avoid it, so while one can install this bootstrap on 10.9 and run |
124 | binary packages, building packages will not in general work. | | 147 | binary packages, building packages will not in general work. |
125 | | | 148 | |
126 | ** 10.9, --abi=64 --compiler=clang | | 149 | ** 10.9, --abi=64 (x86-64), clang |
127 | | | 150 | |
128 | Joyent provide a build build for 10.9/x86_64, at the same URL as | | 151 | Joyent provide a build build for 10.9/x86_64, and therefore clang, at |
129 | above. | | 152 | the same URL as above. |