diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py --- a/contrib/gitian-build.py +++ b/contrib/gitian-build.py @@ -263,7 +263,7 @@ # Disable for MacOS if no SDK found if args.macos and not os.path.isfile( - 'gitian-builder/inputs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz'): + 'gitian-builder/inputs/Xcode-12.1-12A7403-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 @@ -36,7 +36,7 @@ - "url": "https://github.com/Bitcoin-ABC/bitcoin-abc.git" "dir": "bitcoin" files: -- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz" +- "Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" script: | WRAP_DIR=$HOME/wrapped HOSTS=( @@ -100,7 +100,7 @@ BASEPREFIX=`pwd`/depends mkdir -p ${BASEPREFIX}/SDKs - tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz + tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz # Build dependencies for each host for i in ${HOSTS[@]}; do diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md --- a/contrib/macdeploy/README.md +++ b/contrib/macdeploy/README.md @@ -17,9 +17,9 @@ ### Step 1: Obtaining `Xcode.app` Our current macOS SDK -(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be +(`Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`) can be extracted from -[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). +[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. After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` @@ -30,25 +30,25 @@ # Install/clone tools needed for extracting Xcode.app apt install cpio -# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current +# Unpack Xcode_12.1.xip and place the resulting Xcode.app in your current # working directory -python3 contrib/apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i +python3 contrib/apple-sdk-tools/extract_xcode.py -f Xcode_12.1.xip | cpio -d -i ``` On macOS the process is more straightforward: ```bash -xip -x Xcode_11.3.1.xip +xip -x Xcode_12.1.xip ``` -### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` +### Step 2: Generating `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` -To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run +To generate `Xcode-12.1-12A7403-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-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from +# Generate a Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz from # the supplied Xcode.app ./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' ``` 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-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz" -OSX_SDK_SHA256="a1b8af4c4d82d519dd5aff2135fe56184fa758c30e310b5fb4bfc8d9d3b45d8a" +OSX_SDK="Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" +OSX_SDK_SHA256="12bd3827817f0c6b305e77140f440864eab29077e0b77b6627030e241dce76a4" 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.14 -OSX_SDK_VERSION=10.15.1 -XCODE_VERSION=11.3.1 -XCODE_BUILD_ID=11C505 +OSX_SDK_VERSION=10.15.6 +XCODE_VERSION=12.1 +XCODE_BUILD_ID=12A7403 LD64_VERSION=609 OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers @@ -60,16 +60,11 @@ # Explicitly point to our binaries (e.g. cctools) so that they are # ensured to be found and preferred over other possibilities. # -# -stdlib=libc++ -nostdinc++ -Xclang -cxx-isystem$(OSX_SDK)/usr/include/c++/v1 +# -stdlib=libc++ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 # # Forces clang to use the libc++ headers from our SDK and completely # forget about the libc++ headers from the standard directories # -# TODO: Once we start requiring a clang version that has the -# -stdlib++-isystem flag first introduced here: -# https://reviews.llvm.org/D64089, we should use that instead. Read the -# differential summary there for more details. -# # -Xclang -*system \ # -Xclang -*system \ # -Xclang -*system ... @@ -109,8 +104,8 @@ $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ --sysroot=$(OSX_SDK) \ - -stdlib=libc++ -nostdinc++ \ - -Xclang -cxx-isystem$(OSX_SDK)/usr/include/c++/v1 \ + -stdlib=libc++ \ + -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -4,7 +4,6 @@ $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=6b73269efdf5c58a070e7357b66ee760501388549d6a12b423723f45888b074b $(package)_build_subdir=cctools -$(package)_patches=ld64_disable_threading.patch $(package)_dependencies=native_libtapi define $(package)_set_vars @@ -17,10 +16,6 @@ $(package)_cxx=$(clangxx_prog) endef -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch -endef - define $(package)_config_cmds $($(package)_autoconf) endef diff --git a/depends/patches/native_cctools/ld64_disable_threading.patch b/depends/patches/native_cctools/ld64_disable_threading.patch deleted file mode 100644 --- a/depends/patches/native_cctools/ld64_disable_threading.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 584668415039adeed073decee7e04de28248afd3 -Author: fanquake -Date: Tue Aug 18 01:20:24 2020 +0000 - - Disable threading to fix non-determinism - - A bug in the file parser can cause dependencies to be calculated - differently based on which files have already been parsed. This is more - likely to occur on systems with more CPUs. - - Just disable threading for now. There is no noticable slowdown. - - See #9891. - -diff --git a/cctools/ld64/src/ld/InputFiles.h b/cctools/ld64/src/ld/InputFiles.h -index ef9c756..90a70b6 100644 ---- a/cctools/ld64/src/ld/InputFiles.h -+++ b/cctools/ld64/src/ld/InputFiles.h -@@ -25,7 +25,6 @@ - #ifndef __INPUT_FILES_H__ - #define __INPUT_FILES_H__ - --#define HAVE_PTHREADS 1 - - #include - #include 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 @@ -1,7 +1,7 @@ Gitian building Mac OS SDK ========================== -On the host machine, register for a free Apple [developer account](https://developer.apple.com/register/), then download the SDK [here](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). +On the host machine, register for a free Apple [developer account](https://developer.apple.com/register/), then download the SDK [here](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip). Extract the SDK --------------- @@ -13,15 +13,15 @@ Copy it to the Gitian VM and clean up, e.g.: ```bash -scp Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz gitian: -rm Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz +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 ``` Login to the VM and: ```bash mkdir -p gitian-builder/inputs -mv Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz gitian-builder/inputs +mv Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz gitian-builder/inputs ``` Troubleshooting