Virtual memory exhausted when trying to build unregisterised compiler on 32-bit targets
Since version 8.6.5 was uploaded to Debian unstable, the unregisterised compiler fails to build for 32-bit targets due to running out of memory:
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf p_o -hcsuf p_hc -static -prof -eventlog -H32m -O -lffi -optl-pthread -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derived
constants/header -Iincludes/dist-ghcconstants/header -this-unit-id ghc-8.6.5 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/cod
eGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icom
piler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typechec
k -icompiler/types -icompiler/utils -icompiler/stage2/build -Icompiler/stage2/build -icompiler/stage2/build/./autogen -Icompiler/stage2/build/./autogen -Icompiler/. -Icompi
ler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2 -Icompiler/stage2/build/. -Icompiler/stage2/build/parser -Icompiler/stage2/build/utils -Icompiler
/stage2/build/../rts/dist/build -Icompiler/stage2/build/stage2 -optP-DGHCI -optP-include -optPcompiler/stage2/build/./autogen/cabal_macros.h -package-id array-0.5.3.0 -pa
ckage-id base-4.12.0.0 -package-id binary-0.8.6.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-boot-8.6.5 -package-id ghc-boot-th-8.6.5 -package-id ghc-heap-8.6.5 -package-id ghci-8.6.5 -package-id hpc-0.6.0.3 -package-id p
rocess-1.6.5.0 -package-id template-haskell-2.14.0.0 -package-id terminfo-0.4.1.2 -package-id time-1.8.0.2 -package-id transformers-0.5.6.2 -package-id unix-2.7.2.2 -Wall -
Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DN
O_REGS -DNOSMP -optc-DNOSMP -optc-DTHREADED_RTS -DSTAGE=2 -Rghc-timing -Wcpp-undef -no-user-package-db -rtsopts -Wnoncanonical-monad-instances -odir compiler/stage
2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build -c compiler/nativeGen/X86/Ppr.hs -o compiler/stage2/build/X86/Ppr.p_o -dyno compiler/stage2/build/X86
/Ppr.dyn_o
virtual memory exhausted: Cannot allocate memory
`hppa-linux-gnu-gcc' failed in phase `C Compiler'. (Exit code: 1)
<<ghc: 882083356 bytes, 1657 GCs, 151405471/365788220 avg/max bytes residency (35 samples), 975M in use, 0.006 INIT (0.004 elapsed), 3841.178 MUT (7319.124 elapsed), 367.393 GC (373.490 elapsed) :ghc>>
make[3]: *** [compiler/ghc.mk:447: compiler/stage2/build/HsInstances.p_o] Error 1
make[3]: *** Waiting for unfinished jobs....
<<ghc: 1389653984 bytes, 182 GCs, 19029056/37728316 avg/max bytes residency (8 samples), 99M in use, 0.005 INIT (0.008 elapsed), 89.365 MUT (260.686 elapsed), 7.632 GC (8.908 elapsed) :ghc>>
<<ghc: 1116067080 bytes, 146 GCs, 16268668/40325592 avg/max bytes residency (7 samples), 95M in use, 0.007 INIT (0.004 elapsed), 81.557 MUT (222.667 elapsed), 6.641 GC (6.660 elapsed) :ghc>>
<<ghc: 2046863200 bytes, 220 GCs, 23674877/45346900 avg/max bytes residency (8 samples), 109M in use, 0.005 INIT (0.008 elapsed), 105.283 MUT (227.279 elapsed), 9.117 GC (9.168 elapsed) :ghc>>
make[2]: *** [Makefile:127: all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
Full build log for Debian hppa attached.