Skip to content

Commit a0eecd2

Browse files
committed
doc: FAQ entries for #1161 and #563
1 parent f729c9a commit a0eecd2

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

doc/faq.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,27 @@ collect2: error: ld returned 1 exit status
281281
#### Where does the output from `--ghc-options=-ddump-splices` (and other `-ddump*` options) go?
282282
283283
These are written to `*.dump-*` files inside the package's `.stack-work` directory.
284+
285+
#### Why is DYLD_LIBRARY_PATH ignored?
286+
287+
<a name="disable-rootless"></a><a name="dyld-library-path-ignored"></a>If you
288+
are on Mac OS X 10.11 ("El Capitan") or later, System Integrity Protection
289+
(a.k.a. "rootless")
290+
[prevents the `DYLD_LIBRARY_PATH` environment variable from being passed to sub-processes](https://github.com/commercialhaskell/stack/issues/1161).
291+
The only workaround we are aware of is
292+
[disabling System Integrity Protection](http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/):
293+
294+
1. Reboot into recovery mode (hold down Cmd-R at boot)
295+
2. Open a terminal (select __Terminal__ from the __Utilities__ menu)
296+
3. Run `csrutil disable; reboot`
297+
298+
Note that this reduces the security of your system.
299+
300+
#### Why do I get a `/usr/bin/ar: permission denied` error?
301+
302+
<a name="usr-bin-ar-permission-denied"></a>On OS X 10.11 ("El Capitan") and
303+
later, this is
304+
[caused by System Integrity Protection (a.k.a. "rootless")](https://github.com/commercialhaskell/stack/issues/563).
305+
GHC 7.10.2 includes a fix, so this only effects users of GHC 7.8.4. If you
306+
cannot upgrade to GHC 7.10.2, you can work around it by
307+
[disabling System Integrity Protection](#rootless)

doc/install_and_upgrade.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ such.
5454

5555
## Mac OS X
5656

57+
Note: if you are on OS X 10.11 ("El Capitan") or later, System Integrity
58+
Protection (a.k.a. "rootless") can cause two problems:
59+
60+
* [GHC 7.8.4 fails with `/usr/bin/ar: permission denied`](faq.html#usr-bin-ar-permission-denied)
61+
* [DYLD_LIBRARY_PATH is ignored](faq.html#dyld-library-path-ignored)
62+
63+
See the above links for workarounds.
64+
5765
### Using Homebrew
5866

5967
If you have a popular [brew](http://brew.sh/) tool installed, you can just do:

0 commit comments

Comments
 (0)