@@ -240,32 +240,10 @@ GitHub repository.
240
240
241
241
=== "macOS"
242
242
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).
249
246
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
-
269
247
From late 2020, Apple began a transition from Mac computers with Intel
270
248
processors (Intel-based Mac) to
271
249
[Mac computers with Apple silicon](https://support.apple.com/en-gb/HT211814).
@@ -399,33 +377,49 @@ GitHub repository.
399
377
will take hours), see
400
378
[their FAQ on the topic](https://github.com/Homebrew/brew/blob/master/docs/FAQ.md#why-do-you-compile-everything).
401
379
402
- ### Notes
380
+ ### Xcode Command Line Tools
403
381
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.
407
389
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.
411
399
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.
415
403
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.
420
412
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.
423
415
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`.
426
421
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
429
423
430
424
It is possible to set up auto-completion of Stack commands. For further
431
425
information, see the [shell auto-completion](shell_autocompletion.md)
0 commit comments