GHC 9.2.1 on an m1 Mac error: `ffitarget_arm64.h` file not found
I've been trying out the latest GHC (9.2.1) on an m1 Mac running macOS 12.0.1. I'm seeing this error when building an existing project:
Failed to build wcwidth-0.0.2.
Build log ( /Users/stu/.cabal/logs/ghc-9.2.1/wcwdth-0.0.2-232d390d.log ):
Warning: wcwidth.cabal:47:45: version operators used. To use version operators
the package needs to specify at least 'cabal-version: >= 1.8'.
Warning: wcwidth.cabal:30:45: version operators used. To use version operators
the package needs to specify at least 'cabal-version: >= 1.8'.
Configuring wcwidth-0.0.2...
Preprocessing library for wcwidth-0.0.2..
Building library for wcwidth-0.0.2..
[1 of 1] Compiling Data.Char.WCWidth ( Data/Char/WCWidth.hs,
dist/build/Data/Char/WCWidth.o, dist/build/Data/Char/WCWidth.dyn_o )
In file included from
/var/folders/2q/ym4rpn7j6v9d6jhpt0wnk03r0000gn/T/ghc7111_0/ghc_3.c:4:0:
error:
In file included from
/Users/stu/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffi.h:66:0:
error:
/Users/stu/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffitarget.h:6:10:
error:
fatal error: 'ffitarget_arm64.h' file not found
|
6 | #include "ffitarget_arm64.h"
| ^
#include "ffitarget_arm64.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
Am I missing some system library or header that GHC is expecting?