Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

generating ghc.haddock uses a lot of memory #1384

Open
@juhp

Description

@juhp

I tried building ghc-9.2.1-alpha2 on Fedora armv7hl and it runs out of memory somehow:
GHC.Tc.Gen.HsType.tc_ihaddock: out of memory

I originally reported this to ghc 2 days ago, not noticing the memory issue.
So I am now reporting it here instead:

https://koji.fedoraproject.org/koji/taskinfo?taskID=66762262

GHC error in desugarer lookup in Ghci1:
  Can't find interface-file declaration for variable $bSM
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error
GHC error in desugarer lookup in Ghci1:
  Can't find interface-file declaration for variable $bSM
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error
GHC/Unit/Module/ModIface.hs:147:1
Warning: 'eps_decls' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
:
:
Warning: GHC.Tc.Instance.Class: could not find link destinations for:
	- GHC.Tc.Instance.Class.SafeOverlapping
	- GHC.Tc.Instance.Class.onlyNamedBndrsApplied
Warning: GHC.Tc.Instance.Typeable: could not find link destinations for:
	- GHC.Tc.Instance.Typeable.KindRepM
Warning: GHC.Rename.Env: could not find link destinations for:
	- GHC.Rename.Env.lookupQualifiedNameGHCi
Warning: GHC.Tc.Gen.HsType: could not find link destinations for:
	- GHC.Tc.Gen.HsType.TcTyMode
	- GHC.Tc.Gen.HsType.mode_tyki
	- GHC.Tc.Gen.HsType.AnyBoxedKind
	- GHC.Tc.Gen.HsType.LiftedKind
	- GHC.Tc.Gen.HsType.isAllowedDataResKind
	- GHC.Tc.Gen.HsType.SkolemMode
	- GHC.Tc.Gen.HsType.tc_ihaddock: out of memory (requested 1048576 bytes)
make[1]: *** [compiler/ghc.mk:291: compiler/stage2/doc/html/ghc/ghc.haddock] Error 251
make[1]: *** Deleting file 'compiler/stage2/doc/html/ghc/ghc.haddock'
make: *** [Makefile:128: all] Error 2

You can find the full build.log attached in the mentioned ghc ticket.

Environment

GHC version used: 8.10.4
Operating System: Fedora 33+
System Architecture: armv7hl

For now I have worked around it by disabling haddock on armv7hl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions