mmark icon indicating copy to clipboard operation
mmark copied to clipboard

Compile fail in Circle CI 2.0 (out of memory error)

Open waddlaw opened this issue 5 years ago • 6 comments

I'm using Circle Ci (and stack). locally build is fine. But, get following error message in the Circle CI.

--  While building custom Setup.hs for package mmark-0.0.5.6 using:
      /root/.stack/setup-exe-cache/x86_64-linux-nopie/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1 build lib:mmark --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure (-9) (THIS MAY INDICATE OUT OF MEMORY)
    Logs have been written to: /root/project/.stack-work/logs/mmark-0.0.5.6.log

    Configuring mmark-0.0.5.6...
    Preprocessing library for mmark-0.0.5.6..
    Building library for mmark-0.0.5.6..
    [1 of 9] Compiling Text.MMark.Parser.Internal.Type ( Text/MMark/Parser/Internal/Type.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Parser/Internal/Type.o )
    [2 of 9] Compiling Text.MMark.Parser.Internal ( Text/MMark/Parser/Internal.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Parser/Internal.o )
    [3 of 9] Compiling Text.MMark.Type  ( Text/MMark/Type.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Type.o )
    [4 of 9] Compiling Text.MMark.Trans ( Text/MMark/Trans.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Trans.o )
    [5 of 9] Compiling Text.MMark.Util  ( Text/MMark/Util.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Util.o )
    [6 of 9] Compiling Text.MMark.Render ( Text/MMark/Render.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Render.o )
    [7 of 9] Compiling Text.MMark.Parser ( Text/MMark/Parser.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Text/MMark/Parser.o )
Exited with code 1

Reproduce this repo.

waddlaw avatar Jul 23 '18 00:07 waddlaw

This is caused by a regression in GHC, please see: https://ghc.haskell.org/trac/ghc/ticket/14974.

mrkkrp avatar Sep 14 '18 11:09 mrkkrp

Thank you for the information!

waddlaw avatar Sep 15 '18 05:09 waddlaw

Hi there! Have you found any workaround?

I'm trying to set up my Circle CI build and I hit the same issue. Build info:

  • docker image: fpco/stack-build
  • stack-1.9.3
  • ghc-8.6.3

EDIT: It is unrelated to the package mmark.

Thanks!

gvolpe avatar Jan 11 '19 15:01 gvolpe

Just in case someone finds this useful. I got it working by running stack test -j1 instead.

gvolpe avatar Jan 12 '19 01:01 gvolpe

I usually use a special docker image that has pre-built mmark.

mrkkrp avatar Jan 12 '19 20:01 mrkkrp

Build time and memory usage has significantly gone up again with GHC 9.0.1. I've filed https://gitlab.haskell.org/ghc/ghc/-/issues/19471 for this.

sjakobi avatar Mar 02 '21 14:03 sjakobi