haddock: Haddock runs out of memory when building documentation for GHC

On GHC commit 6f07f82 (which is pinned against Haddock commit a31b562f3f3a33ae2b08f9173ea08506b357f3a5), building GHC with the quick build flavor and the Make-based build system causes Haddock to run out of memory before it can finish building the documentation for ghc-the-library:

Warning: 'Lift' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'tcInferRho' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'getInitialKind' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'tcImplicitTKBndrs' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'wanted' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'tcRnSrcDecls' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'KindRep' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
haddock: out of memory
compiler/ghc.mk:430: recipe for target 'compiler/stage2/doc/html/ghc/ghc.haddock' failed
make[1]: *** [compiler/stage2/doc/html/ghc/ghc.haddock] Error 251
Makefile:123: recipe for target 'all' failed
make: *** [all] Error 2

Some observations:

  • It appears to run out of memory in the exact same spot every time I try this (right after KindRep).
  • I haven’t yet tried this with a build flavour besides quick or using the equivalent Hadrian configuration.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

Now that https://gitlab.haskell.org/ghc/ghc/merge_requests/942 has landed on GHC’s master branch, I’ve opened https://gitlab.haskell.org/ghc/ghc/merge_requests/1022 to backport it to the ghc-8.8 branch.