Starting with 9.2, GHC OOMs while building the propellor package
$ git clone -b ghc-oom https://github.com/sjakobi/propellor.branchable.com
$ cd propellor.branchable.com
$ cabal build -w ghc-9.4.1 --allow-newer=hashable:ghc-bignum,base
<...>
[160 of 180] Compiling Propellor.Property.SiteSpecific.JoeySites ( src/Propellor/Property/SiteSpecific/JoeySites.hs, /home/simon/tmp/propellor-5.13/dist-newstyle/build/x86_64-linux/ghc-9.4.1/propellor-5.13/build/Propellor/Property/SiteSpecific/JoeySites.o, /home/simon/tmp/propellor-5.13/dist-newstyle/build/x86_64-linux/ghc-9.4.1/propellor-5.13/build/Propellor/Property/SiteSpecific/JoeySites.dyn_o )
Error: cabal: Failed to build propellor-5.13 (which is required by
exe:propellor-config from propellor-5.13 and exe:propellor from
propellor-5.13). The build process was killed (i.e. SIGKILL). The typical
reason for this is that there is not enough memory available (e.g. the OS
killed a process using lots of memory).
On my machine GHC takes more than 15GB of memory before being killed. With GHC 8.6.5 and 9.0.2 the memory usage is unremarkable and the build succeeds.
This is the problematic module: https://github.com/sjakobi/propellor.branchable.com/blob/d0dd9f43d5edbefcaf995920de5ee02074fc1169/src/Propellor/Property/SiteSpecific/JoeySites.hs
(CC @trac-joeyhess)
Edited by Simon Jakobi