... | ... | @@ -551,3 +551,27 @@ If you've installed gmp from source on your Mac OS machine, you may see an error |
|
|
|
|
|
|
|
|
The problem is described [on this page](https://github.com/mxcl/homebrew/issues/12946), a quick work-around is to install gmp with homebrew, i.e. `brew install gmp; brew link gmp`.
|
|
|
|
|
|
### `ffi.h` / `ffitarget_arm64.h` / `ffitarget_x86.h` file not found on macOS
|
|
|
|
|
|
If your build fails with errors like
|
|
|
|
|
|
```wiki
|
|
|
/var/folders/.../ghc_4.c:4:10: error:
|
|
|
fatal error: 'ffi.h' file not found
|
|
|
|
|
|
|
4 | #include <ffi.h>
|
|
|
| ^
|
|
|
#include <ffi.h>
|
|
|
^~~~~~~
|
|
|
1 error generated.
|
|
|
`gcc' failed in phase `C Compiler'. (Exit code: 1)
|
|
|
```
|
|
|
|
|
|
make sure that XCode command line tools are installed. Run `xcrun --show-sdk-path` to find out SDK folder and check that `ffi.h` / `ffitarget_arm64.h` / `ffitarget_x86.h` are located under `usr/include/ffi` subfolder. If they are in place, execute
|
|
|
|
|
|
```wiki
|
|
|
export C_INCLUDE_PATH="$(xcrun --show-sdk-path)/usr/include/ffi"
|
|
|
```
|
|
|
|
|
|
and restart GHC build. |
|
|
\ No newline at end of file |