Hadrian: Deleting `_build/stage1/libraries/ghc-prim/build` and rebuild now fails
In the past I have found it useful to delete various _build/stage1/libraries/*/build
directories to force recompilation of libraries and their dependencies. However, recently it seems this stopped working. In particular after deleting _build/stage1/libraries/ghc-prim/build/
and attempting to rebuild I now see:
| Run Ghc CompileHs Stage1: libraries/ghc-prim/GHC/Types.hs => _build/stage1/libraries/ghc-prim/build/GHC/Types.o
Command line: _build/stage0/bin/ghc -Wall -Wcompat -hisuf p_hi -osuf p_o -hcsuf p_hc -static -prof -eventlog -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id ghc-prim-0.8.0' '-package-id rts-1.0.2' -i -i/opt/exp/ghc/ghc-landing/_build/stage1/libraries/ghc-prim/build -i/opt/exp/ghc/ghc-landing/_build/stage1/libraries/ghc-prim/build/autogen -i/opt/exp/ghc/ghc-landing/libraries/ghc-prim -Irts/include -I_build/stage1/libraries/ghc-prim/build -I/nix/store/zj2j583xdbdbgdiywsf70nadwmmgipp0-gmp-6.2.1-dev/include -I/nix/store/r4vjb3k8rpwna5n3kpm0xnhsyqmc6bp8-numactl-2.0.14/include -I/nix/store/5k90yvmpm21l5ixdrmq6ws5w80px81zv-ncurses-6.2-dev/include -I/nix/store/akf9zni4h4kp6bj2djqn8lra8yhxvgjb-elfutils-0.186-bin/include -I/nix/store/akf9zni4h4kp6bj2djqn8lra8yhxvgjb-elfutils-0.186-bin/include -I/nix/store/r4vjb3k8rpwna5n3kpm0xnhsyqmc6bp8-numactl-2.0.14/include -I/opt/exp/ghc/ghc-landing/_build/stage1/lib/x86_64-linux-ghc-9.3.20220209/rts-1.0.2/include -optP-include -optP_build/stage1/libraries/ghc-prim/build/autogen/cabal_macros.h -outputdir _build/stage1/libraries/ghc-prim/build -fdiagnostics-color=always -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c libraries/ghc-prim/GHC/Types.hs -o _build/stage1/libraries/ghc-prim/build/GHC/Types.p_o -O2 -H32m -this-unit-id ghc-prim -XHaskell2010 -no-global-package-db -package-db=/opt/exp/ghc/ghc-landing/_build/stage1/lib/package.conf.d -ghcversion-file=rts/include/ghcversion.h -haddock -Wno-deprecated-flags -Wno-trustworthy-safe
===> Command failed with error code: 1
Bad interface file: _build/stage1/libraries/ghc-prim/build/GHC/Types.p_hi
_build/stage1/libraries/ghc-prim/build/GHC/Types.p_hi: openBinaryFile: does not exist (No such file or directory)
Command failed
Build failed.
It appears that we are looking for an interface file for GHC.Types
while compiling GHC.Types
.