diff --git a/cmake/platforms/OSX.cmake b/cmake/platforms/OSX.cmake --- a/cmake/platforms/OSX.cmake +++ b/cmake/platforms/OSX.cmake @@ -15,10 +15,10 @@ set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN_PREFIX}) set(OSX_MIN_VERSION 10.15) -# OSX_SDK_VERSION 10.15.6 +# OSX_SDK_VERSION 11.0 # Note: don't use XCODE_VERSION, it's a cmake built-in variable ! -set(SDK_XCODE_VERSION 12.1) -set(SDK_XCODE_BUILD_ID 12A7403) +set(SDK_XCODE_VERSION 12.2) +set(SDK_XCODE_BUILD_ID 12B45b) set(LD64_VERSION 609) # On OSX we use various stuff from Apple's SDK. diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -255,7 +255,7 @@ def check_MACHO_sdk(binary) -> bool: - return binary.build_version.sdk == [10, 15, 6] + return binary.build_version.sdk == [11, 0, 0] def check_PE_libraries(binary) -> bool: diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py --- a/contrib/gitian-build.py +++ b/contrib/gitian-build.py @@ -558,7 +558,7 @@ # Disable for MacOS if no SDK found if args.macos and not os.path.isfile( - "gitian-builder/inputs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" + "gitian-builder/inputs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz" ): print("Cannot build for MacOS, SDK does not exist. Will build for other OSes") args.macos = False diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -33,7 +33,7 @@ - "url": "https://github.com/Bitcoin-ABC/bitcoin-abc.git" "dir": "bitcoin" files: -- "Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" +- "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz" script: | WRAP_DIR=$HOME/wrapped HOSTS=( @@ -95,7 +95,7 @@ BASEPREFIX=`pwd`/depends mkdir -p ${BASEPREFIX}/SDKs - tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz + tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz # Build dependencies for each host for i in ${HOSTS[@]}; do diff --git a/contrib/guix/README.md b/contrib/guix/README.md --- a/contrib/guix/README.md +++ b/contrib/guix/README.md @@ -196,7 +196,7 @@ Set the path where _extracted_ SDKs can be found. This is passed through to the depends tree. Note that this is should be set to the _parent_ directory of the actual SDK (e.g. `SDK_PATH=$HOME/Downloads/macOS-SDKs` instead of - `$HOME/Downloads/macOS-SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers`). + `$HOME/Downloads/macOS-SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers`). The path that this environment variable points to **must be a directory**, and **NOT a symlink to a directory**. diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md --- a/contrib/macdeploy/README.md +++ b/contrib/macdeploy/README.md @@ -12,11 +12,16 @@ ### Step 1: Obtaining `Xcode.app` +A free Apple Developer Account is required to proceed. + Our current macOS SDK -(`Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`) can be +(`Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz`) can be extracted from -[Xcode_12.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip). -An Apple ID is needed to download this. +[Xcode_12.2.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip). +Alternatively, after logging in to your account go to 'Downloads', then 'More' +and search for [`Xcode_12.2`](https://developer.apple.com/download/all/?q=Xcode%2012.2). +An Apple ID and cookies enabled for the hostname are needed to download this. +The `sha256sum` of the archive should be `28d352f8c14a43d9b8a082ac6338dc173cb153f964c6e8fb6ba389e5be528bd0`. After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` archive. This makes the SDK less-trivial to extract on non-macOS machines. One @@ -26,25 +31,25 @@ # Install/clone tools needed for extracting Xcode.app apt install cpio -# Unpack Xcode_12.1.xip and place the resulting Xcode.app in your current +# Unpack Xcode_12.2.xip and place the resulting Xcode.app in your current # working directory -python3 contrib/apple-sdk-tools/extract_xcode.py -f Xcode_12.1.xip | cpio -d -i +python3 contrib/apple-sdk-tools/extract_xcode.py -f Xcode_12.2.xip | cpio -d -i ``` On macOS the process is more straightforward: ```bash -xip -x Xcode_12.1.xip +xip -x Xcode_12.2.xip ``` -### Step 2: Generating `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` +### Step 2: Generating `Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` -To generate `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`, run +To generate `Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz`, run the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the previous stage) as the first argument. ```bash -# Generate a Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz from +# Generate a Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz from # the supplied Xcode.app ./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' ``` @@ -74,17 +79,7 @@ and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done in `toolchain4`. To complicate things further, all builds must target an Apple SDK. These SDKs are free to -download, but not redistributable. To obtain it, register for an Apple Developer Account, -then download [Xcode_11.3.1](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). - -This file is many gigabytes in size, but most (but not all) of what we need is -contained only in a single directory: - -```bash -Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -``` - -See the SDK Extraction notes above for how to obtain it. +download, but not redistributable. See the SDK Extraction notes above for how to obtain it. The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries which are created using these tools. The build process has been designed to avoid including the diff --git a/contrib/teamcity/download-apple-sdk.sh b/contrib/teamcity/download-apple-sdk.sh --- a/contrib/teamcity/download-apple-sdk.sh +++ b/contrib/teamcity/download-apple-sdk.sh @@ -21,8 +21,8 @@ : "${TOPLEVEL:=$(git rev-parse --show-toplevel)}" -OSX_SDK="Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" -OSX_SDK_SHA256="12bd3827817f0c6b305e77140f440864eab29077e0b77b6627030e241dce76a4" +OSX_SDK="Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz" +OSX_SDK_SHA256="5b7e65304bb9abcc2cffc8bc4dd68b8f7e318dce85c195bea77c59600e777bd3" pushd "${DEST_DIR}" > /dev/null if ! echo "${OSX_SDK_SHA256} ${OSX_SDK}" | sha256sum --quiet -c > /dev/null 2>&1; then diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,7 +1,7 @@ OSX_MIN_VERSION=10.15 -OSX_SDK_VERSION=10.15.6 -XCODE_VERSION=12.1 -XCODE_BUILD_ID=12A7403 +OSX_SDK_VERSION=11.0 +XCODE_VERSION=12.2 +XCODE_BUILD_ID=12B45b LD64_VERSION=609 OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers diff --git a/doc/gitian-building/gitian-building-mac-os-sdk.md b/doc/gitian-building/gitian-building-mac-os-sdk.md --- a/doc/gitian-building/gitian-building-mac-os-sdk.md +++ b/doc/gitian-building/gitian-building-mac-os-sdk.md @@ -13,15 +13,15 @@ Copy it to the Gitian VM and clean up, e.g.: ```bash -scp Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz gitian: -rm Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz +scp Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz gitian: +rm Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz ``` Login to the VM and: ```bash mkdir -p gitian-builder/inputs -mv Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz gitian-builder/inputs +mv Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz gitian-builder/inputs ``` Troubleshooting