Skip to content

Commit

Permalink
Update docs on installing for macOS/AArch64
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Sep 25, 2023
1 parent 850ebfa commit c14cc4d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 44 deletions.
27 changes: 8 additions & 19 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,7 @@ Windows.
M2 chip. These chips use an architecture known as ARM64 or AArch64.

For Mac computers with Apple silicon, the easiest way to install Stack
directly (rather than use GHCup) is to obtain the 'unofficial'
`osx-aarch64` binary distribution released by the GHCup developers and
copy it to a location on the PATH. `*.tar.gz` archive files containing
those binary distributions are available at the directories here:
[:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/).

It is still possible to use the commands:
directly (rather than use GHCup) is to command:

~~~text
curl -sSL https://get.haskellstack.org/ | sh
Expand All @@ -111,19 +105,14 @@ Windows.
wget -qO- https://get.haskellstack.org/ | sh
~~~

However, those commands will download and install the version of Stack
for Intel-based Mac computers. Mac computers with Apple silicon will
use Apple's
[Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to
use that version of Stack.

Apple's Terminal application will not detect automatically that Rosetta
has not yet been installed. Rosetta can be manually installed by
commanding:
!!! note

~~~text
softwareupdate --install-rosetta
~~~
The script at [get.haskellstack.org](https://get.haskellstack.org/)
will ask for root access using `sudo`. It needs such access in order
to use your platform's package manager to install dependencies and
to install to `/usr/local/bin`. If you prefer more control, follow
the manual installation instructions in the
[install and upgrade guide](install_and_upgrade.md).

=== "Windows"

Expand Down
45 changes: 20 additions & 25 deletions doc/install_and_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,8 @@ GitHub repository.
Mac computers with Apple silicon have an M1, M1 Pro, M1 Max, M1 Ultra or
M2 chip. These chips use an architecture known as ARM64 or AArch64.

The Stack repository uses GitHub-hosted runners to create binary
distributions for macOS. GitHub-hosted runners are not expected to be
available for macOS on Apple silicon until July to September 2023.

Consequently, for Mac computers with Apple silicon, the easiest way to
install Stack directly (rather than use GHCup) is to obtain the
'unofficial' `osx-aarch64` binary distribution released by the GHCup
developers and copy it to a location on the PATH. `*.tar.gz` archive
files containing those binary distributions are available at the
directories here:
[:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/).

It is still possible to use the commands:
For Mac computers with Apple silicon, the easiest way to install Stack
directly (rather than use GHCup) is to command:

~~~text
curl -sSL https://get.haskellstack.org/ | sh
Expand All @@ -319,19 +308,13 @@ GitHub repository.
wget -qO- https://get.haskellstack.org/ | sh
~~~

However, those commands will download and install the version of Stack
for Intel-based Mac computers. Mac computers with Apple silicon will
use Apple's
[Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to
use that version of Stack.

Apple's Terminal application will not detect automatically that Rosetta
has not yet been installed. Rosetta can be manually installed by
commanding:
!!! note

~~~text
softwareupdate --install-rosetta
~~~
The script at [get.haskellstack.org](https://get.haskellstack.org/)
will ask for root access using `sudo`. It needs such access in order
to use your platform's package manager to install dependencies and
to install to `/usr/local/bin`. If you prefer more control, follow
the manual installation instructions below.

The installation of Stack or some packages (e.g. `network`) requiring C
source compilation might fail with `configure: error: C compiler cannot
Expand Down Expand Up @@ -360,6 +343,18 @@ GitHub repository.
compile x86-64 objects and attempt to link them with existing ARM64
libraries, resulting in the error above.

### Manual download

* Click
[:material-cloud-download-outline:](https://get.haskellstack.org/stable/osx-aarch64.tar.gz)
to download an archive file with the latest release for AArch64
architectures.

* Extract the archive and place `stack` somewhere on your PATH (see the
[Path](#path) section below).

* Now you can run Stack from the command line in a terminal.

### Using Homebrew

[Homebrew](https://brew.sh/) is a popular package manager for macOS. If you
Expand Down

0 comments on commit c14cc4d

Please sign in to comment.