Stg-lint and bootstrapping (fails?)

Gabor Greif ggreif at gmail.com
Wed Aug 16 18:04:27 UTC 2017


Hi all,

I tried an stg-lint build thus:

$ make V=1 GhcStage2HcOpts="-O1 -g -dstg-lint"

... and failed:

"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -O0
-H64m -Wall -fllvm-fill-undef-with-garbage    -Werror
-this-unit-id base-4.10.0.0 -hide-all-packages -i -ilibraries/base/.
-ilibraries/base/dist-install/build
-Ilibraries/base/dist-install/build
-ilibraries/base/dist-install/build/./autogen
-Ilibraries/base/dist-install/build/./autogen -Ilibraries/base/include
  -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include
-optPlibraries/base/dist-install/build/./autogen/cabal_macros.h
-package-id rts -package-id ghc-prim-0.5.1.0 -package-id
integer-gmp-1.0.1.0 -this-unit-id base -XHaskell2010 -O -dcore-lint
-dno-debug-output  -no-user-package-db -rtsopts  -Wno-trustworthy-safe
-Wno-deprecated-flags     -Wnoncanonical-monad-instances  -odir
libraries/base/dist-install/build -hidir
libraries/base/dist-install/build -stubdir
libraries/base/dist-install/build   -dynamic-too -c
libraries/base/./System/Mem/Weak.hs -o
libraries/base/dist-install/build/System/Mem/Weak.o -dyno
libraries/base/dist-install/build/System/Mem/Weak.dyn_o
"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -O0
-H64m -Wall -fllvm-fill-undef-with-garbage    -Werror
-this-unit-id base-4.10.0.0 -hide-all-packages -i -ilibraries/base/.
-ilibraries/base/dist-install/build
-Ilibraries/base/dist-install/build
-ilibraries/base/dist-install/build/./autogen
-Ilibraries/base/dist-install/build/./autogen -Ilibraries/base/include
  -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include
-optPlibraries/base/dist-install/build/./autogen/cabal_macros.h
-package-id rts -package-id ghc-prim-0.5.1.0 -package-id
integer-gmp-1.0.1.0 -this-unit-id base -XHaskell2010 -O -dcore-lint
-dno-debug-output  -no-user-package-db -rtsopts  -Wno-trustworthy-safe
-Wno-deprecated-flags     -Wnoncanonical-monad-instances  -odir
libraries/base/dist-install/build -hidir
libraries/base/dist-install/build -stubdir
libraries/base/dist-install/build   -dynamic-too -c
libraries/base/./Control/Monad/IO/Class.hs -o
libraries/base/dist-install/build/Control/Monad/IO/Class.o -dyno
libraries/base/dist-install/build/Control/Monad/IO/Class.dyn_o
"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -O0
-H64m -Wall -fllvm-fill-undef-with-garbage    -Werror  -Iincludes
-Iincludes/dist -Iincludes/dist-derivedconstants/header
-Iincludes/dist-ghcconstants/header   -this-unit-id ghc-8.3
-hide-all-packages -i -icompiler/backpack -icompiler/basicTypes
-icompiler/cmm -icompiler/codeGen -icompiler/coreSyn
-icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface
-icompiler/llvmGen -icompiler/main -icompiler/nativeGen
-icompiler/parser -icompiler/prelude -icompiler/profiling
-icompiler/rename -icompiler/simplCore -icompiler/simplStg
-icompiler/specialise -icompiler/stgSyn -icompiler/stranal
-icompiler/typecheck -icompiler/types -icompiler/utils
-icompiler/vectorise -icompiler/stage2/build -Icompiler/stage2/build
-icompiler/stage2/build/./autogen -Icompiler/stage2/build/./autogen
-Icompiler/. -Icompiler/parser -Icompiler/utils
-Icompiler/../rts/dist/build -Icompiler/stage2   -optP-DGHCI
-optP-include -optPcompiler/stage2/build/./autogen/cabal_macros.h
-package-id base-4.10.0.0 -package-id deepseq-1.4.3.0 -package-id
directory-1.3.0.2 -package-id process-1.6.1.0 -package-id
bytestring-0.10.8.2 -package-id binary-0.8.5.1 -package-id
time-1.8.0.2 -package-id containers-0.5.10.2 -package-id array-0.5.2.0
-package-id filepath-1.4.1.2 -package-id template-haskell-2.12.0.0
-package-id hpc-0.6.0.3 -package-id transformers-0.5.2.0 -package-id
ghc-boot-8.3 -package-id ghc-boot-th-8.3 -package-id ghci-8.3
-package-id unix-2.7.2.2 -package-id terminfo-0.4.1.0 -Wall
-fno-warn-name-shadowing -this-unit-id ghc -XHaskell2010
-optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -Rghc-timing
-O1 -g -dstg-lint  -no-user-package-db -rtsopts
-Wnoncanonical-monad-instances  -odir compiler/stage2/build -hidir
compiler/stage2/build -stubdir compiler/stage2/build   -dynamic-too -c
compiler/utils/Exception.hs -o compiler/stage2/build/Exception.o -dyno
compiler/stage2/build/Exception.dyn_o
/home/ggreif/%NoBackup%/ghc-head/libraries/base/dist-install/build/GHC/IO/Exception.hi
Declaration for $fExceptionIOException4
Unfolding of $fExceptionIOException4:
  Failed to load interface for ?GHC.Fingerprint?
  There are files missing in the ?base-4.10.0.0? package,
  try running 'ghc-pkg check'.
  Use -v to see a list of the files searched for.
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 8.3.20170815 for x86_64-unknown-linux):
        kindPrimRep
  * -> *
  typePrimRep (m_as6 :: * -> *)
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1138:37
in ghc:Outputable
        pprPanic, called at compiler/simplStg/RepType.hs:344:5 in ghc:RepType
        kindPrimRep, called at compiler/simplStg/RepType.hs:305:18 in
ghc:RepType
        typePrimRep, called at compiler/stgSyn/StgLint.hs:437:17 in ghc:StgLint

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

<<ghc: 144952288 bytes, 38 GCs, 4093040/9445544 avg/max bytes
residency (4 samples), 61M in use, 0.000 INIT (0.000 elapsed), 0.355
MUT (0.386 elapsed), 0.216 GC (0.216 elapsed) :ghc>>
make[1]: *** [compiler/stage2/build/Exception.o] Error 1
make: *** [all] Error 2

What is the status of stg-lint? Is the above expected to happen? This
is stock `master` branch as of today.

Cheers,

    Gabor


More information about the ghc-devs mailing list