[GHC] #10894: In users_guide/profiling.xml : -prof flag not to be used with cabal/stack

#10894: In users_guide/profiling.xml : -prof flag not to be used with cabal/stack -------------------------------------+------------------------------------- Reporter: | Owner: robstewartuk | Type: bug | Status: new Priority: lowest | Milestone: Component: | Version: 7.10.2 Documentation | Keywords: user | Operating System: Unknown/Multiple guide, profiling | Architecture: | Type of failure: Documentation Unknown/Multiple | bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- The documentation for compiling with cost centre profiling support is here: https://github.com/ghc/ghc/blob/master/docs/users_guide/profiling.xml#L79 It says: {{{ Compile and run this program as follows: $ ghc -prof -fprof-auto -rtsopts Main.hs $ ./Main +RTS -p 121393 $ }}} This is not the case when cabal or stack are used, as `-prof` should be omitted, i.e. {{{ cabal install --enable-executable-profiling --enable-library-profiling --ghc-options="-fprof-auto -rtsopts" }}} If the user does not know this and includes `-prof` in the --ghc-options string, they are likely to see compiler error messages relating to `p_dyn`, e.g. {{{ Failed to load interface for ‘GHC.Integer.Type’ Perhaps you haven't installed the "p_dyn" libraries for package ‘integer- gmp-1.0.0.0’? Use -v to see a list of the files searched for. }}} Given that other parts of the `profiling.xml` file does refer to cabal, do people agree that it might be helpful to make it explicit in Section "5.1. Cost centres and cost-centre stacks", that using ghc directly `-prof` should be used (no change to the XML file): {{{ $ ghc -prof -fprof-auto -rtsopts Main.hs }}} Though if cabal/stack is being used, the `-prof` should be omitted (an addition to the XML file): {{{ $ cabal install --enable-executable-profiling --enable-library-profiling --ghc-options="-fprof-auto -rtsopts" }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10894 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10894: In users_guide/profiling.xml : -prof flag not to be used with cabal/stack -------------------------------------+------------------------------------- Reporter: robstewartuk | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Documentation | Version: 7.10.2 Resolution: | Keywords: user | guide, profiling Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by osa1): I had this problem before and it's quite annoying, but I feel like the right way to solve this is to add a check in Cabal and print a warning if `--ghc-options=-prof` is used. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10894#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10894: In users_guide/profiling.xml : -prof flag not to be used with cabal/stack -------------------------------------+------------------------------------- Reporter: robstewartuk | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Documentation | Version: 7.10.2 Resolution: | Keywords: user | guide, profiling Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by robstewartuk): Thanks @osa1 , I agree with this suggestion. I have opened this suggestion for both cabal and stack in two mirrored tickets: https://github.com/commercialhaskell/stack/issues/1015 https://github.com/haskell/cabal/issues/2827 Once both tickets are addressed, I will return here to close this one. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10894#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10894: In users_guide/profiling.xml : -prof flag not to be used with cabal/stack -------------------------------------+------------------------------------- Reporter: robstewartuk | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Documentation | Version: 7.10.2 Resolution: | Keywords: user | guide, profiling Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by robstewartuk): Indeed, these cabal and stack github tickets have been (stack) or are being (cabal) addressed, as a concern of their compile time flags. See the discussions in the respective links in [https://ghc.haskell.org/trac/ghc/ticket/10894#comment:2]. Closing this GHC ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10894#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10894: In users_guide/profiling.xml : -prof flag not to be used with cabal/stack -------------------------------------+------------------------------------- Reporter: robstewartuk | Owner: Type: bug | Status: closed Priority: lowest | Milestone: Component: Documentation | Version: 7.10.2 Resolution: wontfix | Keywords: user | guide, profiling Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by robstewartuk): * status: new => closed * resolution: => wontfix -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10894#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC