Skip to content

Never build snapshot dependencies with executable profiling enabled (was: Can't build snap dependency when profiling is enabled) #1179

Closed
@wereHamster

Description

@wereHamster

My app is a pretty straight forward web app based on snap. I need to build it with profiling enabled, but that fails. It works fine when profiling is not enabled.

$ stack build --executable-profiling
snap-0.14.0.6: configure
snap-0.14.0.6: build
Progress: 1/2
--  While building package snap-0.14.0.6 using:
      $HOME/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1

[... snip ...]

[34 of 34] Compiling Snap             ( src/Snap.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Snap.p_o )
    In-place registering snap-0.14.0.6...
    Preprocessing executable 'snap' for snap-0.14.0.6...
    [1 of 2] Compiling Snap.StarterTH   ( src/Snap/StarterTH.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/snap/snap-tmp/Snap/StarterTH.p_o )

    src/Snap/StarterTH.hs:37:32: Warning:
        In the use of ‘free’ (imported from System.Directory.Tree):
        Deprecated: "Use record 'dirTree'"

    src/Snap/StarterTH.hs:39:29: Warning:
        In the use of ‘free’ (imported from System.Directory.Tree):
        Deprecated: "Use record 'dirTree'"
    [2 of 2] Compiling Main             ( src/Snap/Starter.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/snap/snap-tmp/Main.p_o )
    src/Snap/Starter.hs:1:1:
        cannot find normal object file ‘.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/snap/snap-tmp/Snap/StarterTH.dyn_o’
        while linking an interpreted expression

Might be related to #608. Though apparently that bug has been fixed a long time ago. I'm using GHC 7.10.2.

I don't really need to profile snap, I know the performance problem is elsewhere. An acceptable workaround for me would be to compile snap normally and everything else with profiling enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions