Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cabal-2.2.0.1: out of memory (requested 1048576 bytes) on raspbian/rpi3 #5505

Closed
mcfilib opened this issue Aug 7, 2018 · 13 comments
Closed

Comments

@mcfilib
Copy link

mcfilib commented Aug 7, 2018

I'm working on a project that runs on a Raspberry Pi. As part of the build pipeline it creates a Docker image with a load of packages already installed in order to speed up deployments. One of these packages is Cabal-2.2.0.1.

When I attempt to compile Cabal-2.2.0.1, it churns away for several hours before eventualling reporting ghc: out of memory (requested 1048576 bytes). Cabal-1.24.2.0 does not suffer from this problem, building in a reasonable amount of time given the device's specifications.

Reproduction Steps

These are specific to compiling on a rpi3 running raspbian but I was also able to produce the same result when compiling on one of Scaleway's ARMv7 servers.

  • Increase swap space to something ridiculous like 16GB
  • Install ghc-8.2.2 (conveniently there is a pre-built binary that works on rpi3)
  • Attempt to install Cabal-2.2.0.1
  • Wait a very long time

Note that the logs below show the commands I'm running in the Dockerfile, if that's easier to follow.

System Information

% free -m
              total        used        free      shared  buff/cache   available
Mem:            927          71         680          11         175         795
Swap:         16383           0       16383
% uname -a
Linux raspberrypi 4.14.52-v7+ #1123 SMP Wed Jun 27 17:35:49 BST 2018 armv7l GNU/Linux

Logs

% cat log.txt                                                                                                                                                                                                                                                                                                                                                                                                             
Sending build context to Docker daemon  135.2kB
Step 1/9 : FROM resin/rpi-raspbian:buster
 ---> ae29c29b2a2f
Step 2/9 : ENV LANG C.UTF-8
 ---> Using cache
 ---> c9c161558142
Step 3/9 : RUN apt-get update && apt-get install -y build-essential gcc libgmp-dev llvm-3.9 wget xz-utils zlib1g-dev
 ---> Using cache
 ---> c9ca4d3ab425
Step 4/9 : RUN wget https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-linux-arm.tar.gz &&     tar xvzf stack-1.7.1-linux-arm.tar.gz && mv stack-1.7.1-linux-arm/stack /usr/local/sbin &&     rm -rf stack-1.7.1-linux-arm
 ---> Using cache
 ---> 7d4e13495709
Step 5/9 : COPY ./stack.yaml ./stack.yaml
 ---> 50fe7c182d7f
Step 6/9 : RUN stack --no-terminal setup
 ---> Running in b55d02b3a80b
Downloading lts-12.0 build plan ...
Downloaded lts-12.0 build plan.
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Preparing to download ghc-8.2.2 ...
ghc-8.2.2: download has begun
ghc-8.2.2:    1.34 MiB / 148.99 MiB (  0.90%) downloaded...
ghc-8.2.2:    3.78 MiB / 148.99 MiB (  2.54%) downloaded...
ghc-8.2.2:    6.25 MiB / 148.99 MiB (  4.19%) downloaded...
ghc-8.2.2:    8.70 MiB / 148.99 MiB (  5.84%) downloaded...
ghc-8.2.2:   11.17 MiB / 148.99 MiB (  7.50%) downloaded...
ghc-8.2.2:   13.64 MiB / 148.99 MiB (  9.16%) downloaded...
ghc-8.2.2:   16.11 MiB / 148.99 MiB ( 10.81%) downloaded...
ghc-8.2.2:   18.58 MiB / 148.99 MiB ( 12.47%) downloaded...
ghc-8.2.2:   20.83 MiB / 148.99 MiB ( 13.98%) downloaded...
ghc-8.2.2:   23.00 MiB / 148.99 MiB ( 15.44%) downloaded...
ghc-8.2.2:   25.17 MiB / 148.99 MiB ( 16.89%) downloaded...
ghc-8.2.2:   27.19 MiB / 148.99 MiB ( 18.25%) downloaded...
ghc-8.2.2:   29.39 MiB / 148.99 MiB ( 19.73%) downloaded...
ghc-8.2.2:   31.58 MiB / 148.99 MiB ( 21.19%) downloaded...
ghc-8.2.2:   33.75 MiB / 148.99 MiB ( 22.65%) downloaded...
ghc-8.2.2:   35.95 MiB / 148.99 MiB ( 24.13%) downloaded...
ghc-8.2.2:   38.08 MiB / 148.99 MiB ( 25.56%) downloaded...
ghc-8.2.2:   40.26 MiB / 148.99 MiB ( 27.03%) downloaded...
ghc-8.2.2:   42.37 MiB / 148.99 MiB ( 28.44%) downloaded...
ghc-8.2.2:   44.47 MiB / 148.99 MiB ( 29.85%) downloaded...
ghc-8.2.2:   46.67 MiB / 148.99 MiB ( 31.33%) downloaded...
ghc-8.2.2:   48.84 MiB / 148.99 MiB ( 32.78%) downloaded...
ghc-8.2.2:   50.92 MiB / 148.99 MiB ( 34.18%) downloaded...
ghc-8.2.2:   53.12 MiB / 148.99 MiB ( 35.66%) downloaded...
ghc-8.2.2:   55.31 MiB / 148.99 MiB ( 37.12%) downloaded...
ghc-8.2.2:   57.41 MiB / 148.99 MiB ( 38.53%) downloaded...
ghc-8.2.2:   59.61 MiB / 148.99 MiB ( 40.01%) downloaded...
ghc-8.2.2:   61.80 MiB / 148.99 MiB ( 41.48%) downloaded...
ghc-8.2.2:   63.91 MiB / 148.99 MiB ( 42.89%) downloaded...
ghc-8.2.2:   66.09 MiB / 148.99 MiB ( 44.36%) downloaded...
ghc-8.2.2:   68.47 MiB / 148.99 MiB ( 45.95%) downloaded...
ghc-8.2.2:   70.83 MiB / 148.99 MiB ( 47.54%) downloaded...
ghc-8.2.2:   73.28 MiB / 148.99 MiB ( 49.18%) downloaded...
ghc-8.2.2:   75.64 MiB / 148.99 MiB ( 50.77%) downloaded...
ghc-8.2.2:   78.08 MiB / 148.99 MiB ( 52.40%) downloaded...
ghc-8.2.2:   80.53 MiB / 148.99 MiB ( 54.05%) downloaded...
ghc-8.2.2:   82.91 MiB / 148.99 MiB ( 55.65%) downloaded...
ghc-8.2.2:   85.37 MiB / 148.99 MiB ( 57.30%) downloaded...
ghc-8.2.2:   87.75 MiB / 148.99 MiB ( 58.90%) downloaded...
ghc-8.2.2:   90.23 MiB / 148.99 MiB ( 60.56%) downloaded...
ghc-8.2.2:   92.70 MiB / 148.99 MiB ( 62.22%) downloaded...
ghc-8.2.2:   95.08 MiB / 148.99 MiB ( 63.81%) downloaded...
ghc-8.2.2:   97.55 MiB / 148.99 MiB ( 65.47%) downloaded...
ghc-8.2.2:  100.01 MiB / 148.99 MiB ( 67.13%) downloaded...
ghc-8.2.2:  102.39 MiB / 148.99 MiB ( 68.72%) downloaded...
ghc-8.2.2:  104.86 MiB / 148.99 MiB ( 70.38%) downloaded...
ghc-8.2.2:  107.23 MiB / 148.99 MiB ( 71.97%) downloaded...
ghc-8.2.2:  109.70 MiB / 148.99 MiB ( 73.63%) downloaded...
ghc-8.2.2:  112.08 MiB / 148.99 MiB ( 75.22%) downloaded...
ghc-8.2.2:  114.55 MiB / 148.99 MiB ( 76.88%) downloaded...
ghc-8.2.2:  117.01 MiB / 148.99 MiB ( 78.54%) downloaded...
ghc-8.2.2:  118.33 MiB / 148.99 MiB ( 79.42%) downloaded...
ghc-8.2.2:  120.37 MiB / 148.99 MiB ( 80.79%) downloaded...
ghc-8.2.2:  120.62 MiB / 148.99 MiB ( 80.96%) downloaded...
ghc-8.2.2:  122.61 MiB / 148.99 MiB ( 82.29%) downloaded...
ghc-8.2.2:  124.72 MiB / 148.99 MiB ( 83.71%) downloaded...
ghc-8.2.2:  127.19 MiB / 148.99 MiB ( 85.37%) downloaded...
ghc-8.2.2:  129.66 MiB / 148.99 MiB ( 87.02%) downloaded...
ghc-8.2.2:  132.05 MiB / 148.99 MiB ( 88.63%) downloaded...
ghc-8.2.2:  134.51 MiB / 148.99 MiB ( 90.28%) downloaded...
ghc-8.2.2:  136.91 MiB / 148.99 MiB ( 91.89%) downloaded...
ghc-8.2.2:  139.36 MiB / 148.99 MiB ( 93.54%) downloaded...
ghc-8.2.2:  141.83 MiB / 148.99 MiB ( 95.19%) downloaded...
ghc-8.2.2:  144.20 MiB / 148.99 MiB ( 96.79%) downloaded...
ghc-8.2.2:  146.59 MiB / 148.99 MiB ( 98.39%) downloaded...
ghc-8.2.2:  148.99 MiB / 148.99 MiB (100.00%) downloaded...
Downloaded ghc-8.2.2.
Unpacking GHC into /root/.stack/programs/arm-linux/ghc-8.2.2.temp/ ...
Configuring GHC ...
Installing GHC ...
Installed GHC.
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
Removing intermediate container b55d02b3a80b
 ---> 8527de52911d
Step 7/9 : RUN stack new --bare dummy
 ---> Running in f16983dfc7b4
Downloading template "new-template" to create project "dummy" in the current directory

The following parameters were needed by the template but not provided: author-email, author-name, category, copyright, github-username
You can provide them in /root/.stack/config.yaml, like this:
templates:
  params:
    author-email: value
    author-name: value
    category: value
    copyright: value
    github-username: value
Or you can pass each one as parameters like this:
stack new dummy new-template -p "author-email:value" -p "author-name:value" -p "category:value" -p "copyright:value" -p "github-username:value"

Removing intermediate container f16983dfc7b4
 ---> afa524de8dd1
Step 8/9 : ADD ./docker-builder-base/xaa /tmp/
 ---> 72449d20f256
Step 9/9 : RUN /tmp/xaa
 ---> Running in 2b7dd65c0f8e
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading root
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index
Updated package index downloaded
Update complete
Populating index cache ...
Populated index cache.
[1 of 2] Compiling Main             ( /root/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /root/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim   ( /root/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /root/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /root/.stack/setup-exe-cache/arm-linux/tmp-Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 ...
process-1.4.3.0: download
text-1.2.3.0: download
transformers-0.5.5.0: download
process-1.4.3.0: configure
process-1.4.3.0: build
transformers-0.5.5.0: configure
transformers-0.5.5.0: build
text-1.2.3.0: configure
text-1.2.3.0: build
process-1.4.3.0: copy/register
transformers-0.5.5.0: copy/register
mtl-2.2.2: download
mtl-2.2.2: configure
mtl-2.2.2: build
mtl-2.2.2: copy/register
text-1.2.3.0: copy/register
parsec-3.1.13.0: download
parsec-3.1.13.0: configure
parsec-3.1.13.0: build
parsec-3.1.13.0: copy/register
Cabal-2.2.0.1: download
Cabal-2.2.0.1: configure
Cabal-2.2.0.1: build
Completed 6 action(s).

--  While building custom Setup.hs for package Cabal-2.2.0.1 using:
      /root/.stack/setup-exe-cache/arm-linux/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/arm-linux/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 251
    Logs have been written to: /.stack-work/logs/Cabal-2.2.0.1.log

    Configuring Cabal-2.2.0.1...
    Preprocessing library for Cabal-2.2.0.1..
    Building library for Cabal-2.2.0.1..
    [  1 of 221] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Binary.o )
    [  2 of 221] Compiling Distribution.Compat.Directory ( Distribution/Compat/Directory.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Directory.o )
    [  3 of 221] Compiling Distribution.Compat.Exception ( Distribution/Compat/Exception.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Exception.o )
    [  4 of 221] Compiling Distribution.Compat.Internal.TempFile ( Distribution/Compat/Internal/TempFile.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Internal/TempFile.o )
    [  5 of 221] Compiling Distribution.Compat.Map.Strict ( Distribution/Compat/Map/Strict.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Map/Strict.o )
    [  6 of 221] Compiling Distribution.Compat.MonadFail ( Distribution/Compat/MonadFail.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/MonadFail.o )
    [  7 of 221] Compiling Distribution.Compat.Newtype ( Distribution/Compat/Newtype.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Newtype.o )
    [  8 of 221] Compiling Distribution.Compat.Semigroup ( Distribution/Compat/Semigroup.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Semigroup.o )
    [  9 of 221] Compiling Distribution.Compat.Stack ( Distribution/Compat/Stack.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Stack.o )
    [ 10 of 221] Compiling Distribution.Compat.Prelude ( Distribution/Compat/Prelude.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Prelude.o )
    [ 11 of 221] Compiling Distribution.Compat.SnocList ( Distribution/Compat/SnocList.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/SnocList.o )
    [ 12 of 221] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/ReadP.o )
    [ 13 of 221] Compiling Distribution.Compat.Prelude.Internal ( Distribution/Compat/Prelude/Internal.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Prelude/Internal.o )
    [ 14 of 221] Compiling Distribution.Compat.Parsing ( Distribution/Compat/Parsing.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Parsing.o )
    [ 15 of 221] Compiling Distribution.Compat.Graph ( Distribution/Compat/Graph.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Graph.o )
    [ 16 of 221] Compiling Distribution.Compat.GetShortPathName ( Distribution/Compat/GetShortPathName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/GetShortPathName.o )
    [ 17 of 221] Compiling Distribution.Compat.DList ( Distribution/Compat/DList.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/DList.o )
    [ 18 of 221] Compiling Distribution.Compat.Lens ( Distribution/Compat/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Lens.o )
    [ 19 of 221] Compiling Distribution.Compat.CopyFile ( Distribution/Compat/CopyFile.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/CopyFile.o )
    [ 20 of 221] Compiling Distribution.Compat.CharParsing ( Distribution/Compat/CharParsing.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/CharParsing.o )
    [ 21 of 221] Compiling Distribution.CabalSpecVersion ( Distribution/CabalSpecVersion.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/CabalSpecVersion.o )
    [ 22 of 221] Compiling Distribution.Compat.Environment ( Distribution/Compat/Environment.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/Environment.o )
    [ 23 of 221] Compiling Distribution.Compat.CreatePipe ( Distribution/Compat/CreatePipe.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compat/CreatePipe.o )
    [ 24 of 221] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/GetOpt.o )
    [ 25 of 221] Compiling Distribution.Lex ( Distribution/Lex.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Lex.o )
    [ 26 of 221] Compiling Distribution.PackageDescription.Quirks ( Distribution/PackageDescription/Quirks.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/PackageDescription/Quirks.o )
    [ 27 of 221] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/PackageDescription/Utils.o )
    [ 28 of 221] Compiling Distribution.Parsec.Common ( Distribution/Parsec/Common.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/Common.o )
    [ 29 of 221] Compiling Distribution.Parsec.Field ( Distribution/Parsec/Field.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/Field.o )
    [ 30 of 221] Compiling Distribution.Parsec.LexerMonad ( Distribution/Parsec/LexerMonad.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/LexerMonad.o )
    [ 31 of 221] Compiling Distribution.Parsec.Lexer ( Distribution/Parsec/Lexer.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/Lexer.o )
    [ 32 of 221] Compiling Distribution.Parsec.Parser ( Distribution/Parsec/Parser.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/Parser.o )
    [ 33 of 221] Compiling Distribution.Pretty ( Distribution/Pretty.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Pretty.o )
    [ 34 of 221] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/CCompiler.o )
    [ 35 of 221] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/PreProcess/Unlit.o )
    [ 36 of 221] Compiling Distribution.Simple.Program.Internal ( Distribution/Simple/Program/Internal.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Internal.o )
    [ 37 of 221] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/TestSuite.o )
    [ 38 of 221] Compiling Distribution.Types.Condition ( Distribution/Types/Condition.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Condition.o )
    [ 39 of 221] Compiling Distribution.Types.CondTree ( Distribution/Types/CondTree.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/CondTree.o )
    [ 40 of 221] Compiling Distribution.Utils.Base62 ( Distribution/Utils/Base62.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/Base62.o )
    [ 41 of 221] Compiling Distribution.Utils.IOData ( Distribution/Utils/IOData.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/IOData.o )
    [ 42 of 221] Compiling Distribution.Utils.MapAccum ( Distribution/Utils/MapAccum.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/MapAccum.o )
    [ 43 of 221] Compiling Distribution.Utils.Progress ( Distribution/Utils/Progress.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/Progress.o )
    [ 44 of 221] Compiling Distribution.Utils.String ( Distribution/Utils/String.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/String.o )
    [ 45 of 221] Compiling Distribution.Utils.ShortText ( Distribution/Utils/ShortText.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/ShortText.o )
    [ 46 of 221] Compiling Distribution.Utils.Generic ( Distribution/Utils/Generic.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/Generic.o )
    [ 47 of 221] Compiling Distribution.Parsec.FieldLineStream ( Distribution/Parsec/FieldLineStream.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/FieldLineStream.o )
    [ 48 of 221] Compiling Distribution.Parsec.Class ( Distribution/Parsec/Class.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/Class.o )
    [ 49 of 221] Compiling Distribution.Text ( Distribution/Text.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Text.o )
    [ 50 of 221] Compiling Distribution.Types.Version ( Distribution/Types/Version.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Version.o )
    [ 51 of 221] Compiling Distribution.Types.VersionRange ( Distribution/Types/VersionRange.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/VersionRange.o )
    [ 52 of 221] Compiling Distribution.Types.VersionInterval ( Distribution/Types/VersionInterval.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/VersionInterval.o )
    [ 53 of 221] Compiling Distribution.Types.SourceRepo ( Distribution/Types/SourceRepo.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/SourceRepo.o )
    [ 54 of 221] Compiling Distribution.Types.SourceRepo.Lens ( Distribution/Types/SourceRepo/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/SourceRepo/Lens.o )
    [ 55 of 221] Compiling Distribution.Types.PkgconfigName ( Distribution/Types/PkgconfigName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PkgconfigName.o )
    [ 56 of 221] Compiling Distribution.Types.ForeignLibType ( Distribution/Types/ForeignLibType.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ForeignLibType.o )
    [ 57 of 221] Compiling Distribution.Types.ForeignLibOption ( Distribution/Types/ForeignLibOption.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ForeignLibOption.o )
    [ 58 of 221] Compiling Distribution.Types.ExecutableScope ( Distribution/Types/ExecutableScope.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ExecutableScope.o )
    [ 59 of 221] Compiling Distribution.Types.ComponentId ( Distribution/Types/ComponentId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ComponentId.o )
    [ 60 of 221] Compiling Distribution.Types.BuildType ( Distribution/Types/BuildType.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/BuildType.o )
    [ 61 of 221] Compiling Distribution.Types.AbiHash ( Distribution/Types/AbiHash.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/AbiHash.o )
    [ 62 of 221] Compiling Distribution.System ( Distribution/System.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/System.o )
    [ 63 of 221] Compiling Distribution.SPDX.LicenseReference ( Distribution/SPDX/LicenseReference.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/SPDX/LicenseReference.o )
    [ 64 of 221] Compiling Distribution.SPDX.LicenseId ( Distribution/SPDX/LicenseId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/SPDX/LicenseId.o )
    [ 65 of 221] Compiling Distribution.SPDX.LicenseExceptionId ( Distribution/SPDX/LicenseExceptionId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/SPDX/LicenseExceptionId.o )
    [ 66 of 221] Compiling Distribution.SPDX.LicenseExpression ( Distribution/SPDX/LicenseExpression.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/SPDX/LicenseExpression.o )
    [ 67 of 221] Compiling Distribution.SPDX.License ( Distribution/SPDX/License.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/SPDX/License.o )
    [ 68 of 221] Compiling Distribution.SPDX ( Distribution/SPDX.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/SPDX.o )
    [ 69 of 221] Compiling Distribution.ReadE ( Distribution/ReadE.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/ReadE.o )
    [ 70 of 221] Compiling Distribution.ModuleName ( Distribution/ModuleName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/ModuleName.o )
    [ 71 of 221] Compiling Distribution.Types.ModuleRenaming ( Distribution/Types/ModuleRenaming.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ModuleRenaming.o )
    [ 72 of 221] Compiling Distribution.Types.IncludeRenaming ( Distribution/Types/IncludeRenaming.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/IncludeRenaming.o )
    [ 73 of 221] Compiling Distribution.FieldGrammar.Class ( Distribution/FieldGrammar/Class.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/FieldGrammar/Class.o )
    [ 74 of 221] Compiling Distribution.Utils.UnionFind ( Distribution/Utils/UnionFind.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/UnionFind.o )
    [ 75 of 221] Compiling Distribution.Verbosity ( Distribution/Verbosity.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Verbosity.o )
    [ 76 of 221] Compiling Distribution.Version ( Distribution/Version.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Version.o )
    [ 77 of 221] Compiling Distribution.Types.TestType ( Distribution/Types/TestType.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/TestType.o )
    [ 78 of 221] Compiling Distribution.Types.TestSuiteInterface ( Distribution/Types/TestSuiteInterface.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/TestSuiteInterface.o )
    [ 79 of 221] Compiling Distribution.Types.PkgconfigDependency ( Distribution/Types/PkgconfigDependency.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PkgconfigDependency.o )
    [ 80 of 221] Compiling Distribution.Types.BenchmarkType ( Distribution/Types/BenchmarkType.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/BenchmarkType.o )
    [ 81 of 221] Compiling Distribution.Types.BenchmarkInterface ( Distribution/Types/BenchmarkInterface.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/BenchmarkInterface.o )
    [ 82 of 221] Compiling Distribution.Parsec.ParseResult ( Distribution/Parsec/ParseResult.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/ParseResult.o )
    [ 83 of 221] Compiling Distribution.License ( Distribution/License.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/License.o )
    [ 84 of 221] Compiling Language.Haskell.Extension ( Language/Haskell/Extension.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Language/Haskell/Extension.o )
    [ 85 of 221] Compiling Distribution.Compiler ( Distribution/Compiler.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Compiler.o )
    [ 86 of 221] Compiling Distribution.Parsec.Newtypes ( Distribution/Parsec/Newtypes.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/Newtypes.o )
    [ 87 of 221] Compiling Distribution.ParseUtils ( Distribution/ParseUtils.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/ParseUtils.o )
    [ 88 of 221] Compiling Distribution.Types.PackageName ( Distribution/Types/PackageName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PackageName.o )
    [ 89 of 221] Compiling Distribution.Types.UnqualComponentName ( Distribution/Types/UnqualComponentName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/UnqualComponentName.o )
    [ 90 of 221] Compiling Distribution.Types.ComponentName ( Distribution/Types/ComponentName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ComponentName.o )
    [ 91 of 221] Compiling Distribution.Types.PackageId ( Distribution/Types/PackageId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PackageId.o )
    [ 92 of 221] Compiling Distribution.Types.UnitId ( Distribution/Types/UnitId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/UnitId.o )
    [ 93 of 221] Compiling Distribution.Types.Module ( Distribution/Types/Module.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Module.o )
    [ 94 of 221] Compiling Distribution.Backpack ( Distribution/Backpack.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Backpack.o )
    [ 95 of 221] Compiling Distribution.Backpack.ModSubst ( Distribution/Backpack/ModSubst.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Backpack/ModSubst.o )
    [ 96 of 221] Compiling Distribution.Backpack.FullUnitId ( Distribution/Backpack/FullUnitId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Backpack/FullUnitId.o )
    [ 97 of 221] Compiling Distribution.Types.PackageId.Lens ( Distribution/Types/PackageId/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PackageId/Lens.o )
    [ 98 of 221] Compiling Distribution.Types.ModuleReexport ( Distribution/Types/ModuleReexport.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ModuleReexport.o )
    [ 99 of 221] Compiling Distribution.Types.Mixin ( Distribution/Types/Mixin.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Mixin.o )
    [100 of 221] Compiling Distribution.Types.ExeDependency ( Distribution/Types/ExeDependency.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ExeDependency.o )
    [101 of 221] Compiling Distribution.Types.Dependency ( Distribution/Types/Dependency.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Dependency.o )
    [102 of 221] Compiling Distribution.Types.SetupBuildInfo ( Distribution/Types/SetupBuildInfo.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/SetupBuildInfo.o )
    [103 of 221] Compiling Distribution.Types.SetupBuildInfo.Lens ( Distribution/Types/SetupBuildInfo/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/SetupBuildInfo/Lens.o )
    [104 of 221] Compiling Distribution.Types.DependencyMap ( Distribution/Types/DependencyMap.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/DependencyMap.o )
    [105 of 221] Compiling Distribution.Simple.GHC.IPIConvert ( Distribution/Simple/GHC/IPIConvert.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/GHC/IPIConvert.o )
    [106 of 221] Compiling Distribution.Backpack.ModuleScope ( Distribution/Backpack/ModuleScope.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Backpack/ModuleScope.o )
    [107 of 221] Compiling Distribution.Types.MungedPackageName ( Distribution/Types/MungedPackageName.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/MungedPackageName.o )
    [108 of 221] Compiling Distribution.Types.MungedPackageId ( Distribution/Types/MungedPackageId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/MungedPackageId.o )
    [109 of 221] Compiling Distribution.Package ( Distribution/Package.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Package.o )
    [110 of 221] Compiling Distribution.Types.AnnotatedId ( Distribution/Types/AnnotatedId.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/AnnotatedId.o )
    [111 of 221] Compiling Distribution.Types.ComponentInclude ( Distribution/Types/ComponentInclude.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ComponentInclude.o )
    [112 of 221] Compiling Distribution.Types.AbiDependency ( Distribution/Types/AbiDependency.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/AbiDependency.o )
    [113 of 221] Compiling Distribution.Simple.InstallDirs ( Distribution/Simple/InstallDirs.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/InstallDirs.o )
    [114 of 221] Compiling Distribution.Types.LegacyExeDependency ( Distribution/Types/LegacyExeDependency.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/LegacyExeDependency.o )
    [115 of 221] Compiling Distribution.Types.BuildInfo ( Distribution/Types/BuildInfo.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/BuildInfo.o )
    [116 of 221] Compiling Distribution.Types.HookedBuildInfo ( Distribution/Types/HookedBuildInfo.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/HookedBuildInfo.o )
    [117 of 221] Compiling Distribution.Types.BuildInfo.Lens ( Distribution/Types/BuildInfo/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/BuildInfo/Lens.o )
    [118 of 221] Compiling Distribution.Types.TestSuite ( Distribution/Types/TestSuite.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/TestSuite.o )
    [119 of 221] Compiling Distribution.Types.TestSuite.Lens ( Distribution/Types/TestSuite/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/TestSuite/Lens.o )
    [120 of 221] Compiling Distribution.Types.Library ( Distribution/Types/Library.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Library.o )
    [121 of 221] Compiling Distribution.Types.Library.Lens ( Distribution/Types/Library/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Library/Lens.o )
    [122 of 221] Compiling Distribution.Types.ForeignLib ( Distribution/Types/ForeignLib.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ForeignLib.o )
    [123 of 221] Compiling Distribution.Types.ForeignLib.Lens ( Distribution/Types/ForeignLib/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ForeignLib/Lens.o )
    [124 of 221] Compiling Distribution.Types.Executable ( Distribution/Types/Executable.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Executable.o )
    [125 of 221] Compiling Distribution.Types.Executable.Lens ( Distribution/Types/Executable/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Executable/Lens.o )
    [126 of 221] Compiling Distribution.Types.Benchmark ( Distribution/Types/Benchmark.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Benchmark.o )
    [127 of 221] Compiling Distribution.Types.Component ( Distribution/Types/Component.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Component.o )
    [128 of 221] Compiling Distribution.Types.ComponentRequestedSpec ( Distribution/Types/ComponentRequestedSpec.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ComponentRequestedSpec.o )
    [129 of 221] Compiling Distribution.Types.PackageDescription ( Distribution/Types/PackageDescription.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PackageDescription.o )
    [130 of 221] Compiling Distribution.Types.PackageDescription.Lens ( Distribution/Types/PackageDescription/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/PackageDescription/Lens.o )
    [131 of 221] Compiling Distribution.Types.GenericPackageDescription ( Distribution/Types/GenericPackageDescription.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/GenericPackageDescription.o )
    [132 of 221] Compiling Distribution.Types.GenericPackageDescription.Lens ( Distribution/Types/GenericPackageDescription/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/GenericPackageDescription/Lens.o )
    [133 of 221] Compiling Distribution.Parsec.ConfVar ( Distribution/Parsec/ConfVar.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Parsec/ConfVar.o )
    [134 of 221] Compiling Distribution.Types.Benchmark.Lens ( Distribution/Types/Benchmark/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Benchmark/Lens.o )
    [135 of 221] Compiling Distribution.Types.Lens ( Distribution/Types/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/Lens.o )
    [136 of 221] Compiling Distribution.PackageDescription ( Distribution/PackageDescription.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/PackageDescription.o )
    [137 of 221] Compiling Distribution.Simple.BuildToolDepends ( Distribution/Simple/BuildToolDepends.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/BuildToolDepends.o )
    [138 of 221] Compiling Distribution.Types.ExposedModule ( Distribution/Types/ExposedModule.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/ExposedModule.o )
    [139 of 221] Compiling Distribution.Types.InstalledPackageInfo ( Distribution/Types/InstalledPackageInfo.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/InstalledPackageInfo.o )
    [140 of 221] Compiling Distribution.Types.InstalledPackageInfo.Lens ( Distribution/Types/InstalledPackageInfo/Lens.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Types/InstalledPackageInfo/Lens.o )
    [141 of 221] Compiling Distribution.PrettyUtils ( Distribution/PrettyUtils.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/PrettyUtils.o )
    [142 of 221] Compiling Paths_Cabal      ( .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/autogen/Paths_Cabal.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Paths_Cabal.o )
    [143 of 221] Compiling Distribution.Simple.Utils ( Distribution/Simple/Utils.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Utils.o )
    [144 of 221] Compiling Distribution.Utils.NubList ( Distribution/Utils/NubList.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/NubList.o )
    [145 of 221] Compiling Distribution.Utils.LogProgress ( Distribution/Utils/LogProgress.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Utils/LogProgress.o )
    [146 of 221] Compiling Distribution.Simple.Program.ResponseFile ( Distribution/Simple/Program/ResponseFile.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/ResponseFile.o )
    [147 of 221] Compiling Distribution.Simple.Program.Find ( Distribution/Simple/Program/Find.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Find.o )
    [148 of 221] Compiling Distribution.Simple.Program.Types ( Distribution/Simple/Program/Types.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Types.o )
    [149 of 221] Compiling Distribution.Simple.Program.Run ( Distribution/Simple/Program/Run.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Run.o )
    [150 of 221] Compiling Distribution.Simple.Program.Script ( Distribution/Simple/Program/Script.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Script.o )
    [151 of 221] Compiling Distribution.Simple.Program.Hpc ( Distribution/Simple/Program/Hpc.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Hpc.o )
    [152 of 221] Compiling Distribution.Simple.Program.Builtin ( Distribution/Simple/Program/Builtin.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Builtin.o )
    [153 of 221] Compiling Distribution.Simple.Program.Db ( Distribution/Simple/Program/Db.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Db.o )
    [154 of 221] Compiling Distribution.Simple.Program ( Distribution/Simple/Program.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program.o )
    [155 of 221] Compiling Distribution.Simple.Program.Strip ( Distribution/Simple/Program/Strip.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Program/Strip.o )
    [156 of 221] Compiling Distribution.Simple.Compiler ( Distribution/Simple/Compiler.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Compiler.o )
    [157 of 221] Compiling Distribution.Simple.GHC.ImplInfo ( Distribution/Simple/GHC/ImplInfo.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/GHC/ImplInfo.o )
    [158 of 221] Compiling Distribution.Simple.Command ( Distribution/Simple/Command.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Command.o )
    [159 of 221] Compiling Distribution.Simple.Setup ( Distribution/Simple/Setup.hs, .stack-work/dist/arm-linux/Cabal-2.0.1.0/build/Distribution/Simple/Setup.o )
    ghc: out of memory (requested 1048576 bytes)
The command '/bin/sh -c /tmp/xaa' returned a non-zero code: 1
@hvr
Copy link
Member

hvr commented Aug 7, 2018

To be fair, this is rather a problem of GHC which is known to have some undesirable non-linear space-dimension complexities when big data structures are involved, and Cabal certainly makes good use of such large data structures. I expect that Cabal-2.4 pushed the envelope even a bit further than Cabal-2.2 did in terms of compile-time cost... so this is a trend that will keep going on.

So I'm not sure what we can do here. :-/

PS: I notice you're using Stack; have you tried without Stack as well?

@mcfilib
Copy link
Author

mcfilib commented Aug 7, 2018

Thank-you for your reply, @hvr. I suppose then I have a few questions:

  • Do you think this is something worth opening on the GHC issue tracker? Is it a GHC bug?
  • Do you think that Stack could be somehow interfering with GHC? Would using cabal-install provide more useful information?
  • Do you think it's surprising that, even with 16GB of swap, compilation fails?

If it is of any assistance to someone willing to investigate this, I'm happy to donate access to one of the Scaleway ARMv7 servers.

@hvr
Copy link
Member

hvr commented Aug 7, 2018

  • Not for GHC 8.2.2; could probably be considered a bug, yes
  • Yes; not necessarily (but it might invoke ghc differently and maybe not trigger the OOM)
  • Somewhat (this is for a 64bit address space, right?); but it could also just be a bug in GHC 8.2.2 that doesn't occur anymore w/ e.g. GHC 8.4.3

with a recent cabal, you could try adding something like

package Cabal
    ghc-options: +RTS -M900M -RTS

to the cabal.project file; and see if you manage to complete the build of the Cabal package. If you set the limit too low you will likely get panics w/ GHC 8.2.2 (there were possibly some bugs in GHC 8.2.2 that got fixed in later versions)

@vmchale
Copy link
Contributor

vmchale commented Dec 3, 2018

There seems to be a (resolved) ticket for this here though I can't figure out how it was actually resolved.

I ran into this in basically the same context.

@gbaz
Copy link
Collaborator

gbaz commented Dec 3, 2018

Are you also on openbsd? if so the answer seems to be to change values in etc/login.conf? What am I missing?

@bfrk
Copy link

bfrk commented Dec 3, 2018

I am now getting out of memory when I compile Cabal-2.4.1.0 on a Linux machine using ghc-8.2.2. I have deliberately set ulimit -v to 2GB address space (half of the physical memory on this machine) because otherwise some (usually Haskell) programs cause my machine to practically freeze so I am no longer able to manually kill them and have to use a hard reset.

Building Cabal-2.2.x works fine in this setting.

@23Skidoo
Copy link
Member

23Skidoo commented Dec 3, 2018

This seems to be a GHC rather than Cabal issue. Does something like setting the GHCRTS env var to -M2G help?

@m-renaud
Copy link
Collaborator

m-renaud commented Dec 3, 2018

As another data point, every PR I've submitted in the past week has also had travis failures due to this: see here, here, and here for recent failures.

@vmchale
Copy link
Contributor

vmchale commented Dec 3, 2018

@m-renaud I believe that is a separate issue? I'm not getting panics on my banana pi.

@vmchale
Copy link
Contributor

vmchale commented Dec 3, 2018

@23Skidoo when I try

cabal install cabal-install -j --ghc-options='+RTS -M1G'

it fails with

[110 of 220] Compiling Distribution.Types.ComponentInclude ( Distribution/Types/ComponentInclude.hs, dist/build/Distribution/Types/ComponentInclude.o )
[111 of 220] Compiling Distribution.Types.AbiDependency ( Distribution/Types/AbiDependency.hs, dist/build/Distribution/Types/AbiDependency.o )
[112 of 220] Compiling Distribution.Simple.InstallDirs ( Distribution/Simple/InstallDirs.hs, dist/build/Distribution/Simple/InstallDirs.o )
[113 of 220] Compiling Distribution.Types.LegacyExeDependency ( Distribution/Types/LegacyExeDependency.hs, dist/build/Distribution/Types/LegacyExeDependency.o )
[114 of 220] Compiling Distribution.Types.BuildInfo ( Distribution/Types/BuildInfo.hs, dist/build/Distribution/Types/BuildInfo.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.2.1 for arm-unknown-linux):
    heap overflow

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

cabal: Leaving directory '/tmp/cabal-tmp-15842/Cabal-2.4.1.0'
cabal: Error: some packages failed to install:

...which may be a separate GHC bug, perhaps?

@23Skidoo
Copy link
Member

23Skidoo commented Dec 4, 2018

I'd use -j1 instead of -j.

@vmchale
Copy link
Contributor

vmchale commented Dec 4, 2018

Same error with -j1 unfortunately.

@gbaz
Copy link
Collaborator

gbaz commented Sep 14, 2021

I think we should probably close this. Nothing to really be done vis a vis cabal.

@gbaz gbaz closed this as completed Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants