snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

Cannot build with profiling #146

Closed ababkin closed 9 years ago

ababkin commented 9 years ago

using older cabal, so using options:

library-profiling: True executable-profiling: True

output:

Loading package snap-core-0.9.6.4 ... linking ... done. Loading package snap-server-0.9.4.6 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package directory-tree-0.12.0 ... linking ... done. src/Snap/Starter.hs:1:1: cannot find normal object file ‘dist/dist-sandbox-1592455a/build/snap/snap-tmp/Snap/StarterTH.dyn_o’ while linking an interpreted expression cabal: Error: some packages failed to install: snap-0.14.0.2 failed during the building phase. The exception was: ExitFailure 1

saw a similar issue closed, which suggested to include executable-profiling: True, which i did to no avail

chowells79 commented 9 years ago

What version of GHC, what OS, what version of cabal, how can we reproduce this issue?

It looks like it's something about GHC's use of dynamicly-loaded packages, but there's so much missing information it's hard to tell.

ababkin commented 9 years ago

OS: OSX Yosemite 10.10.2 GHC: 7.8.3 ~ $ cabal --version cabal-install version 1.20.0.3 using version 1.20.0.3 of the Cabal library

reproduce instructions: add following options into the cabal.config library-profiling: True executable-profiling: True

run: cabal sandbox delete cabal sandbox init cabal configure --enable-library-profiling --enable-executable-profiling cabal update cabal install

let me know if these details are sufficient, if not, please tell me how i can get more details

gregorycollins commented 9 years ago

Looks like https://ghc.haskell.org/trac/ghc/ticket/8180

ababkin commented 9 years ago

@gregorycollins Thanks for the reference, but even with this info I am having same problems. To reduce the problem space, i am building the latest stable version of snap and getting same error.

things i've tried include:

Loading package transformers-0.4.3.0 ... : can't load .so/.DLL for: libHStransformers-0.4.3.0.dylib (dlopen(libHStransformers-0.4.3.0.dylib, 9): image not found)

Now, I am pretty sure that people build snap with profiling on a similar configuration to mine. Right now this is a blocking issue for me.

Any suggestions?

gregorycollins commented 9 years ago

Does GHC 7.10 work (if it's an option for you)?

ababkin commented 9 years ago

Tried 7.10.1 to compile snap

got this kind of errors:

src/Control/Access/RoleBased/Checker.hs:8:18: Could not find module ‘Control.Monad.Logic’ Perhaps you haven't installed the "p_dyn" libraries for package ‘logict-0.6.0.2@logic_LgJmaQK965dJZBDwv8V4zb’? Use -v to see a list of the files searched for.

src/Control/Access/RoleBased/Checker.hs:10:18: Could not find module ‘Control.Monad.State.Lazy’ Perhaps you haven't installed the "p_dyn" libraries for package ‘mtl-2.2.1@mtl_6HevPxzlSPX058IyhMPnF5’? Use -v to see a list of the files searched for.

src/Control/Access/RoleBased/Internal/Role.hs:4:18: Could not find module ‘Control.Monad.ST’ Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.8.0.0’? Use -v to see a list of the files searched for.

src/Control/Access/RoleBased/Internal/Role.hs:5:18: Could not find module ‘Data.Hashable’ Perhaps you haven't installed the "p_dyn" libraries for package ‘hashable-1.2.3.2@hasha_4pCQ7Lk5Sy77uu2IVvihjA’? Use -v to see a list of the files searched for.

src/Control/Access/RoleBased/Internal/Role.hs:8:18: Could not find module ‘Data.String’ Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.8.0.0’? Use -v to see a list of the files searched for.

gregorycollins commented 9 years ago

@ababkin looks like you need the profiling libraries. Did whatever GHC distro you installed not come with them?

ababkin commented 9 years ago

@gregorycollins - reopened issue with the same error for ubuntu/ghc-7.10.1/cabal-install-1.22.2 here: https://github.com/snapframework/snap/issues/147