compiling cabal-1.24.2.0 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[1]:.../src/Cabal-1.24.2.0>ulimit -v 2600000
ben@yuiitsu[1]:.../src/Cabal-1.24.2.0>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-1.24.2.0 (lib) (first run)
Configuring library for Cabal-1.24.2.0..
Preprocessing library for Cabal-1.24.2.0..
Building library for Cabal-1.24.2.0..
[ 1 of 86] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, /home/ben/src/Cabal-1.24.2.0/dist-newstyle/build/x86_64-linux/ghc-8.2.2/Cabal-1.24.2.0/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-1.24.2.0 (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).
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |