Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,394
    • Issues 4,394
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 377
    • Merge Requests 377
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #14792

Closed
Open
Opened Feb 11, 2018 by bfrk@trac-bfrk

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
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#14792