missing template-haskell dependency while installing hadrian
Summary
I'm trying to build Hadrian, and I'm getting the error below. There was another issue addressing this, but it seems like it's a race condition, so I tried building with -j1 (which presumably would prevent the issue), but it didn't work.
hadrian: Encountered missing or private dependencies:
template-haskell (>=2.2 && <2.17) && ==2.17.0.0
Error when running Shake build system:
at action, called at src/Rules.hs:40:19 in main:Rules
at need, called at src/Rules.hs:62:5 in main:Rules
* Depends on: _build/stage0/lib/package.conf.d/exceptions-0.10.4.conf
at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.18.5-ff2d55bc7a583713dacf2cc182c92c161d6347d3b0f20f7dd27741dbc345a51c:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage0, package = Package {pkgType = Library, pkgName = "exceptions", pkgPath = "libraries/exceptions"}, way = v}))
at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage0/libraries/exceptions/setup-config
* Raised the exception:
ExitFailure 1
Steps to reproduce
I obtained the repo as follows:
git clone --recursive https://gitlab.haskell.org/ghc/ghc.git
cd ghc
git checkout ghc-9.0
This is how I tried to build:
rm -rf _build
./hadrian/build clean
./hadrian/build stage0:lib:template-haskell
./boot && ./configure
./hadrian/build -j1 -c
## Expected behavior
Build Hadrian!
## Environment
* GHC version used: 9.0
Optional:
* Operating System: Ubuntu 18.04
* System Architecture: x86_64