Skip to content

Commit 8ccdac1

Browse files
committed
Merge #8229: [Doc] Update OS X build notes for 10.11 SDK
e5a680d [Doc] Update OS X build notes for 10.11 SDK (fanquake)
2 parents 0d41d70 + e5a680d commit 8ccdac1

File tree

3 files changed

+24
-28
lines changed

3 files changed

+24
-28
lines changed

doc/README_osx.txt renamed to doc/README_osx.md

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: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Release Process
33

44
Before every release candidate:
55

6-
* Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#syncing-with-transifex)
6+
* Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#synchronising-translations).
77

88
Before every minor and major release:
99

@@ -13,7 +13,7 @@ Before every minor and major release:
1313

1414
Before every major release:
1515

16-
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
16+
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
1717

1818
### First time / New builders
1919

@@ -75,7 +75,7 @@ Ensure your gitian.sigs are up-to-date if you wish to gverify your builds agains
7575
git pull
7676
popd
7777

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

8080
pushd ./gitian-builder
8181
git pull
@@ -89,13 +89,7 @@ Ensure gitian-builder is up-to-date to take advantage of new caching features (`
8989
wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
9090
popd
9191

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

10094
### Optional: Seed the Gitian sources cache and offline git repositories
10195

@@ -239,7 +233,7 @@ transmission-show -m <torrent file>
239233
Insert the magnet URI into the announcement sent to mailing lists. This permits
240234
people without access to `bitcoin.org` to download the binary distribution.
241235
Also put it into the `optional_magnetlink:` slot in the YAML file for
242-
bitcoin.org (see below for bitcoin.org update instructions).
236+
bitcoin.org (see below for bitcoin.org update instructions).
243237

244238
- Update bitcoin.org version
245239

0 commit comments

Comments
 (0)