Skip to content

GHC 9.2 testsuite build failure due to ANN annotation

Summary

Trying to run the testsuite for GHC 9.2 branch results in:

Error when running Shake build system:
  at want, called at src/Main.hs:104:30 in main:Main
* Depends on: test
  at need, called at src/Rules/Test.hs:199:9 in main:Rules.Test
* Depends on: _build/stage1/bin/check-exact
  at need, called at src/Rules/Program.hs:125:5 in main:Rules.Program
* Depends on: _build/stage1/utils/check-exact/build/Preprocess.dyn_o
  at &%>, called at src/Rules/Compile.hs:57:7 in main:Rules.Compile
* Depends on: _build/stage1/utils/check-exact/build/Preprocess.dyn_o _build/stage1/utils/check-exact/build/Preprocess.dyn_hi
  at needHasChanged, called at src/Rules/Compile.hs:64:27 in main:Rules.Compile
* Depends on: _build/stage1/utils/check-exact/build/Preprocess.o
  at &%>, called at src/Rules/Compile.hs:80:9 in main:Rules.Compile
* Depends on: _build/stage1/utils/check-exact/build/Preprocess.o _build/stage1/utils/check-exact/build/Preprocess.hi
  at cmd', called at src/Builder.hs:322:23 in main:Builder
  at cmd, called at src/Builder.hs:424:8 in main:Builder
* Raised the exception:
Development.Shake.cmd, system command failed
Command line: _build/stage0/bin/ghc -Wall -fdiagnostics-color=never -dynamic-too -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-package-id Cabal-3.6.0.0' '-package-id base-4.16.0.0' '-package-id bytestring-0.11.1.0' '-package-id containers-0.6.5.1' '-package-id directory-1.3.6.2' '-package-id filepath-1.4.2.1' '-package-id ghc-9.2.0.20210822' '-package-id ghc-boot-9.2.0.20210822' '-package-id mtl-2.2.2' -i -i/devel/daily-ghc/ghc/src/_build/stage1/utils/check-exact/build -i/devel/daily-ghc/ghc/src/_build/stage1/utils/check-exact/build/check-exact/autogen -i/devel/daily-ghc/ghc/src/utils/check-exact -Iincludes -I_build/stage1/lib -I_build/stage1/utils/check-exact/build -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/ghc-9.2.0.20210822/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/process-1.6.13.2/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/unix-2.7.2.2/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/time-1.11.1.1/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/bytestring-0.11.1.0/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/base-4.16.0.0/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/ghc-bignum-1.2/include -I/devel/daily-ghc/ghc/src/_build/stage1/lib/s390x-linux-ghc-9.2.0.20210822/rts-1.0.2/include -I_build/stage1/lib -optc-I_build/stage1/lib -optP-include -optP_build/stage1/utils/check-exact/build/check-exact/autogen/cabal_macros.h -outputdir _build/stage1/utils/check-exact/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c utils/check-exact/Preprocess.hs -o _build/stage1/utils/check-exact/build/Preprocess.o -fllvm-fill-undef-with-garbage -Wall -XHaskell2010 -no-global-package-db -package-db=/devel/daily-ghc/ghc/src/_build/stage1/lib/package.conf.d -ghcversion-file=/devel/daily-ghc/ghc/src/_build/stage1/lib/ghcversion.h -Werror
Exit code: 1
Stderr and Stdout:
utils/check-exact/Preprocess.hs:49:1: error: [-Werror]
    Ignoring ANN annotations, because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi
   |
49 | {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Running the testsuite for branches 9.0 as well as mainline is successful.

Steps to reproduce

./boot
./configure
./hadrian/build -j --flavour=validate --docs=no-sphinx test

Environment

  • GHC version used: 8.10.5
  • GHC version build for: 9.2 branch (currently 6566ad3e)

Optional:

  • Operating System: Fedora 33
  • System Architecture: s390x
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information