Hadrian build fails after changing the bootstrap compiler
Summary
Using a recent HEAD (8127520e), if GHC is built using Hadrian, and the bootstrap compiler is then changed, an attempt to rebuild GHC fails with an uncaught exception.
Steps to reproduce
-
git clone --recurse-submodules https://gitlab.haskell.org/ghc/ghc.git fresh-ghc
-
cd fresh-ghc
-
git submodule update --init --recursive
-
ghcup set ghc 8.10.7
-
./boot
-
./configure
-
./hadrian/build -j
-
ghcup set ghc 9.0.1
-
./boot
-
./configure
-
./hadrian/build -j
Expected behavior
I expected the second build to succeed, but it fails with this output:
Error when running Shake build system:
at action, called at src/Rules.hs:39:19 in main:Rules
at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.19.4-14804ff74b1678b050130a6b940d7752bedd32673aae21cd5eae957bb9cfee11:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (PackageDataKey (Package {pkgType = Library, pkgName = "binary", pkgPath = "libraries/binary"}))
at error, called at libraries/binary/src/Data/Binary/Get.hs:351:5 in binary-0.8.8.0:Data.Binary.Get
* Raised the exception:
Data.Binary.Get.runGet at position 746: not enough bytes
Environment
- GHC versions used: 8.10.7 and 9.0.1, both installed with
ghcup
.
Optional:
- Operating System: Linux, Debian stable (bullseye)
- System Architecture: x86_64