[GHC] #8735: hpc doesn't work on Mac

#8735: hpc doesn't work on Mac ------------------------------------+------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Keywords: | Operating System: MacOS X Architecture: Unknown/Multiple | Type of failure: Other Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc doesn't work on Mac ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Comment (by George): {{{ hpc doesn't work: hpc --version dyld: Library not loaded: @rpath/libHShpc-0.6.0.1-ghc7.8.20140130.dylib Referenced from: /usr/local/bin/hpc Reason: image not found Trace/BPT trap: 5 }}} this results in error popups when doing cabal install e.g. cabal install vector but this doesn't seem to affect the install -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc doesn't work on Mac ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Comment (by carter): george, whats your ghc --info say? mine has {{{ » ghc --info [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv") ,("C compiler command","gcc-4.8") ,("C compiler flags"," -m64 -fno-stack-protector") ,("C compiler link flags"," -m64") ,("ld command","/usr/bin/ld") ,("ld flags"," -arch x86_64") ,("ld supports compact unwind","YES") ,("ld supports build-id","NO") ,("ld supports filelist","YES") ,("ld is GNU ld","NO") ,("ar command","/usr/bin/ar") ,("ar flags","clqs") ,("ar supports at file","NO") ,("touch command","touch") ,("dllwrap command","/bin/false") ,("windres command","/bin/false") ,("libtool command","libtool") ,("perl command","/usr/bin/perl") ,("target os","OSDarwin") ,("target arch","ArchX86_64") ,("target word size","8") ,("target has GNU nonexec stack","False") ,("target has .ident directive","True") ,("target has subsections via symbols","True") ,("Unregisterised","NO") ,("LLVM llc command","/usr/local/bin/llc-3.4") ,("LLVM opt command","/usr/local/bin/opt-3.4") ,("Project version","7.8.20140130") ,("Booter version","7.6.3") ,("Stage","2") ,("Build platform","x86_64-apple-darwin") ,("Host platform","x86_64-apple-darwin") ,("Target platform","x86_64-apple-darwin") ,("Have interpreter","YES") ,("Object splitting supported","YES") ,("Have native code generator","YES") ,("Support SMP","YES") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn") ,("Support dynamic-too","YES") ,("Support parallel --make","YES") ,("Dynamic by default","NO") ,("GHC Dynamic","YES") ,("Leading underscore","YES") ,("Debug on","False") ,("LibDir","/usr/local/lib/ghc-7.8.20140130") ,("Global Package DB","/usr/local/lib/ghc-7.8.20140130/package.conf.d") ] }}} (i'm using my own RC build rather than Austin's) could you paste your "ghc --info" please? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc doesn't work on Mac ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Comment (by George): OS 10.9.1 xcode 5.0.2 {{{ ghc --info [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv") ,("C compiler command","/usr/local/bin/gcc") ,("C compiler flags"," -m64 -fno-stack-protector") ,("C compiler link flags"," -m64") ,("ld command","/usr/bin/ld") ,("ld flags"," -arch x86_64") ,("ld supports compact unwind","YES") ,("ld supports build-id","NO") ,("ld supports filelist","YES") ,("ld is GNU ld","NO") ,("ar command","/usr/bin/ar") ,("ar flags","clqs") ,("ar supports at file","@ArSupportsAtFile@") ,("touch command","touch") ,("dllwrap command","/bin/false") ,("windres command","/bin/false") ,("libtool command","libtool") ,("perl command","/usr/bin/perl") ,("target os","OSDarwin") ,("target arch","ArchX86_64") ,("target word size","8") ,("target has GNU nonexec stack","False") ,("target has .ident directive","True") ,("target has subsections via symbols","True") ,("Unregisterised","NO") ,("LLVM llc command","llc") ,("LLVM opt command","opt") ,("Project version","7.8.20140130") ,("Booter version","7.6.3") ,("Stage","2") ,("Build platform","x86_64-apple-darwin") ,("Host platform","x86_64-apple-darwin") ,("Target platform","x86_64-apple-darwin") ,("Have interpreter","YES") ,("Object splitting supported","YES") ,("Have native code generator","YES") ,("Support SMP","YES") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn") ,("Support dynamic-too","YES") ,("Support parallel --make","YES") ,("Dynamic by default","NO") ,("GHC Dynamic","YES") ,("Leading underscore","YES") ,("Debug on","False") ,("LibDir","/usr/local/lib/ghc-7.8.20140130") ,("Global Package DB","/usr/local/lib/ghc-7.8.20140130/package.conf.d") ] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc doesn't work on Mac ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Comment (by nomeata): This is not specific to mac; the problem is that a dynamically linked file, which finds its libraries via rpath, is installed into the system- wide bin. I believe you need a patch like {{{ Index: ghc-7.9.20140130/utils/hpc/ghc.mk =================================================================== --- ghc-7.9.20140130.orig/utils/hpc/ghc.mk 2014-01-31 17:28:32.000000000 +0000 +++ ghc-7.9.20140130/utils/hpc/ghc.mk 2014-02-04 23:15:53.000000000 +0000 @@ -15,4 +15,7 @@ utils/hpc_dist-install_INSTALL = YES utils/hpc_dist-install_INSTALL_INPLACE = YES utils/hpc_dist-install_PROGNAME = hpc +utils/hpc_dist-install_SHELL_WRAPPER = YES +utils/hpc_dist-install_INSTALL_SHELL_WRAPPER_NAME = hpc + $(eval $(call build-prog,utils/hpc,dist-install,1)) Index: ghc-7.9.20140130/utils/hpc/hpc.wrapper =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ ghc-7.9.20140130/utils/hpc/hpc.wrapper 2014-02-04 23:17:49.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +exec "$executablename" ${1+"$@"} }}} or something nicer. (from http://anonscm.debian.org/darcs/pkg-haskell/ghc/patches/hpc-wrapper ) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc doesn't work on Mac ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: high | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Changes (by George): * priority: normal => high Comment: Thanks very much. I assume we need a working hpc for 7.8.1 thus making the priority high -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc doesn't work on platforms using dynamic linking ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: high | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc crashes on platforms using dynamic linking ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: new Priority: high | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc crashes on platforms using dynamic linking
----------------------------------+------------------------------------
Reporter: George | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.8.1
Component: Code Coverage | Version: 7.8.1-rc1
Resolution: | Keywords:
Operating System: MacOS X | Architecture: Unknown/Multiple
Type of failure: Other | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
----------------------------------+------------------------------------
Comment (by Austin Seipp

#8735: hpc crashes on platforms using dynamic linking ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: merge Priority: high | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Changes (by thoughtpolice): * status: new => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8735: hpc crashes on platforms using dynamic linking ----------------------------------+------------------------------------ Reporter: George | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.8.1 Component: Code Coverage | Version: 7.8.1-rc1 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------------ Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged in 7.8. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8735#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC