... | ... | @@ -5,57 +5,8 @@ These instructions were last updated for GHC 7.4. |
|
|
|
|
|
## Get the latest development tools
|
|
|
|
|
|
### For Lion, Xcode 7.3 or higher
|
|
|
|
|
|
|
|
|
Firstly, you need to install the command line tools from Apple. You can do that in two ways (the second is faster as it is a much smaller download):
|
|
|
|
|
|
1. Install all of Xcode:
|
|
|
|
|
|
- Install Xcode from the Mac App Store.
|
|
|
- Launch Xcode.
|
|
|
- In the Preference dialog of Xcode, select the "Downloads" pane and install "Command line tools".
|
|
|
1. Install the command line tools only:
|
|
|
|
|
|
- At the [ downloads page of Apple Developer](http://developer.apple.com/downloads), download the latest "Command line tools".
|
|
|
- Install them.
|
|
|
|
|
|
|
|
|
In both cases, you need to [ register](https://developer.apple.com/programs/register/) as an Apple developer first. (This is a free registration.)
|
|
|
|
|
|
|
|
|
Secondly, if you want to build the development version of GHC from the Git repositories, you also need to install the GNU auto tools (which are no longer distributed by Apple). You can get them as follows:
|
|
|
|
|
|
- Install [ Homebrew](http://mxcl.github.com/homebrew/) (as per instructions on that webpage)
|
|
|
- To install the auto tools execute the following: `brew install autoconf automake`
|
|
|
|
|
|
|
|
|
Thirdly, if you like to use GHC's LLVM backend, also execute: `brew install llvm`
|
|
|
|
|
|
**NB:** You need to use a binary distribution of GHC 7.4.1 (or later) as a bootstrap compiler. (Earlier versions fail with an error message complaining about the lack of `/Developer/usr/bin/gcc`. You can fix this by editing the GHC wrapper script if you prefer to use an older compiler.)
|
|
|
|
|
|
### Previous versions of OS X and Xcode
|
|
|
|
|
|
|
|
|
Get the most recent version of Apple's Xcode tools that you can. Your OS X CD has a version on it. You may be able to download a newer version from the [ Apple Developer Connection](http://developer.apple.com/tools/xcode) website. You may need to sign up for a free membership in the Apple Developer Connection, and downloading may still cost a little money. In later versions of OS X (10.6 / 10.7), Apple added the "App Store". Xcode is available within the App Store for "Free".
|
|
|
|
|
|
|
|
|
Once upon a time Apple distributed updates to Xcode by using their Software Update service but not anymore. You must download the development tools manually. When using the App Store, it should correctly identify when you need an update for Xcode (if you downloaded Xcode from the App Store originally).
|
|
|
|
|
|
|
|
|
Successful builds of older GHC sources have been reported using Xcode 3.0, 2.4 and 2.4.1 on Intel Macs. Xcode 2.2.1 is known *not* to work out of the box on Intel Macs, and Xcode 3.0 is known *not* to work out of the box on PowerPC Macs ([\#2887](https://gitlab.haskell.org//ghc/ghc/issues/2887)). Versions prior to 3.1 may build GHC successfully, but choke on certain libraries.
|
|
|
|
|
|
### Installing DocBook
|
|
|
|
|
|
|
|
|
If you want to build the documentation you need to install DocBook. You can install it through [ Homebrew](http://mxcl.github.com/homebrew/) like so:
|
|
|
|
|
|
```wiki
|
|
|
brew install docbook
|
|
|
```
|
|
|
|
|
|
|
|
|
Homebrew might ask you to modify your \~/.bashrc so pay attention to the output generated by the install.
|
|
|
See [OS X Preparations](building/preparation/mac-osx).
|
|
|
|
|
|
## Building the distribution
|
|
|
|
... | ... | |