| @@ -1,44 +1,52 @@ | | | @@ -1,44 +1,52 @@ |
1 | $NetBSD: README.MacOSX,v 1.16 2014/03/17 17:12:58 gdt Exp $ | | 1 | $NetBSD: README.MacOSX,v 1.17 2014/03/18 01:28:26 gdt Exp $ |
2 | | | 2 | |
3 | * gcc vs clang | | 3 | * system tools issues |
| | | 4 | |
| | | 5 | ** gcc vs clang |
4 | | | 6 | |
5 | Older versions of Mac OS X (with XCode, of course) provided gcc, and | | 7 | Older versions of Mac OS X (with XCode, of course) provided gcc, and |
6 | pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present | | 8 | pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present |
7 | and one must bootstrap with "--compiler=clang". (Arguably, pkgsrc | | 9 | and one must bootstrap with "--compiler=clang". (Arguably, pkgsrc |
8 | should default to clang on 10.9.) | | 10 | should default to clang on 10.9.) |
9 | | | 11 | |
10 | * i386 vs x86_64 ABI issue | | 12 | ** i386 vs x86_64 ABI issue |
11 | | | 13 | |
12 | Mac OS X Snow Leopard (10.6) through Mavericks (10.9) supports 64-bit | | 14 | Mac OS X Snow Leopard (10.6) through Mavericks (10.9) supports 64-bit |
13 | binaries on most Intel Macs and build those by default on such | | 15 | binaries on most Intel Macs and build those by default on such |
14 | machine. This has caused problems with packages which get confused | | 16 | machine. This has caused problems with packages which get confused |
15 | because "MACHINE_ARCH" is in some OS versions set to "i386" (on a | | 17 | because "MACHINE_ARCH" is in some OS versions set to "i386" (on a |
16 | 64-bit system!). | | 18 | 64-bit system!). |
17 | version: uname -m : uname -p | | 19 | version: uname -m : uname -p |
18 | 10.6: i386 : i386 | | 20 | 10.6: i386 : i386 |
19 | 10.9: x86_64 : i386 | | 21 | 10.9: x86_64 : i386 |
20 | | | 22 | |
21 | There are of course some packages which will fail in i386 mode, and | | 23 | There are of course some packages which will fail in i386 mode, and |
22 | some in x86_64 mode. Because of all this, the default for pkgsrc was | | 24 | some in x86_64 mode. Because of all this, the default for pkgsrc was |
23 | set to use the 32-bit ABI, which results in packages being compiled | | 25 | set to use the 32-bit ABI, which results in packages being compiled |
24 | and run in i386 mode. In addition, there are some Intel Macs (older | | 26 | and run in i386 mode. In addition, there are some Intel Macs (older |
25 | Mac Minis) which can only run i386 and not x86_64. For a longer | | 27 | Mac Minis) which can only run i386 and not x86_64. For a longer |
26 | discussion, see: | | 28 | discussion, see: |
27 | http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html | | 29 | http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html |
28 | | | 30 | |
29 | As of 2014, the decision to default to i386 should probably be | | 31 | As of 2014, the decision to default to i386 should probably be |
30 | revisited. | | 32 | revisited. |
31 | | | 33 | |
| | | 34 | ** sed in 10.9 |
| | | 35 | |
| | | 36 | The sed that comes with 10.9 appears to be broken; it exits when |
| | | 37 | called on files with UTF-8 or other apparently-binary content. |
| | | 38 | Therefore, pkgsrc uses nbsed on 10.9. |
| | | 39 | |
32 | * Developer tools and prerequisites | | 40 | * Developer tools and prerequisites |
33 | | | 41 | |
34 | ** basic tools | | 42 | ** basic tools |
35 | | | 43 | |
36 | If you haven't already, you will need to install the Mac OS X | | 44 | If you haven't already, you will need to install the Mac OS X |
37 | Developer Tools package (XCode) to obtain a compiler, etc. The | | 45 | Developer Tools package (XCode) to obtain a compiler, etc. The |
38 | procedure depends on the version of Mac OS X; recent versions use the | | 46 | procedure depends on the version of Mac OS X; recent versions use the |
39 | App Store. | | 47 | App Store. |
40 | | | 48 | |
41 | Note that as of 10.9, cvs is no longer provided. You can build | | 49 | Note that as of 10.9, cvs is no longer provided. You can build |
42 | devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs, | | 50 | devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs, |
43 | it may be useful to use git to clone https://github.com/jsonn/pkgsrc | | 51 | it may be useful to use git to clone https://github.com/jsonn/pkgsrc |
44 | | | 52 | |
| @@ -123,24 +131,32 @@ Mac OS X as follows: | | | @@ -123,24 +131,32 @@ Mac OS X as follows: |
123 | | | 131 | |
124 | Because Apple provides 10.9 as a no-cost upgrade (from 10.6 or higher, | | 132 | Because Apple provides 10.9 as a no-cost upgrade (from 10.6 or higher, |
125 | it is fairly likely that 10.6-10.8 will become DEPRECATED faster than | | 133 | it is fairly likely that 10.6-10.8 will become DEPRECATED faster than |
126 | they might have otherwise. (The rationale for supporting versions | | 134 | they might have otherwise. (The rationale for supporting versions |
127 | beyond the current and previous ones has been the difficulty for users | | 135 | beyond the current and previous ones has been the difficulty for users |
128 | to upgrade.) | | 136 | to upgrade.) |
129 | | | 137 | |
130 | * Bulk build suggestions and issues | | 138 | * Bulk build suggestions and issues |
131 | | | 139 | |
132 | Clearly, it is desirable for a bulk build to be useful on as many | | 140 | Clearly, it is desirable for a bulk build to be useful on as many |
133 | computers as possible. The main issues are which ABI and which OS X | | 141 | computers as possible. The main issues are which ABI and which OS X |
134 | version. | | 142 | version. |
135 | | | 143 | |
| | | 144 | ** 10.6, --abi=32 |
| | | 145 | |
136 | jperkin@netbsd.org provides a bulk build for quarterly branches | | 146 | jperkin@netbsd.org provides a bulk build for quarterly branches |
137 | (--abi=32, OSX 10.6, and therefore gcc 4.2.1, XQuartz, | | 147 | (--abi=32, OSX 10.6, and therefore gcc 4.2.1, XQuartz, |
138 | X11_TYPE=native): | | 148 | X11_TYPE=native): |
139 | http://www.perkin.org.uk/pages/pkgsrc-binary-packages-for-osx.html | | 149 | http://www.perkin.org.uk/pages/pkgsrc-binary-packages-for-osx.html |
140 | http://mail-index.netbsd.org/pkgsrc-bulk/2014/01/10/msg010276.html | | 150 | http://mail-index.netbsd.org/pkgsrc-bulk/2014/01/10/msg010276.html |
141 | which should run on any version from 10.6 to 10.9. | | 151 | which should run on any version from 10.6 to 10.9. |
142 | | | 152 | |
| | | 153 | Note that sed on 10.9 is broken, but a bootstrap on 10.6 will not |
| | | 154 | avoid it, so while one can install this bootstrap on 10.9 and run |
| | | 155 | binary packages, building packages will not in general work. |
| | | 156 | |
| | | 157 | ** 10.9, --abi=64 --compiler=clang |
| | | 158 | |
143 | Given the 10.9 license situation, a bulk build on 10.9 (and therefore | | 159 | Given the 10.9 license situation, a bulk build on 10.9 (and therefore |
144 | clang) seems reasonable, with either --abi=32 or --abi=64. Such | | 160 | clang) seems reasonable, with either --abi=32 or --abi=64. Such |
145 | builds are almost certainly only usable on 10.9, but that is or will | | 161 | builds are almost certainly only usable on 10.9, but that is or will |
146 | be soon a large fraction of Macs. | | 162 | be soon a large fraction of Macs. |