Closed
Description
When building a program with the --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
flags, a .prof file is not produced when using stack exec
with the +RTS -p
flag. This problems occurs on Windows 10 with stack version 1.0.4
Steps to Reproduce:
- Create new stack project with
stack new A
- Build project with profiling flags with
stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
- Run the executable with profiling flags with
stack exec A-exe.exe -- +RTS -p
Expected
I expect a profiling file A-exe.prof to be created somewhere within the project directory.
Actual
No profile summary file can be found. A profile file can be made by executing the file directly without using stack.
Here is the stack version output:
> stack --version
Version 1.0.4, Git revision cf18703b1392a96a5a4896a560309e501af63260 (3220 commits) x86_64
This is the stack command I ran with the output:
> stack exec A-exe.exe --verbose -- +RTS -p
Version 1.0.4, Git revision cf18703b1392a96a5a4896a560309e501af63260 (3220 commits) x86_64
2016-04-11 19:12:53.846001: [debug] Checking for project config at: C:\Users\andrew\Dropbox\Haskell\A\stack.yaml @(stack_7LDm9brrZDRGPali8XJ7ve:Stack.Config src/St
ack\Config.hs:761:9)
2016-04-11 19:12:53.892878: [debug] Loading project config file stack.yaml @(stack_7LDm9brrZDRGPali8XJ7ve:Stack.Config src/Stack\Config.hs:779:13)
2016-04-11 19:12:53.908504: [debug] Trying to decode C:\stack_root\build-plan-cache\x86_64-windows\lts-5.12.cache @(stack_7LDm9brrZDRGPali8XJ7ve:Data.Binary.Versio
nTagged src/Data\Binary\VersionTagged.hs:55:5)
2016-04-11 19:12:53.955378: [debug] Success decoding C:\stack_root\build-plan-cache\x86_64-windows\lts-5.12.cache @(stack_7LDm9brrZDRGPali8XJ7ve:Data.Binary.Versio
nTagged src/Data\Binary\VersionTagged.hs:64:13)
2016-04-11 19:12:53.955378: [debug] Trying to decode C:\stack_root\indices\Hackage\00-index.cache @(stack_7LDm9brrZDRGPali8XJ7ve:Data.Binary.VersionTagged src/Data
\Binary\VersionTagged.hs:55:5)
2016-04-11 19:12:54.471037: [debug] Success decoding C:\stack_root\indices\Hackage\00-index.cache @(stack_7LDm9brrZDRGPali8XJ7ve:Data.Binary.VersionTagged src/Data
\Binary\VersionTagged.hs:64:13)
2016-04-11 19:12:54.502285: [debug] Run process: ghc --info @(stack_7LDm9brrZDRGPali8XJ7ve:System.Process.Read src/System\Process\Read.hs:269:3)
2016-04-11 19:12:54.643010: [debug] Run process: ghc --numeric-version @(stack_7LDm9brrZDRGPali8XJ7ve:System.Process.Read src/System\Process\Read.hs:269:3)
2016-04-11 19:12:54.721145: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_7LDm9brrZDRGPali8XJ7ve:System.Process.Rea
d src/System\Process\Read.hs:269:3)
2016-04-11 19:12:54.890404: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_7LDm9brrZDRGPali8XJ7ve:System.Process.Read src/System\Process\R
ead.hs:269:3)
2016-04-11 19:12:55.063277: [debug] Run process: A-exe.exe @(stack_7LDm9brrZDRGPali8XJ7ve:Stack.Exec src/Stack\Exec.hs:51:5)
2016-04-11 19:12:55.110172: [debug] Run process: C:\Users\andrew\Dropbox\Haskell\A\.stack-work\install\3fbeae10\bin\A-exe.exe @(stack_7LDm9brrZDRGPali8XJ7ve:Syste
m.Process.Run src/System\Process\Run.hs:105:5)
someFunc