Skip to content

ghc 9.2.1 bootstrap error on arm: 'ffitarget_arm64.h' file not found

See: https://trac.macports.org/ticket/64836

:info:build /opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/bootstrap/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffitarget.h:6:10: error:
:info:build      fatal error: 'ffitarget_arm64.h' file not found
:info:build   |
:info:build 6 | #include "ffitarget_arm64.h"
:info:build   |          ^
:info:build #include "ffitarget_arm64.h"
:info:build          ^~~~~~~~~~~~~~~~~~~
:info:build 1 error generated.
:info:build `clang' failed in phase `C Compiler'. (Exit code: 1)

The file ffitarget_arm64.h exists in both Xcode and CLT:

$ locate ffitarget_arm64.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi/ffitarget_arm64.h
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/ffi/ffitarget_arm64.h
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/ffi/ffitarget_arm64.h
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/ffi/ffitarget_arm64.h
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information