8.6.4 panics while compiling "haddock-library/src/Documentation/Haddock/Types.hs" on bigendian
When building ghc-8.6.4 on s390x haddock-library causes ghc to crash:
"inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock-library/src -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP-include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id Cabal-2.4.0.1 -package-id array-0.5.3.0 -package-id base-4.12.0.0 -package-id bytestring-0.10.8.2 -package-id containers-0.6.0.1 -package-id deepseq-1.4.4.0 -package-id directory-1.3.3.0 -package-id filepath-1.4.2.1 -package-id ghc-8.6.4 -package-id ghc-boot-8.6.4 -package-id parsec-3.1.13.0 -package-id text-1.2.3.1 -package-id transformers-0.5.6.2 -package-id xhtml-3000.2.2.1 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad-instances -odir utils/haddock/dist/build -hidir utils/haddock/dist/build -stubdir utils/haddock/dist/build -c utils/haddock/haddock-library/src/Documentation/Haddock/Types.hs -o utils/haddock/dist/build/Documentation/Haddock/Types.dyn_o
BUILDSTDERR: ghc-stage2: panic! (the 'impossible' happened)
BUILDSTDERR: (GHC version 8.6.4 for s390x-ibm-linux):
BUILDSTDERR: urk! lookup local fingerprint
BUILDSTDERR: $fEqTokenDetails
BUILDSTDERR: [cESf7d :-> (Position, ea84d6940ae6c6236d2803657ff58b8b)]
BUILDSTDERR: Call stack:
BUILDSTDERR: CallStack (from HasCallStack):
BUILDSTDERR: callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
BUILDSTDERR: pprPanic, called at compiler/iface/MkIface.hs:534:37 in ghc:MkIface
BUILDSTDERR: Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
BUILDSTDERR: utils/haddock/haddock-library/src/Documentation/Haddock/Types.hs:38:38: error:
BUILDSTDERR: • GHC internal error: ‘Package’ is not in scope during type checking, but it passed the renamer
BUILDSTDERR: tcl_env of environment: [rIo :-> ATcTyCon Version :: *,
BUILDSTDERR: rIt :-> ATcTyCon Meta :: *, rIu :-> APromotionErr RecDataConPE]
BUILDSTDERR: • In the first argument of ‘Maybe’, namely ‘Package’
BUILDSTDERR: In the type ‘Maybe Package’
BUILDSTDERR: In the definition of data constructor ‘Meta’
BUILDSTDERR: |
BUILDSTDERR: 38 | , _package :: Maybe Package
BUILDSTDERR: | ^^^^^^^
BUILDSTDERR: make[1]: *** [utils/haddock/ghc.mk:20: utils/haddock/dist/build/Haddock/Backends/Hyperlinker/Types.dyn_o] Error 1
BUILDSTDERR: make[1]: *** Waiting for unfinished jobs....
BUILDSTDERR: make[1]: *** [utils/haddock/ghc.mk:20: utils/haddock/dist/build/Documentation/Haddock/Types.dyn_o] Error 1
BUILDSTDERR: make: *** [Makefile:127: all] Error 2
Full buildlog is here (for a couple of weeks): https://kojipkgs.fedoraproject.org//work/tasks/5342/33795342/build.log
I confirmed that unregisterised x86_64 ghc-8.6.4 builds its haddock okay.