Missing dependency on ghcplatform.h from deriveConstants?
Recently I saw the following CI failure in the validate-x86_64-linux-deb9-hadrian
job:
/-----------------------------------------------------------------------------------------------\
| Successfully built program 'deriveConstants' (Stage0). |
| Executable: _build/stage0/bin/deriveConstants |
| Program synopsis: Derive header files containing various constants for the GHC build process. |
\-----------------------------------------------------------------------------------------------/
| Run DeriveConstants: none => _build/stage1/lib/platformConstants (and 1 more)
In file included from /tmp/extra-dir-81523003630524/tmp.c:12:0:
rts/PosixSource.h:11:25: fatal error: ghcplatform.h: No such file or directory
#include <ghcplatform.h>
^
compilation terminated.
Executing "/usr/bin/cc" failed
Error when running Shake build system:
at want, called at src/Main.hs:97: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.5-602f2cdbd3147204d88e77f8741bf241686d3245c138659b0f8f659103b171f2:Development.Shake.Internal.Rules.Rerun
* Depends on: binary-dist-dir
at need, called at src/Rules/BinaryDist.hs:119:9 in main:Rules.BinaryDist
* Depends on: _build/stage1/lib/package.conf.d/ghc-8.11.0.20200602.conf
at need, called at src/Rules/Register.hs:101:34 in main:Rules.Register
* Depends on: _build/stage1/lib/platformConstants
at cmd', called at src/Builder.hs:291:23 in main:Builder
at cmd, called at src/Builder.hs:376:8 in main:Builder
* Raised the exception:
Development.Shake.cmd, system command failed
Command line: _build/stage0/bin/deriveConstants --gen-haskell-value -o _build/stage1/lib/platformConstants --tmpdir /tmp/extra-dir-81523003630524 --gcc-program /usr/bin/cc --gcc-flag -Wall --gcc-flag -Werror=unused-but-set-variable --gcc-flag -Wno-error=inline --gcc-flag -Irts --gcc-flag -Iincludes --gcc-flag -I_build/stage1/lib --gcc-flag -fcommon --nm-program /usr/bin/nm --objdump-program /usr/bin/objdump --target-os linux
Exit code: 1
Stderr and Stdout:
In file included from /tmp/extra-dir-81523003630524/tmp.c:12:0:
rts/PosixSource.h:11:25: fatal error: ghcplatform.h: No such file or directory
#include <ghcplatform.h>
^
compilation terminated.
Executing "/usr/bin/cc" failed
It looks to me like Hadrian is missing a dependency from deriveConstants
to ghcplatform.h
.