Skip to content

Hadrian builds fail with missing dependencies

A few times now I have seen the deb9-hadrian CI job mysteriously fail with something along the lines of (e.g. see https://gitlab.haskell.org/osa1/ghc/-/jobs/229232)

...
/-------------------------------------------------------------------------\
| Successfully built library 'ghci' (Stage0, way v).                      |
| Library: _build/stage0/libraries/ghci/build/libHSghci-8.11.0.20200101.a |
| Library synopsis: The library supporting GHC's interactive interpreter. |
\-------------------------------------------------------------------------/
| Copy package 'ghci'
# cabal-copy (for _build/stage0/lib/package.conf.d/ghci-8.11.0.20200101.conf)
| Register package 'ghci'
# cabal-register (for _build/stage0/lib/package.conf.d/ghci-8.11.0.20200101.conf)
# cabal-configure (for _build/stage0/compiler/setup-config)
hadrian: Encountered missing or private dependencies:
hpc ==0.6.1.0

Error when running Shake build system:
  at want, called at src/Main.hs:89:30 in main:Main
* Depends on: binary-dist
  at apply1, called at src/Development/Shake/Internal/Rules/Rerun.hs:41:5 in shake-0.18.3-a9de361a74bef613491c235c1a1f725e6f3f1e9824ca9a8fbdfa98ba6ccae272:Development.Shake.Internal.Rules.Rerun
* Depends on: binary-dist-dir
  at need, called at src/Rules/BinaryDist.hs:104:9 in main:Rules.BinaryDist
* Depends on: _build/stage1/lib/package.conf.d/rts-1.0.conf
  at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.18.3-a9de361a74bef613491c235c1a1f725e6f3f1e9824ca9a8fbdfa98ba6ccae272:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "rts", pkgPath = "rts"}, way = v}))
  at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage1/rts/setup-config
  at need, called at src/Hadrian/Builder.hs:70:5 in main:Hadrian.Builder
* Depends on: _build/stage0/bin/ghc
  at need, called at src/Rules/Register.hs:73:5 in main:Rules.Register
* Depends on: _build/stage0/lib/x86_64-linux-ghc-8.6.5/ghc-8.11.0.20200101/libHSghc-8.11.0.20200101.a
  at need, called at src/Rules/Library.hs:44:5 in main:Rules.Library
* Depends on: _build/stage0/lib/package.conf.d/ghc-8.11.0.20200101.conf
  at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.18.3-a9de361a74bef613491c235c1a1f725e6f3f1e9824ca9a8fbdfa98ba6ccae272:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage0, package = Package {pkgType = Library, pkgName = "ghc", pkgPath = "compiler"}, way = v}))
  at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage0/compiler/setup-config
* Raised the exception:
ExitFailure 1

The problem appears to be non-deterministic since restarting the job often causes the issue to disappear.

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