Skip to content

Commit 381629c

Browse files
laanwjcodablock
authored andcommitted
Merge bitcoin#8229: [Doc] Update OS X build notes for 10.11 SDK
e5a680d [Doc] Update OS X build notes for 10.11 SDK (fanquake)
1 parent e2bcf8a commit 381629c

File tree

3 files changed

+22
-26
lines changed

3 files changed

+22
-26
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
Deterministic OS X Dmg Notes.
22

33
Working OS X DMGs are created in Linux by combining a recent clang,
4-
the Apple's binutils (ld, ar, etc), and DMG authoring tools.
4+
the Apple binutils (ld, ar, etc) and DMG authoring tools.
55

66
Apple uses clang extensively for development and has upstreamed the necessary
77
functionality so that a vanilla clang can take advantage. It supports the use
88
of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary
9-
when building for OS X. A pre-compiled version of 3.2 is used because it was not
10-
available in the Precise repositories at the time this work was started. In the
11-
future, it can be switched to use system packages instead.
9+
when building for OS X.
1210

1311
Apple's version of binutils (called cctools) contains lots of functionality
1412
missing in the FSF's binutils. In addition to extra linker options for
1513
frameworks and sysroots, several other tools are needed as well such as
1614
install_name_tool, lipo, and nmedit. These do not build under linux, so they
1715
have been patched to do so. The work here was used as a starting point:
18-
https://github.com/mingwandroid/toolchain4
16+
[mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4).
1917

2018
In order to build a working toolchain, the following source packages are needed
2119
from Apple: cctools, dyld, and ld64.
@@ -29,16 +27,19 @@ originally done in toolchain4.
2927

3028
To complicate things further, all builds must target an Apple SDK. These SDKs
3129
are free to download, but not redistributable.
32-
To obtain it, register for a developer account, then download the Xcode 6.1.1 dmg:
33-
https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_6.1.1/xcode_6.1.1.dmg
30+
To obtain it, register for a developer account, then download the [Xcode 7.3.1 dmg](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg).
3431

3532
This file is several gigabytes in size, but only a single directory inside is
36-
needed: Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
33+
needed:
34+
```
35+
Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
36+
```
3737

3838
Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file.
3939
To create a tarball suitable for Gitian input, mount the dmg in OS X, then create it with:
40-
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.9.sdk.tar.gz MacOSX10.9.sdk
41-
40+
```
41+
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk
42+
```
4243

4344
The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries
4445
which are created using these tools. The build process has been designed to
@@ -48,15 +49,14 @@ fully deterministic and may be freely redistributed.
4849
genisoimage is used to create the initial DMG. It is not deterministic as-is,
4950
so it has been patched. A system genisoimage will work fine, but it will not
5051
be deterministic because the file-order will change between invocations.
51-
The patch can be seen here:
52-
https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff
52+
The patch can be seen here: [theuni/osx-cross-depends](https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff).
5353
No effort was made to fix this cleanly, so it likely leaks memory badly. But
5454
it's only used for a single invocation, so that's no real concern.
5555

5656
genisoimage cannot compress DMGs, so afterwards, the 'dmg' tool from the
5757
libdmg-hfsplus project is used to compress it. There are several bugs in this
5858
tool and its maintainer has seemingly abandoned the project. It has been forked
59-
and is available (with fixes) here: https://github.com/theuni/libdmg-hfsplus .
59+
and is available (with fixes) here: [theuni/libdmg-hfsplus](https://github.com/theuni/libdmg-hfsplus).
6060

6161
The 'dmg' tool has the ability to create DMGs from scratch as well, but this
6262
functionality is broken. Only the compression feature is currently used.
@@ -77,6 +77,6 @@ build process to remain somewhat deterministic. Here's how it works:
7777
that have been previously (deterministically) built in order to create a
7878
final dmg.
7979
- The Apple keyholder uses this unsigned app to create a detached signature,
80-
using the script that is also included there.
80+
using the script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs).
8181
- Builders feed the unsigned app + detached signature back into Gitian. It
8282
uses the pre-built tools to recombine the pieces into a deterministic dmg.

doc/build-osx.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ The built-in one is located in `/Applications/Utilities/Terminal.app`.
55

66
Preparation
77
-----------
8-
Download and install [Xcode](https://developer.apple.com/xcode/download).
8+
Install the OS X command line tools:
99

10-
Once installed, run `xcode-select --install` to install the OS X command line tools.
10+
`xcode-select --install`
1111

12-
Install [Homebrew](http://brew.sh).
12+
When the popup appears, click `Install`.
13+
14+
Then install [Homebrew](http://brew.sh).
1315

1416
Dependencies
1517
----------------------

doc/release-process.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Release Process
22
====================
33

4-
* Update translations, see [translation_process.md](https://github.com/dashpay/dash/blob/master/doc/translation_process.md#syncing-with-transifex)
4+
* Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/dashpay/dash/blob/master/doc/translation_process.md#synchronising-translations).
55
* Update hardcoded [seeds](/contrib/seeds)
66

77
* * *
@@ -53,7 +53,7 @@ Check out the source code in the following directory hierarchy.
5353
git pull
5454
popd
5555

56-
Ensure gitian-builder is up-to-date to take advantage of new caching features (`e9741525c` or later is recommended).
56+
Ensure gitian-builder is up-to-date:
5757

5858
pushd ./gitian-builder
5959
git pull
@@ -64,13 +64,7 @@ Check out the source code in the following directory hierarchy.
6464
wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
6565
wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
6666

67-
Register and download the Apple SDK: see [OS X readme](README_osx.txt) for details.
68-
69-
https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_6.1.1/xcode_6.1.1.dmg
70-
71-
Using a Mac, create a tarball for the 10.9 SDK and copy it to the inputs directory:
72-
73-
tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.9.sdk.tar.gz MacOSX10.9.sdk
67+
Create the OS X SDK tarball, see the [OS X readme](README_osx.md) for details, and copy it into the inputs directory.
7468

7569
### Optional: Seed the Gitian sources cache and offline git repositories
7670

0 commit comments

Comments
 (0)