compiling cabal-126.96.36.199 requires almost 3 GB of memory
Not sure if this is really a bug, but I noticed that ghc-8.2.2 requires a whole lot more memory than ghc-7-10.3. This is how I found out about it:
ben@yuiitsu:.../src/Cabal-188.8.131.52>ulimit -v 2600000 ben@yuiitsu:.../src/Cabal-184.108.40.206>cabal new-build Resolving dependencies... Build profile: -w ghc-8.2.2 -O1 In order, the following will be built (use -v for more details): - Cabal-220.127.116.11 (lib) (first run) Configuring library for Cabal-18.104.22.168.. Preprocessing library for Cabal-22.214.171.124.. Building library for Cabal-126.96.36.199.. [ 1 of 86] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, /home/ben/src/Cabal-188.8.131.52/dist-newstyle/build/x86_64-linux/ghc-8.2.2/Cabal-184.108.40.206/build/Distribution/Compat/Binary.o ) [...] [30 of 86] Compiling Distribution.PackageDescription ( Distribution/PackageDescription.hs, dist/build/Distribution/PackageDescription.o ) ghc: out of memory cabal: Failed to build Cabal-220.127.116.11 (which is required by darcs-2.13.0). The build process terminated with exit code 251
It works when I ulimit -v 3000000.
I previously had the limit at 2200000 and it worked just fine with ghc-7.10.3. The reason i limit the memory available to ghc is to avoid my machine freezing up due to thrashing (I only have 4GB physical RAM).