added documentation for bypassing stack build errors on macOS Big Sur (#179)

This commit is contained in:
Jack Carroll 2021-02-09 09:40:32 -05:00 committed by GitHub
parent 693cf13d69
commit d0ce3ed672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,28 @@ to build the library and `wasp` executable.
This might take a longer time (10 mins) if you are doing it for the very first time, since `stack` will need to download the external dependencies.
`NOTE:` For macOS Big Sur users there is a bug in older GHC versions (<= 8.10.3) causing system frameworks to load improperly and will fail when building the project. This can be fixed with the following steps:
<details>
<summary>Show details</summary>
1. Clean up stack cache which could have been carried over from previous OS versions using below command.
```
rm -Rf ~/.stack/setup-exe-cache/x86_64-osx
```
2. Run `stack build` until it fails with error `can't load framework: Cocoa (not found)`.
3. Checkout and build this [workaround](https://github.com/yairchu/macos11-haskell-workaround).
4. Re-run stack build with workaround using below command and it should build without errors.
```
DYLD_INSERT_LIBRARIES=~/macos11-haskell-workaround/macos11ghcwa.dylib stack build
```
</details>
<br/>
### Test
```
stack test