Failure to compile
Summary
On Windows I get a compile error when trying to build GHC as at 795986aa. I am using the Hadrian/Stack approach.
Steps to reproduce
C:\Neil\ghc\2019-09-26\ghc>hadrian\build.stack.bat --configure tool-args -q --build-root=.hie-bios --flavour=ghc-in-ghci
realgcc.exe: error: .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.o: No such file or directory
linking .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.o failed (exit code 1)
command was: C:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/mingw/bin/gcc.exe .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.o .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_utils.o -o .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.exe
hadrian.EXE: Error when running Shake build system:
at want, called at src\Main.hs:89:30 in main:Main
* Depends on: tool-args
at need, called at src\Rules.hs:54:5 in main:Rules
* Depends on: .hie-bios/stage0/compiler/build/CmmLex.hs
at apply1, called at src\Development\Shake\Internal\Rules\Oracle.hs:159:32 in shake-0.18.3-3BLsgGZEbdn8lXb9PZvVjC:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (Generator (Stage0,Package {pkgType = Library, pkgName = "ghc", pkgPath = "compiler"},".hie-bios/stage0/compiler/build/CmmLex.hs"))
at apply1, called at src\Development\Shake\Internal\Rules\Oracle.hs:159:32 in shake-0.18.3-3BLsgGZEbdn8lXb9PZvVjC: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: .hie-bios/stage0/compiler/setup-config
at need, called at src\Hadrian\Haskell\Cabal\Parse.hs:121:5 in main:Hadrian.Haskell.Cabal.Parse
* Depends on: .hie-bios/stage0/lib/package.conf.d/ghc-heap-8.9.0.20190925.conf
at need, called at src\Rules\Register.hs:113:5 in main:Rules.Register
* Depends on: .hie-bios/stage0/libraries/ghc-heap/build/HSghc-heap-8.9.0.20190925.o
at need, called at src\Rules\Library.hs:102:5 in main:Rules.Library
* Depends on: .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils.o
at &%>, called at src\Rules\Compile.hs:47:9 in main:Rules.Compile
* Depends on: .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils.o .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils.hi
at apply1, called at src\Development\Shake\Internal\Rules\Oracle.hs:159:32 in shake-0.18.3-3BLsgGZEbdn8lXb9PZvVjC:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (KeyValues (".hie-bios/stage0/libraries/ghc-heap/.dependencies",".hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils.o"))
at need, called at src\Hadrian\Oracles\TextFile.hs:96:9 in main:Hadrian.Oracles.TextFile
* Depends on: .hie-bios/stage0/libraries/ghc-heap/.dependencies
at readFile', called at src\Rules\Dependencies.hs:34:19 in main:Rules.Dependencies
at need, called at src\Development\Shake\Internal\Derived.hs:118:15 in shake-0.18.3-3BLsgGZEbdn8lXb9PZvVjC:Development.Shake.Internal.Derived
* Depends on: .hie-bios/stage0/libraries/ghc-heap/.dependencies.mk
at need, called at src\Rules\Dependencies.hs:26:9 in main:Rules.Dependencies
* Depends on: .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils.hs
* Raised the exception:
user error (Development.Shake.cmd, system command failed
Command line: .hie-bios/stage0/bin/hsc2hs.exe --cc=C:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/mingw/bin/gcc.exe --ld=C:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/mingw/bin/gcc.exe --cflag=-I.hie-bios/generated --cflag=-I.hie-bios/stage0/libraries/ghc-heap/build --cflag=-IC:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/lib/base-4.12.0.0/include --cflag=-IC:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/lib/integer-gmp-1.0.2.0/include --cflag=-IC:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/lib/include --cflag=-Wall --cflag=-Wno-error=inline --cflag=-include --cflag=.hie-bios/stage0/libraries/ghc-heap/build/autogen/cabal_macros.h --cflag=-Dx86_64_HOST_ARCH=1 --cflag=-Dmingw32_HOST_OS=1 --cflag=-D__GLASGOW_HASKELL__=806 --template=C:/Neil/ghc/2019-09-26/ghc/.hie-bios/stage0/lib/template-hsc.h libraries/ghc-heap/GHC/Exts/Heap/Utils.hsc -o .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils.hs
Exit code: 1
Stderr:
realgcc.exe: error: .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.o: No such file or directory
linking .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.o failed (exit code 1)
command was: C:/Users/ndmit_000/AppData/Local/Programs/stack/x86_64-windows/ghc-8.6.5/mingw/bin/gcc.exe .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.o .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_utils.o -o .hie-bios/stage0/libraries/ghc-heap/build/GHC/Exts/Heap/Utils_hsc_make.exe
)
Expected behavior
Print out some command line flags required to build GHC.
Environment
Windows 10. Stack 2.1.3.
CC @snowleopard