Skip to content

stack build --profile problem (Windows 10) #4709

@mpilgrem

Description

@mpilgrem

On Windows 10, I am using stack --version Version 1.10.0, Git revision aa0185f2498541a16ab52c30bb6fe8660a729932 (7286 commits) x86_64 hpack-0.31.1.

A plain vanilla stack project (stack new profileTest ... Selected resolver: lts-13.15) builds as expected with GHC 8.6.4 but stack build --profile results in errors such as this:

>stack build --profile
profileTest-0.1.0.0: configure (lib + exe)
Configuring profileTest-0.1.0.0...
profileTest-0.1.0.0: build (lib + exe)
Preprocessing library for profileTest-0.1.0.0..
Building library for profileTest-0.1.0.0..
[2 of 2] Compiling Paths_profileTest ( .stack-work\dist\e626a42b\build\autogen\Paths_profileTest.hs, .stack-work\dist\e626a42b\build\Paths_profileTest.o )
[1 of 2] Compiling Lib              ( src\Lib.hs, .stack-work\dist\e626a42b\build\Lib.p_o )

src\Lib.hs:1:8: error:
    Could not find module `Prelude'
    Perhaps you haven't installed the profiling libraries for package `base-4.12.0.0'?
    Use -v to see a list of the files searched for.
  |
1 | module Lib
  |        ^^^


--  While building package profileTest-0.1.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.4.0.1_ghc-8.6.4.exe --builddir=.stack-work\dist\e626a42b build lib:profileTest exe:profileTest-exe --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

In case it is something to do with GHC and what comes with it, I believe I am using the GHC that stack provides:

>stack exec where -- ghc
C:\Users\mikep\AppData\Local\Programs\stack\x86_64-windows\ghc-8.6.4\bin\ghc.exe

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions