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

Build Cabal with -rtsopts by default #1687

Closed
s9gf4ult opened this Issue Jan 20, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@s9gf4ult

s9gf4ult commented Jan 20, 2016

This is very convenient to have set GHCRTS=-M2000m globally because ghci and ghc tends to consume much memory (over 5Gb for one ghci in my case) but works well with restriction. But stack setup --upgrade-cabal builds cabal without -rtsopts even if

% cat ~/.stack/config.yaml 
ghc-options:
  "*": -rtsopts

This leads to unworkable stack build in any project if you have GHCRTS variable set:

% echo $GHCRTS 
-M2200m
% stack build 
postgresql-query-2.3.0: unregistering (local file changes: example/Main.hs postgresql-query.cabal src/Database/PostgreSQL/Query.hs src/Database/PostgreSQL/Q...)
postgresql-typed-0.0.1: unregistering (missing dependencies: postgresql-query)
postgresql-query-2.3.0: configure
Progress: 1/2
--  While building package postgresql-query-2.3.0 using:
      /home/razor/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.6.0-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.6.0 configure --with-ghc=/home/razor/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc --with-ghc-pkg=/home/razor/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/razor/.stack/snapshots/x86_64-linux/lts-3.20/7.10.2/pkgdb --package-db=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/pkgdb --libdir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/lib --bindir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/bin --datadir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/share --libexecdir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/libexec --sysconfdir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/etc --docdir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/doc/postgresql-query-2.3.0 --htmldir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/doc/postgresql-query-2.3.0 --haddockdir=/home/razor/work/pg/.stack-work/install/x86_64-linux/lts-3.20/7.10.2/doc/postgresql-query-2.3.0 --dependency=aeson=aeson-0.8.0.2-4253dbffb372d9f14b8f161c0c50266e --dependency=attoparsec=attoparsec-0.12.1.6-ba73a57c7084912fd5823806ca3e19e1 --dependency=base=base-4.8.1.0-4f7206fd964c629946bb89db72c80011 --dependency=blaze-builder=blaze-builder-0.4.0.1-2671a20ae5a344312d33f4d2a972039c --dependency=bytestring=bytestring-0.10.6.0-2362d1f36f1255e85478e7793e15b170 --dependency=containers=containers-0.5.6.2-2de75421d746ab474b330e43191bb31b --dependency=data-default=data-default-0.5.3-a2ece8050e447d921b001e26e14476f2 --dependency=either=either-4.4.1-a20f5fccb1c7e39db4c6ff8008f9830f --dependency=exceptions=exceptions-0.8.0.2-ddbcd82fb5b2bc2136643095caa8130f --dependency=file-embed=file-embed-0.0.9-e0db52f3b3c019875f180407ccc9406d --dependency=haskell-src-meta=haskell-src-meta-0.6.0.13-14b30d077eb602fdab7dc7b281699269 --dependency=hreader=hreader-1.0.2-cc6f2fb19ab4335e533118c09e7d5bdf --dependency=hset=hset-2.2.0-bf7076b06955177432202c2a6eafabf4 --dependency=inflections=inflections-0.2.0.0-d29bb85093ae7c4ee9c03c748584e730 --dependency=monad-control=monad-control-1.0.0.4-56c704320620003644df34ef9da5b59e --dependency=monad-logger=monad-logger-0.3.16-bc24150825d652a152e202fd22bd2545 --dependency=mtl=mtl-2.2.1-5cf332b11edb88a6040af20fd6a58acb --dependency=postgresql-simple=postgresql-simple-0.4.10.0-4441ce7bd62a86230f7fbc4cb07aeafc --dependency=resource-pool=resource-pool-0.2.3.2-3367bd183c7b87121ecc6af9cf91d841 --dependency=semigroups=semigroups-0.16.2.2-f9a9e03c02d4e53e32eea6fce3eebad6 --dependency=template-haskell=template-haskell-2.10.0.0-90e8393d65f4ae44cb2026177a257f28 --dependency=text=text-1.2.2.0-deb6153d79a7ae70c8e4b37afad85c91 --dependency=th-lift=th-lift-0.7.5-e7f54ed0078bd6a54c14b7734dfe6b95 --dependency=th-lift-instances=th-lift-instances-0.1.6-3c9449900009a5982de5a9ee3e7e73a0 --dependency=time=time-1.5.0.1-c208e8fcb3277879fd30f1140654d53e --dependency=transformers=transformers-0.4.2.0-21dcbf13c43f5d8cf6a1f54dee6c5bff --dependency=transformers-base=transformers-base-0.4.4-6a02b8d28cd323ba0b28b432b193a572 --dependency=transformers-compat=transformers-compat-0.4.0.4-3ca5cbcec233c17da785d5f27705643c --ghc-options -rtsopts --enable-benchmarks
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/razor/work/pg/.stack-work/logs/postgresql-query-2.3.0.log

    setup-Simple-Cabal-1.22.6.0-ghc-7.10.2: Most RTS options are disabled. Link with -rtsopts to enable them.

Which is very anoying.

mgsloan added a commit that referenced this issue Feb 4, 2016

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Feb 4, 2016

Hey, sorry for not getting around to this earlier. Now Setup.hs is built with -rtsopts. Please re-open if it doesn't work (seems to in my testing, but who knows)

@mgsloan mgsloan closed this Feb 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment