Haskell Stack's executable profiling and ghc options fails to build -
i'm trying debug performance problems in haskell project, can't profiling compiled in can use through +rts -p
command line arguments.
the options ghc in .cabal
file are:
ghc-options: -threaded -rtsopts -with-rtsopts=-n -wall -werror
here's me attempting build it:
stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
which results in:
while constructing buildplan following exceptions encountered: -- failure when adding dependencies: base: needed (>=2 && <5), not present in build plan (latest applicable 4.9.0.0) mtl: needed (>=2.1 && <2.3), couldn't resolve dependencies random: needed (-any), couldn't resolve dependencies transformers: needed (>=0.3 && <0.6), couldn't resolve dependencies transformers-compat: needed (>=0.4 && <0.6), couldn't resolve dependencies needed package: monadrandom-0.4.2.3 -- failure when adding dependencies: base: needed (>=4 && <5), not present in build plan (latest applicable 4.9.0.0) stm: needed (>=2.0 && <2.5), couldn't resolve dependencies transformers: needed (>=0.2 && <0.6), couldn't resolve dependencies needed package: statevar-1.1.0.4 <snipped large log>
even trying stack build --executable-profiling
results in same error.
for reference, library dependencies are:
build-depends: base >= 4.7 && < 5 , aeson , servant , servant-server , wai , warp , either , bytestring , transformers , postgresql-simple , amazonka , amazonka-sqs , lens , text , time , resource-pool
how can resolve can compile project stack , have profiling built in use +rts -p
?
what "stack exec -- ghc" say? if ghc installed globally, lacks profiling libraries. if so, "stack setup --no-system-ghc" + "stack build --no-system-ghc"
what stack.yaml configuration? if you've set resolver of "ghc-*", won't work unless specify versions of dependencies in "extra-deps". you'll want use stackage snapshot - https://www.stackage.org/
Comments
Post a Comment