Changeset View
Changeset View
Standalone View
Standalone View
doc/gitian-building/gitian-building-mac-os-sdk.md
Gitian building Mac OS SDK | 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://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg). | 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_10.2.1/Xcode_10.2.1.xip). | ||||
MacOS host | Extract the SDK | ||||
---------- | |||||
Using Mac OS X, you can mount the dmg, and then extract the SDK with: | |||||
``` | |||||
$ hdiutil attach Xcode_7.3.1.dmg | |||||
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk | |||||
``` | |||||
Clean up the files you don't need: | |||||
```sh | |||||
diskutil unmount /Volumes/Xcode | |||||
rm Xcode_7.3.1.dmg | |||||
``` | |||||
Non-MacOS host: | |||||
--------------- | --------------- | ||||
Alternatively, you can use 7zip and SleuthKit to extract the files one by one. | Follow [these instructions](../../contrib/macdeploy/README.md#SDK-Extraction) to extract the SDK archive from the download. | ||||
The script [extract-osx-sdk.sh](https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/contrib/macdeploy/extract-osx-sdk.sh) automates this. First ensure | |||||
the dmg file is in the current directory, and then run the script. | |||||
You may wish to delete the intermediate 5.hfs file and MacOSX10.11.sdk (the directory) when | |||||
you've confirmed the extraction succeeded. | |||||
```bash | |||||
apt-get install p7zip-full sleuthkit | |||||
contrib/macdeploy/extract-osx-sdk.sh | |||||
rm -rf 5.hfs MacOSX10.11.sdk | |||||
``` | |||||
Copy SDK to Gitian VM: | Copy SDK to Gitian VM: | ||||
---------------------- | ---------------------- | ||||
Copy it to the Gitian VM and clean up, e.g.: | Copy it to the Gitian VM and clean up, e.g.: | ||||
```bash | ```bash | ||||
scp MacOSX10.11.sdk.tar.gz gitian: | scp MacOSX10.14.sdk.tar.gz gitian: | ||||
rm MacOSX10.11.sdk.tar.gz | rm MacOSX10.14.sdk.tar.gz | ||||
``` | ``` | ||||
Login to the VM and: | Login to the VM and: | ||||
```bash | ```bash | ||||
mkdir -p gitian-builder/inputs | mkdir -p gitian-builder/inputs | ||||
mv MacOSX10.11.sdk.tar.gz gitian-builder/inputs | mv MacOSX10.14.sdk.tar.gz gitian-builder/inputs | ||||
``` | ``` | ||||
Troubleshooting | Troubleshooting | ||||
--------------- | --------------- | ||||
See [README_osx.md](https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/doc/README_osx.md) for troubleshooting tips. | See [README_osx.md](https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/doc/README_osx.md) for troubleshooting tips. |