GHC 9.2.1 not configured correctly for M1 Mac
Summary
Cannot install hlint
with ghc
9.2.1 on MacOS 12.0.1:
❯ cabal install hlint
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
- happy-1.20.0 (exe:happy) (requires build)
- hscolour-1.24.4 (lib:hscolour) (requires build)
- hashable-1.4.0.1 (lib) (requires build)
- polyparse-1.13 (lib) (requires build)
- haskell-src-exts-1.23.1 (lib) (requires build)
- unordered-containers-0.2.16.0 (lib) (requires download & build)
- cpphs-1.20.9.1 (lib) (requires build)
- uniplate-1.6.13 (lib) (requires build)
- hlint-1.8.50 (lib:hlint, exe:hlint) (requires download & build)
Downloading unordered-containers-0.2.16.0
Starting hashable-1.4.0.1 (lib)
Starting polyparse-1.13 (lib)
Starting hscolour-1.24.4 (all, legacy fallback)
Starting happy-1.20.0 (exe:happy)
Downloaded unordered-containers-0.2.16.0
Downloading hlint-1.8.50
Building polyparse-1.13 (lib)
Building hscolour-1.24.4 (all, legacy fallback)
Building happy-1.20.0 (exe:happy)
Building hashable-1.4.0.1 (lib)
Downloaded hlint-1.8.50
Installing hscolour-1.24.4 (all, legacy fallback)
Completed hscolour-1.24.4 (all, legacy fallback)
Installing polyparse-1.13 (lib)
Completed polyparse-1.13 (lib)
Installing happy-1.20.0 (exe:happy)
Completed happy-1.20.0 (exe:happy)
Failed to build hashable-1.4.0.1.
Build log ( /Users/jrp/.cabal/logs/ghc-9.2.1/hshbl-1.4.0.1-0ac8b4d6.log ):
Configuring library for hashable-1.4.0.1..
Preprocessing library for hashable-1.4.0.1..
Building library for hashable-1.4.0.1..
[1 of 7] Compiling Data.Hashable.Imports ( src/Data/Hashable/Imports.hs, dist/build/Data/Hashable/Imports.o, dist/build/Data/Hashable/Imports.dyn_o )
src/Data/Hashable/Imports.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
Data.Hashable.Imports is missing Safe Haskell mode
|
1 | -- | This module exists to avoid conditional imports
| ^
[2 of 7] Compiling Data.Hashable.LowLevel ( src/Data/Hashable/LowLevel.hs, dist/build/Data/Hashable/LowLevel.o, dist/build/Data/Hashable/LowLevel.dyn_o )
In file included from /var/folders/dg/qpjwkpwd61xbxnq052tp779w0000gn/T/ghc42279_0/ghc_14.c:4:0: error:
In file included from /Users/jrp/.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/jrp/.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.
`gcc' failed in phase `C Compiler'. (Exit code: 1)
cabal: Failed to build hashable-1.4.0.1 (which is required by hlint-1.8.50).
See the build log above for details.
Steps to reproduce
Install GHC 9.2.1 and cabal
3.6.2 on a MacBook Pro 2021 with ghcup
and cabal install hlint
Expected behavior
hlint
installed, as it is using 8.10.7 on the same setup
Environment
- GHC version used: 9.2.1
Optional:
- Operating System: MacOS 12.0.1
- System Architecture: Apple Silicon