Skip to content

Commit e0c495c

Browse files
committed
Add info about Xcode Command Line Tools
Also deletes information that is now out of date
1 parent 8e8bf1b commit e0c495c

File tree

2 files changed

+39
-59
lines changed

2 files changed

+39
-59
lines changed

doc/faq.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,6 @@ with the various requirements (version, architecture) that your project needs.
238238
See issue [#420](https://github.com/commercialhaskell/stack/issues/420) for a
239239
detailed discussion of Stack's behavior when `system-ghc` is enabled.
240240

241-
## How do I upgrade to GHC 7.10.2 with stack?
242-
243-
If you already have a prior version of GHC use
244-
`stack --resolver ghc-7.10 setup --reinstall`.
245-
If you don't have any GHC installed, you can skip the `--reinstall`.
246-
247241
## How do I get extra build tools?
248242

249243
Stack will automatically install build tools required by your packages or their
@@ -535,14 +529,6 @@ workarounds:
535529

536530
## <a name="usr-bin-ar-permission-denied"></a>Why do I get a `/usr/bin/ar: permission denied` error?
537531

538-
If you are on OS X 10.11 ("El Capitan") or later, GHC 7.8.4 is incompatible with
539-
System Integrity Protection (a.k.a. "rootless") (see issue
540-
[#563](https://github.com/commercialhaskell/stack/issues/563)). GHC 7.10.2
541-
includes a fix, so this only affects users of GHC 7.8.4. If you cannot upgrade
542-
to GHC 7.10.2, you can work around it by
543-
[disabling System Integrity Protection](http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/).
544-
**WARNING: Disabling SIP will severely reduce the security of your system, so only do this if absolutely necessary!**
545-
546532
## Why is the `--` argument separator ignored in Windows PowerShell
547533

548534
Some versions of Windows PowerShell don't pass the `--` to programs (see issue

doc/install_and_upgrade.md

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -240,32 +240,10 @@ GitHub repository.
240240

241241
=== "macOS"
242242

243-
macOS does not come with all the tools required for software development
244-
but a collection of useful tools, known as the Xcode Command Line Tools,
245-
is readily available. That collection is provided with Xcode (Apple’s
246-
integrated development environment) and can also be obtained from Apple
247-
separately from Xcode. The collection also includes the macOS SDK (software
248-
development kit). The macOS SDK provides header files for macOS APIs.
243+
Most users of Stack on macOS will also have up to date tools for software
244+
development (see [Xcode Command Line Tools](#xcode-command-line-tools)
245+
below).
249246

250-
If you use a command that refers to a common Xcode Command Line Tool and
251-
the Xcode Command Line Tools are not installed, macOS may prompt you to
252-
install the Xcode Command Line Tools.
253-
254-
macOS also comes with a command line tool, `xcode-select`, that can be used
255-
to obtain the Xcode Command Line Tools. Command `xcode-select --print-path`
256-
to print the path to the currently selected (active) developer directory. If
257-
the directory does not exist, or is empty, then the Xcode Command Line Tools
258-
are not installed.
259-
260-
If the Xcode Command Line Tools are not installed, command
261-
`xcode-select --install` to open a user interface dialog to request automatic
262-
installation of the tools.
263-
264-
An upgrade of macOS may sometimes require the existing Xcode Command Line Tools
265-
to be uninstalled and an updated version of the tools to be installed. The
266-
existing tools can be uninstalled by deleting the directory reported by
267-
`xcode-select --print-path`.
268-
269247
From late 2020, Apple began a transition from Mac computers with Intel
270248
processors (Intel-based Mac) to
271249
[Mac computers with Apple silicon](https://support.apple.com/en-gb/HT211814).
@@ -399,33 +377,49 @@ GitHub repository.
399377
will take hours), see
400378
[their FAQ on the topic](https://github.com/Homebrew/brew/blob/master/docs/FAQ.md#why-do-you-compile-everything).
401379

402-
### Notes
380+
### Xcode Command Line Tools
403381

404-
After installation, running `stack setup` might fail with
405-
`configure: error: cannot run C compiled programs.` in which case you should
406-
command:
382+
macOS does not come with all the tools required for software development but
383+
a collection of useful tools, known as the Xcode Command Line Tools, is
384+
readily available. A version of that collection is provided with each
385+
version of Xcode (Apple’s integrated development environment) and can also
386+
be obtained from Apple separately from Xcode. The collection also includes
387+
the macOS SDK (software development kit). The macOS SDK provides header
388+
files for macOS APIs.
407389

408-
~~~text
409-
xcode-select --install
410-
~~~
390+
If you use a command that refers to a common Xcode Command Line Tool and
391+
the Xcode Command Line Tools are not installed, macOS may prompt you to
392+
install the tools.
393+
394+
macOS also comes with a command line tool, `xcode-select`, that can be used
395+
to obtain the Xcode Command Line Tools. Command `xcode-select --print-path`
396+
to print the path to the currently selected (active) developer directory. If
397+
the directory does not exist, or is empty, then the Xcode Command Line Tools
398+
are not installed.
411399

412-
Starting with macOs 10.14 (Mojave) running `xcode-select --install`
413-
[might not be enough](https://forums.developer.apple.com/thread/104296). You
414-
will need to install additional headers with commands:
400+
If the Xcode Command Line Tools are not installed, command
401+
`xcode-select --install` to open a user interface dialog to request
402+
automatic installation of the tools.
415403

416-
~~~text
417-
cd /Library/Developer/CommandLineTools/Packages/
418-
open macOS_SDK_headers_for_macOS_10.14.pkg
419-
~~~
404+
An upgrade of macOS may sometimes require the existing Xcode Command Line
405+
Tools to be uninstalled and an updated version of the tools to be installed.
406+
The existing tools can be uninstalled by deleting the directory reported by
407+
`xcode-select --print-path`.
408+
409+
If, after the installation of Stack, running `stack setup` fails with
410+
`configure: error: cannot run C compiled programs.` that indicates that the
411+
Xcode Command Line Tools are not installed.
420412

421-
If you are on OS X 10.11 (El Capitan) and encounter either of these problems,
422-
see the linked FAQ entries:
413+
If building fails with messages that `*.h` files are not found, that may
414+
also indicate that Xcode Command Line Tools are not up to date.
423415

424-
* [GHC 7.8.4 fails with `/usr/bin/ar: permission denied`](faq.md#usr-bin-ar-permission-denied)
425-
* [DYLD_LIBRARY_PATH is ignored](faq.md#dyld-library-path-ignored)
416+
Xcode 10 provided an SDK for macOS 10.14 (Mojave) and
417+
[changed the location](https://developer.apple.com/documentation/xcode-release-notes/xcode-10-release-notes#Command-Line-Tools)
418+
of the macOS system headers. As a workaround, an extra package was provided
419+
by Apple which installed the headers to the base system under
420+
`/usr/include`.
426421

427-
If you are on macOS 10.12 (Sierra) and encounter GHC panic while building,
428-
see this [issue](https://github.com/commercialhaskell/stack/issues/2577).
422+
### Auto-completion of Stack commands
429423

430424
It is possible to set up auto-completion of Stack commands. For further
431425
information, see the [shell auto-completion](shell_autocompletion.md)

0 commit comments

Comments
 (0)