head 1.11; access; symbols pkgsrc-2023Q4:1.10.0.12 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.10 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.8 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.6 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.10.0.4 pkgsrc-2022Q4-base:1.10 pkgsrc-2022Q3:1.10.0.2 pkgsrc-2022Q3-base:1.10 pkgsrc-2022Q2:1.8.0.2 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.5.0.10 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.8 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.6 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.4 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.2 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.1.0.4 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.2 pkgsrc-2020Q3-base:1.1; locks; strict; comment @# @; 1.11 date 2024.03.11.14.03.57; author schmonz; state Exp; branches; next 1.10; commitid nZMsozajzTx0sK1F; 1.10 date 2022.09.12.12.32.30; author jperkin; state Exp; branches; next 1.9; commitid SpJg04GEmkPDtzTD; 1.9 date 2022.08.01.14.49.09; author jperkin; state Exp; branches; next 1.8; commitid G9ChBxzoh60jBbOD; 1.8 date 2022.04.09.17.23.12; author schmonz; state Exp; branches; next 1.7; commitid AlsdMaFoBJO27yzD; 1.7 date 2022.04.08.01.21.49; author schmonz; state Exp; branches; next 1.6; commitid zpkqX2QUJoJjPkzD; 1.6 date 2022.04.06.13.06.09; author schmonz; state Exp; branches; next 1.5; commitid HxJJ4gxln5vTM8zD; 1.5 date 2021.02.10.17.30.20; author gdt; state Exp; branches; next 1.4; commitid FtitWa5JXW5SKbHC; 1.4 date 2021.02.10.14.55.36; author gdt; state Exp; branches; next 1.3; commitid YWMHKyNy2V6NTaHC; 1.3 date 2021.02.09.12.31.58; author cjep; state Exp; branches; next 1.2; commitid BAG6x78qb3Gv82HC; 1.2 date 2021.02.09.12.05.32; author cjep; state Exp; branches; next 1.1; commitid AeVPz1mHEnqrZ1HC; 1.1 date 2020.08.14.07.35.26; author schmonz; state Exp; branches; next ; commitid 65GRLXhg3oevf0kC; desc @@ 1.11 log @README.macOS: wordsmith the SDK paragraph. @ text @$NetBSD: README.macOS,v 1.10 2022/09/12 12:32:30 jperkin Exp $ Please read the general README file as well. Binary packages are available for macOS arm64 and x86_64, provided by MNX Cloud. More info: If these don't suffice for your needs, you'll want to build your own. First, install either the full Xcode environment (if that's something you want to have) or else just its Command Line Tools. For the latter: $ xcode-select --install Next, if you haven't already done so, fetch and extract pkgsrc: $ curl -O https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc.tar.gz $ tar -zxf pkgsrc.tar.gz && rm pkgsrc.tar.gz Now you're ready to bootstrap as described in README. Once bootstrapped, install `devel/scmcvs` so you can update pkgsrc via anonymous CVS. Alternatively, swap out your CVS checkout for a clone from this git mirror: For a local X11 display server, install `x11/modular-xorg-xquartz`. For any particular package that doesn't build, macOS fixes are often in MacPorts or Homebrew waiting to be borrowed. Patches to support older systems will generally get merged, provided they don't break newer systems and aren't too much trouble to maintain. Tigerbrew is a good place to look for such fixes. Occasionally, after updating to a freshly released macOS version, you'll see "No suitable Xcode SDK or Command Line Tools installed." This usually means a pkgsrc developer needs to add another `OSX_SDK_MAP` entry to `mk/platform/Darwin.mk`. To target a specific SDK, assuming it's available on your build host, set MACOSX_DEPLOYMENT_TARGET during bootstrap. The bootstrap tools and all subsequent packages built with those tools will use the specified SDK. ----- Additional historical details, likely useful with older systems: @ 1.10 log @macOS: Support MACOSX_DEPLOYMENT_TARGET. This allows the user to specify an exact SDK to use, and can be used to build packages for an older release of macOS than the host. The user should ideally set this via environment variable at bootstrap time, and pkgsrc will then encode that into mk.conf and use it for all builds. Tested on macOS 12.x building against an 11.3 SDK for both arm64 and x86_64. @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.9 2022/08/01 14:49:09 jperkin Exp $ d39 3 a41 4 If you wish to build for a specific SDK, first ensure is is available in the correct location, and then you can set the regular MACOSX_DEPLOYMENT_TARGET variable during bootstrap and pkgsrc will ensure that SDK is used for both the bootstrap build as well as all packages built by those tools. @ 1.9 log @Update docs for Joyent migration. @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.8 2022/04/09 17:23:12 schmonz Exp $ d39 5 @ 1.8 log @README.macOS: mention how to get an X11 server from pkgsrc. xref wiki page with all the historical details that used to be in this document. @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.7 2022/04/08 01:21:49 schmonz Exp $ d6 1 a6 1 Joyent. More info: @ 1.7 log @README.macOS: rewrite for typical new users. Historical details have moved: https://wiki.netbsd.org/pkgsrc/macos_porting_notes/ @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.6 2022/04/06 13:06:09 schmonz Exp $ d25 2 d38 5 @ 1.6 log @README.macOS: nbsed requires no user action, merge comment to bootstrap. @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.5 2021/02/10 17:30:20 gdt Exp $ d3 1 a3 3 This file describes the use of current versions of pkgsrc with multiple versions of Darwin and macOS, omitting information about previous pkgsrc versions. d5 2 a6 1 * Darwin vs macOS d8 3 a10 4 macOS 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 macOS. Darwin from Apple is no longer open source. d12 1 a12 3 Users of non-macOS Darwin are invited to submit patches to this file. The only known project is: http://www.puredarwin.org/ d14 1 a14 1 Until then, this file remains macOS-centric. d16 2 a17 1 * system tools issues d19 1 a19 1 ** native headers vs SDK d21 3 a23 7 macOS 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. d25 2 a26 1 *** SDK version issues d28 3 a30 3 The SDK supported versions and default versions do are not always the same as the current system version. The following may be useful in understanding one's situation: d32 4 a35 193 /usr/bin/xcrun --show-sdk-version sw_vers -productVersion pkgsrc attempts to query the system version, and then ask the sdk to use that version. See mk/platform/Darwin.mk for the code. ** 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 This entire section is only about Intel Macs. OS X 10.6 and higher supports x86-64 binaries on Intel Macs with x86-64 processors, which is now most of them. i386 binaries are also supported on most (all?) Intel machines. *** issues related to ABI 32 vs 64 Note that a pkgsrc package built 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 Somewhat separately from pkgsrc's ABI choice, there have been issues with packages which get confused because "MACHINE_ARCH" is in some OS versions set to "i386" (on a 64-bit system!). As of 2016 this should be mostly resolved. version: uname -m : uname -p 10.6: i386 : i386 10.9: x86_64 : i386 *** default ABI The ABI is chosen at bootstrap time and encoded into mk.conf. So a change in the default is about what a new bootstrap will do; already-bootstrapped systems should remain unchanged. They should be able to build and run new packages using the old ABI value. pkgsrc used to set the default ABI as i386, both on systems with i386 processors and on systems with x86_64 processors. On 2015-11-09 the default was changed so that ABI=64 is chosen on machines where "uname -m" reports x86_64. (It remains i386 on others, which are not capable of running x86_64 binaries.) Generally, users will not need to deal with the default ABI change, except that packages are mostly only portable across machines with the same bootstrapping parameters. If one unpacks a new binary bootstrap kit over an existing installation, one can end up with a mix. The standard advice is not to do this, and to rrebuild/reinstall all packages from scratch or a compatible binary package set. But, one could also mark packages with the wrong ABI as rebuild=YES and use pkg_rolling-replace. *** change in storage of ABI information On 2016-01-24, the way ABI information was stored in pkgsrc was rationalized and simplified. The new code could compute the wrong ABI for some previously-bootstrapped installations. The problem can be resolved by building bmake with MACHINE_ARCH=x86_64 and updating that package, as described in mail archives: https://mail-index.netbsd.org/pkgsrc-users/2016/01/25/msg022870.html (One would expect to be able to use make replace to do this. One minor issue is that it requires pkg_tarup, although that will be present on systems of those who use make replace. There also may be an error with architecture mismatch from pkg_install requiring a "-f" option. Repeatable data about recovery is somewhat hard to obtain, as most are past this issue already and no longer interested in experimenting.) * Developer tools and prerequisites ** XCode This section applies to 10.6 through 11. If you haven't already, you will need to install the macOS Developer Tools package (XCode) to obtain a compiler, etc. The procedure depends on the version of macOS; recent versions use the App Store. *** Command-line Tools If one installs "Commmand Line Tools", then pkgsrc can use the compiler. Since Xcode 7 (installed from the Apple Store) the development environment can upgrade itself without interaction from the user, but will not automatically update the Command Line Tools. This will cause system header files like stdlib.h not to be found by pkgsrc. The command `xcode-select --install' will install the Command Line Tools for Xcode. In the past at least, Command Line Tools for Xcode could 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/NetBSD/pkgsrc.git`. ** X11 X11 used to be built into macOS, but as of 10.8 it is no longer included. You can install XQuartz from https://www.xquartz.org, or try the newly-added pkgsrc version. * macOS Versions Because Apple drops support for previous hardware faster than the hardware fails, many machines cannot be upgraded to recent versions of macOS, 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. 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.12 or older that do not contain fixes may be closed without fixing. macOS 11 (major versions are now just digits) is the current version; hardware before 2013 cannot be upgraded to this version. Also this version introduces support for Apple M1 processors, using the aarch64 instruction set. macOS 10.15 is maintained and supports the same hardware as 10.14. macOS 10.14 is somewhat old but still maintained. It cannot be run on hardware before 2012 and Macbooks before 2015. macOS 10.13 is old; Apple ended support in January of 2021. Significant amounts of entirely functional hardware cannot be upgraded beyond this version. macOS 10.12 is very old. There is no known reason to run it, as all (most?) hardware that runs 10.12 can run 10.13. OS X 10.11 is very old; some hardware cannot be upgraded beyond this version, but most of it is old and slow, dating from approximately 2010 or earlier. OS X 10.10, 10.9 and 10.8 are extremely old; most hardware that can run them can probably run 10.11. 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. OS X 10.5 is the last version that works on PowerPC Macs. 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 macOS 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 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.14, --abi=64 x86-64, clang ** 11, --abi=64 x86-64, clang Joyent provide a bulk build for both 10.14/x86_64 and 11/x86_64: http://pkgsrc.joyent.com/install-on-osx/ They hold archives for 64-bit Sierra (10.12), Mavericks (10.9) and Snow Leopard (10.6), but these are no longer updated. @ 1.5 log @bootstrap/README.macOS: Remediate my version confusion (Apparently not only was major bumped from 10.x to 11, but it's 11, not 11.0 and the next release will be 12.) @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.4 2021/02/10 14:55:36 gdt Exp $ a111 6 ** 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. @ 1.4 log @bootstrap/README.macOS Consolidate some old version info. Declare that PRs about 10.12 and earlier that do not contain fixes may be closed without fixing. (At this point there is still a lot of useful hardware that runs 10.13. Systems too old to run 10.13 are now more or less heading towards retrocomputing, and those too old to run 10.11 have arrived.) If you don't like this and would like to actually work on such PRs, feel free to volunteer to have <= 10.12 PRs assigned to you. @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.3 2021/02/09 12:31:58 cjep Exp $ d175 4 a178 3 macOS 11.0 is the current version; hardware before 2013 cannot be upgraded to this version. Also this version introduces support for Apple M1 processors, using the aarch64 instruction set. d230 1 a230 1 ** 11.0, --abi=64 x86-64, clang d232 1 a232 1 Joyent provide a bulk build for both 10.14/x86_64 and 11.0/x86_64: @ 1.3 log @verified works on Big Sur (at least Intel) so bump to 11. Also fix typo. @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.2 2021/02/09 12:05:32 cjep Exp $ d172 1 a172 1 pkgsrc PRs about 10.5 or older that do not contain fixes may be closed d175 3 a177 2 macOS 11 is new & current; hardware before 2013 cannot be upgraded to this version. Also this version introduces support for Apple M1 silicon. d179 1 a179 1 macOS 10.15 is current and supports the same hardware as 10.14. d181 2 a182 2 macOS 10.14 is current, but removes support for hardware before 2012 and Macbooks before 2015. d184 2 a185 6 macOS 10.13 is old and no longer supported by Apple; significant amounts of hardware cannot be upgraded beyond this version. macOS 10.12 is old; Joyent has an active bulk build. OS X 10.11 is old; significant amounts of hardware cannot be upgraded d188 2 a189 1 OS X 10.10 is old. d191 3 a193 2 OS X 10.9 (Darwin 13.4.0) is old. (From this point on, this list is more of a history lesson than useful for running pkgsrc.) d195 2 a196 2 OS X 10.8 is old, and there are no no known reasons to it instead of a newer version. d229 1 a229 1 ** 11, --abi=64 x86-64, clang d231 1 a231 1 Joyent provide a bulk build for both 10.14/x86_64 and 11/x86_64: a235 1 @ 1.2 log @Some updates to versions. Still needs some lines on M1 silicon @ text @d1 1 a1 1 $NetBSD: README.macOS,v 1.1 2020/08/14 07:35:26 schmonz Exp $ d122 1 a122 1 This section applies to 10.6 through 10.13. a163 1 10.5). @ 1.1 log @Rename README.MacOSX to README.macOS. @ text @d1 1 a1 1 $NetBSD: README.MacOSX,v 1.39 2020/08/14 07:24:16 schmonz Exp $ d163 1 a163 1 run relatively recent versions or specific older versions (10.6 and d176 2 a177 1 macOS 10.14 is either new or current. d179 1 a179 2 macOS 10.13 is current; significant amounts of hardware cannot be upgraded beyond this version. d181 2 a182 1 macOS 10.12 is current; Joyent has an active bulk build. d184 7 a190 2 OS X 10.11 is semi-current; significant amounts of hardware cannot be upgraded beyond this version. d230 2 a231 1 ** 10.12, --abi=64 x86-64, clang d233 1 a233 1 Joyent provide a bulk build for 10.12/x86_64, and therefore clang, at: d236 3 @