Skip to content

Can't build GHC: missing or private dependencies

Still can't build GHC:

rae:23:08:59 ~/ghc/ghc-spj> hadrun
--build-root=_build --flavour=default -j9 --flavour=devel2 --docs=none
Up to date
| Configure package 'unix'
| Configure package 'integer-gmp'
| Configure package 'text'
| Configure package 'ghc-heap'
| Configure package 'ghc-compact'
| Configure package 'pretty'
| Configure package 'ghc-boot'
| Configure package 'directory'
| Configure package 'process'
| Configure package 'hpc'
| Configure package 'Cabal'
| Configure package 'base'
| Configure package 'binary'
| Configure package 'Cabal-syntax'
| Configure package 'ghci'
| Configure package 'array'
| Configure package 'unix'
| Configure package 'transformers'
| Configure package 'template-haskell'
| Configure package 'bytestring'
| Configure package 'Cabal-syntax'
| Configure package 'time'
| Configure package 'hpc'
| Configure package 'directory'
| Configure package 'ghc-prim'
| Configure package 'exceptions'
| Configure package 'haskeline'
| Configure package 'deepseq'
| Configure package 'terminfo'
| Configure package 'xhtml'
| Configure package 'rts'
| Configure package 'parsec'
| Configure package 'ghc-boot-th'
| Configure package 'ghc-boot'
| Configure package 'containers'
| Configure package 'stm'
| Configure package 'Cabal'
| Configure package 'libiserv'
| Configure package 'mtl'
| Configure package 'ghc-bignum'
| Configure package 'parsec'
| Configure package 'text'
| Configure package 'filepath'
| Configure package 'process'
| Configure package 'ghci'
| Configure package 'ghc'
| Configure package 'ghc'
| Copy package 'linters-common'
# cabal-copy (for _build/stageBoot/lib/package.conf.d/linters-common-0.1.0.0.conf)
# cabal-configure (for _build/stage0/libraries/unix/setup-config)
# cabal-configure (for _build/stage0/libraries/text/setup-config)
| Run Ghc FindHsDependencies (Stage0 InTreeLibs): libraries/binary/src/Data/Binary.hs (and 8 more) => _build/stage0/libraries/binary/.dependencies.mk
| Run GhcPkg Recache (Stage0 GlobalLibs): none => none
hadrian: Encountered missing or private dependencies:
base (>=4.9 && <5) && <0

ExitFailure 1
Build failed.
hadrian-util: Received ExitFailure 1 when running
Raw command: /Users/rae/ghc/ghc-spj/hadrian/build-cabal --build-root=_build --flavour=default -j9 --flavour=devel2 --docs=none
Run from: /Users/rae/ghc/ghc-spj

The hadrun at the top is an alias for Ben's hadrian-util script:

rae:23:09:02 ~/ghc/ghc-spj> alias hadrun
alias hadrun='hadrian-util run -j$THREADS --flavour=$GHC_FLAVOUR --docs=none'

where $THREADS is 9 and $GHC_FLAVOUR is devel2.

I'm on macOS 12.3.1 on an M1 Mac. My bootstrap GHC is 9.2.1, which is generally working for other projects.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information