[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OOM while building ghc 9.4.5



Hi team,

While preparing ghc 9.4.5 in Debian experimental, it fails to build with
OOM on mipsel [1].

The command that fails is:

$ "inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O -lffi -optl-pthread -optc--param -optcggc-min-expand=5 -optc--param -optcggc-min-heapsize=4096 -Wall     -this-unit-id ghc-9.4.5 -hide-all-packages -package-env - -i -icompiler/. -icompiler/stage2/build -Icompiler/stage2/build -icompiler/stage2/build/./autogen -Icompiler/stage2/build/./autogen -Icompiler/. -Icompiler/stage2/build/. -optP-DHAVE_INTERNAL_INTERPRETER -optP-DCAN_LOAD_DLL -optP-include -optPcompiler/stage2/build/./autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.17.1.0 -package-id binary-0.8.9.1 -package-id bytestring-0.11.4.0 -package-id containers-0.6.7 -package-id deepseq-1.4.8.0 -package-id directory-1.3.7.1 -package-id exceptions-0.10.5 -package-id filepath-1.4.2.2 -package-id ghc-boot-9.4.5 -package-id ghc-heap-9.4.5 -package-id ghci-9.4.5 -package-id hpc-0.6.1.0 -package-id process-1.6.16.0 -package-id stm-2.5.1.0 -package-id template-haskell-2.19.0.0 -package-id terminfo-0.4.1.5 -package-id time-1.12.2 -package-id transformers-0.5.6.2 -package-id unix-2.7.3 -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -XBangPatterns -XScopedTypeVariables -XMonoLocalBinds -XTypeOperators -Rghc-timing -Wcpp-undef -Wincomplete-uni-patterns -Wincomplete-record-updates  -no-user-package-db -rtsopts    -O0  -Wnoncanonical-monad-instances  -outputdir compiler/stage2/build   -c compiler/./GHC/Hs/Instances.hs -o compiler/stage2/build/GHC/Hs/Instances.p_o -dyno compiler/stage2/build/GHC/Hs/Instances.dyn_o

virtual memory exhausted: Cannot allocate memory
`gcc' failed in phase `C Compiler'. (Exit code: 1)

Building an unregisterised ghc compiler on 32-bit targets has trouble
handling the Instances.hs file. This has been reported upstream here[2].
Until now, we have managed to workaround this by compiling this file
alone with O0 (as shown in the above command), but since version 9.4.5
even that doesn't work.

Is there anything else we can try to compile ghc 9.4.5 in mipsel, or
should we give up in supporting mipsel at all?

[1] https://buildd.debian.org/status/package.php?p=ghc&suite=experimental
[2] https://gitlab.haskell.org/ghc/ghc/-/issues/17048

PS please CC me as I am not subscribed to this list.

Best,

-- 
Ilias


Reply to: