Re: GHC/LLDB integration
Excellent, those suggestions are along the lines I was thinking. Thanks for the pointer (no pun intended) re. the C functions in the RTS; I hadn't known of those. Will On Wed, Apr 20, 2011 at 6:22 AM, Simon Marlow wrote: > Sounds interesting, though I know nothing about LLDB. It would be nice to > have a little help from the debugger for things like: > > - displaying the stack in a nicer way > - displaying heap objects > - searching the heap > - displaying runtime state: what threads exist and what state > they're in, summary of various RTS data structures, etc. > > For some of these I have C functions in the RTS that I can call from gdb. > e.g. there's findPtr() that searches the heap for occurrences of a > particular pointer (useful for debugging leaks when the higher level tools > don't give you enough information). > > Cheers, > Simon > ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
GHC/LLDB integration
Hello all, I've been using LLDB for a few weeks now, initially acquainting myself with its python bindings. It occurred to me early on that they might integrate into GHC's testsuite well, so I began writing a driver. The idea was to encapsulate the launched haskell processes in LLDB and generate more useful debugging information for failed tests (I'd previously been hunting down a few spurious segfaults). However, LLDB is quite immature and currently lacking such capabilities as generating core files, among other things. But while searching for core file generation, I ended up discovering that it is to eventually be implemented as a native plugin. It turns out that the plugin system allows for a lot of extensibility, including language and ABI extension. So I started digging into that and just recently began working on adding a GHRuntime plugin which should allow for demangling of symbols (easy), analysis and description of info tables and call graphs (hard), etc. So before I get too far into it, and because I am not a GHC guru, I'd like to gauge it's ultimate usefulness amongst the community. Given that haskell code goes through several stages of transformation, can more useful information be derived from a debugged executable? Or can more useful debug information be emitted by GHC if it can be interpreted by a purpose-made debugger plugin? If so, what information and functionality would be desirable? Ideas and comments are most welcome. Will ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GHC build error: cannot satisfy -package ghc-7.1.20110217
Hi Simon, thanks for the reply. Indeed it is reproducible with a maintainer-clean tree and to be sure I even set up a fresh repo. I'm still unclear what the underlying issue is, but I've worked around it by first running `make` until the error, then editing "./ghc/stage1/package-data.mk" to remove the version from the ghc dep, and finally rerunning `make`. The resulting build performs comparably in the test suite to previous builds, so I think it's probably an okay workaround. Will On Tue, Mar 8, 2011 at 6:44 AM, Simon Marlow wrote: > On 04/03/11 11:49, William Knop wrote: >> >> Hi all, >> Not to pester, but this problem has me stumped. All of the >> dependencies that ghc reports are broken/recursive are reported (with >> identical versions) by ghc-pkg/cabal as being part of my bootstrap >> install. >> >> Rerunning the offending command with "-package ghc" instead of >> "-package ghc-7.1.20110217" suppresses the error, but `make` >> nonetheless insists on rerunning the command with the original >> arguments. Furthermore, I'm unsure if I'm actually working around a >> bug or if I'm instead just silencing an error that will slyly >> retaliate from the shadows. It certainly seems like there's a subtlety >> with cabal that I don't understand. Any help would be much >> appreciated. > > I don't know what might case this I'm afraid. Is it reproducible from a > completely clean tree? (i.e. make maintainer-clean first). > > Cheers, > Simon > > >> Will >> >> >> On Sun, Feb 27, 2011 at 11:26 PM, William Knop >> wrote: >>> >>> I'm not sure what happened with the quote formatting in my original >>> message; sorry about that. Anyhow, I'd really appreciate it if someone >>> would chime in about this issue. Is it something silly that I'm not >>> comprehending about the build system or cabal, or is it a legitimate >>> bug/deficiency? >>> >>> Thanks, >>> Will >>> >>> On Thu, Feb 24, 2011 at 7:24 PM, William Knop >>> wrote: >>>> >>>> Hi all, >>>> I'm building GHC HEAD, and I've encountered the following error a couple >>>> times: >>>>> >>>>> "/usr/bin/ghc" -M -dep-makefile ghc/stage1/build/.depend.haskell.tmp >>>>> -include-pkg-deps -H32m -O -package-conf libraries/bootstrapping.conf >>>>> -hide-all-packages -i -ighc/. -ighc/stage1/build >>>>> -ighc/stage1/build/autogen >>>>> -Ighc/stage1/build -Ighc/stage1/build/autogen -optP-include >>>>> -optPghc/stage1/build/autogen/cabal_macros.h -package array-0.3.0.2 >>>>> -package >>>>> base-4.3.1.0 -package bytestring-0.9.1.10 -package directory-1.1.0.0 >>>>> -package filepath-1.2.0.0 -package ghc-7.1.20110217 -package >>>>> process-1.0.1.4 >>>>> -package unix-2.4.1.0 -Wall -XHaskell98 -XNondecreasingIndentation -XCPP >>>>> -XPatternGuards -no-user-package-conf -rtsopts -odir ghc/stage1/build >>>>> -hidir >>>>> ghc/stage1/build -stubdir ghc/stage1/build -hisuf hi -osuf o -hcsuf hc >>>>> ghc/./Main.hs >>>>> >>>>> : cannot satisfy -package ghc-7.1.20110217: >>>>> >>>>> ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4 is unusable due >>>>> to missing or recursive dependencies: >>>>> >>>>> Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80 >>>>> bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686 >>>>> hoopl-3.8.6.1-9f2c1afa2d4e6e1f5dd2821dfd6b919b >>>>> hpc-0.5.0.6-71c33aa47ae2440fd78a2a606987bc82 >>>>> >>>>> (use -v for more information) >>>>> >>>>> make[1]: *** [ghc/stage1/build/.depend.haskell] Error 1 >>>>> >>>>> make: *** [all] Error 2 >>>> >>>> The last time I saw this, I realized that `make clean` and even `make >>>> maintainer-clean` failed to remove the old .hs and .o files in ./libraries. >>>> I ran `find ./libraries | grep "\.hi$\|\.o$" | xargs -n 1 rm` which cleaned >>>> things up nicely. Then I had to fiddle around with `ghc-pkg` and >>>> unfortunately I don't remember exactly what I did, but everything built >>>> fine. >>>> This time, the error persists and I'm getting nowhere messing with >>>> `ghc-pkg` or manual builds of the of
Re: GHC build error: cannot satisfy -package ghc-7.1.20110217
Hi all, Not to pester, but this problem has me stumped. All of the dependencies that ghc reports are broken/recursive are reported (with identical versions) by ghc-pkg/cabal as being part of my bootstrap install. Rerunning the offending command with "-package ghc" instead of "-package ghc-7.1.20110217" suppresses the error, but `make` nonetheless insists on rerunning the command with the original arguments. Furthermore, I'm unsure if I'm actually working around a bug or if I'm instead just silencing an error that will slyly retaliate from the shadows. It certainly seems like there's a subtlety with cabal that I don't understand. Any help would be much appreciated. Will On Sun, Feb 27, 2011 at 11:26 PM, William Knop wrote: > I'm not sure what happened with the quote formatting in my original > message; sorry about that. Anyhow, I'd really appreciate it if someone > would chime in about this issue. Is it something silly that I'm not > comprehending about the build system or cabal, or is it a legitimate > bug/deficiency? > > Thanks, > Will > > On Thu, Feb 24, 2011 at 7:24 PM, William Knop > wrote: >> >> Hi all, >> I'm building GHC HEAD, and I've encountered the following error a couple >> times: >>> >>> "/usr/bin/ghc" -M -dep-makefile ghc/stage1/build/.depend.haskell.tmp >>> -include-pkg-deps -H32m -O -package-conf libraries/bootstrapping.conf >>> -hide-all-packages -i -ighc/. -ighc/stage1/build -ighc/stage1/build/autogen >>> -Ighc/stage1/build -Ighc/stage1/build/autogen -optP-include >>> -optPghc/stage1/build/autogen/cabal_macros.h -package array-0.3.0.2 >>> -package base-4.3.1.0 -package bytestring-0.9.1.10 -package >>> directory-1.1.0.0 -package filepath-1.2.0.0 -package ghc-7.1.20110217 >>> -package process-1.0.1.4 -package unix-2.4.1.0 -Wall -XHaskell98 >>> -XNondecreasingIndentation -XCPP -XPatternGuards -no-user-package-conf >>> -rtsopts -odir ghc/stage1/build -hidir ghc/stage1/build -stubdir >>> ghc/stage1/build -hisuf hi -osuf o -hcsuf hc ghc/./Main.hs >>> >>> : cannot satisfy -package ghc-7.1.20110217: >>> >>> ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4 is unusable due to >>> missing or recursive dependencies: >>> >>> Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80 >>> bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686 >>> hoopl-3.8.6.1-9f2c1afa2d4e6e1f5dd2821dfd6b919b >>> hpc-0.5.0.6-71c33aa47ae2440fd78a2a606987bc82 >>> >>> (use -v for more information) >>> >>> make[1]: *** [ghc/stage1/build/.depend.haskell] Error 1 >>> >>> make: *** [all] Error 2 >> >> The last time I saw this, I realized that `make clean` and even `make >> maintainer-clean` failed to remove the old .hs and .o files in ./libraries. >> I ran `find ./libraries | grep "\.hi$\|\.o$" | xargs -n 1 rm` which cleaned >> things up nicely. Then I had to fiddle around with `ghc-pkg` and >> unfortunately I don't remember exactly what I did, but everything built fine. >> This time, the error persists and I'm getting nowhere messing with `ghc-pkg` >> or manual builds of the offending libraries. It's odd that the dependencies >> are all shown, although ghc-7.1.20110217 is highlighted in blue (not sure >> what that means): >>> >>> $ ghc-pkg list -v >>> >>> using cache: >>> /Users/wknop/.ghc/x86_64-darwin-7.1.20110217/package.conf.d/package.cache >>> >>> using cache: >>> /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d/package.cache >>> >>> /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d >>> >>> Cabal-1.11.0 (Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80) >>> >>> array-0.3.0.2 (array-0.3.0.2-82b79889a63c9f1c51bec752ba6e74c2) >>> >>> base-4.3.1.0 (base-4.3.1.0-772e705367f0e57fa35bb2732ef27d5f) >>> >>> bin-package-db-0.0.0.0 >>> (bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686) >>> >>> binary-0.5.0.2 (binary-0.5.0.2-0fc98c736c6f368bb204d82d52e9b985) >>> >>> bytestring-0.9.1.10 >>> (bytestring-0.9.1.10-9ed25604136f5805a5307d3964bed1a2) >>> >>> containers-0.4.0.0 (containers-0.4.0.0-e65ebc811ae84f909e4426649d5305b6) >>> >>> directory-1.1.0.0 (directory-1.1.0.0-af496658c243f2bddd90748bc896b9cb) >>> >>> ex
Re: GHC build error: cannot satisfy -package ghc-7.1.20110217
I'm not sure what happened with the quote formatting in my original message; sorry about that. Anyhow, I'd really appreciate it if someone would chime in about this issue. Is it something silly that I'm not comprehending about the build system or cabal, or is it a legitimate bug/deficiency? Thanks, Will On Thu, Feb 24, 2011 at 7:24 PM, William Knop wrote: > > Hi all, > I'm building GHC HEAD, and I've encountered the following error a couple > times: >> >> "/usr/bin/ghc" -M -dep-makefile ghc/stage1/build/.depend.haskell.tmp >> -include-pkg-deps -H32m -O -package-conf libraries/bootstrapping.conf >> -hide-all-packages -i -ighc/. -ighc/stage1/build -ighc/stage1/build/autogen >> -Ighc/stage1/build -Ighc/stage1/build/autogen -optP-include >> -optPghc/stage1/build/autogen/cabal_macros.h -package array-0.3.0.2 -package >> base-4.3.1.0 -package bytestring-0.9.1.10 -package directory-1.1.0.0 >> -package filepath-1.2.0.0 -package ghc-7.1.20110217 -package process-1.0.1.4 >> -package unix-2.4.1.0 -Wall -XHaskell98 -XNondecreasingIndentation -XCPP >> -XPatternGuards -no-user-package-conf -rtsopts -odir ghc/stage1/build -hidir >> ghc/stage1/build -stubdir ghc/stage1/build -hisuf hi -osuf o -hcsuf hc >> ghc/./Main.hs >> >> : cannot satisfy -package ghc-7.1.20110217: >> >> ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4 is unusable due to >> missing or recursive dependencies: >> >> Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80 >> bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686 >> hoopl-3.8.6.1-9f2c1afa2d4e6e1f5dd2821dfd6b919b >> hpc-0.5.0.6-71c33aa47ae2440fd78a2a606987bc82 >> >> (use -v for more information) >> >> make[1]: *** [ghc/stage1/build/.depend.haskell] Error 1 >> >> make: *** [all] Error 2 > > The last time I saw this, I realized that `make clean` and even `make > maintainer-clean` failed to remove the old .hs and .o files in ./libraries. I > ran `find ./libraries | grep "\.hi$\|\.o$" | xargs -n 1 rm` which cleaned > things up nicely. Then I had to fiddle around with `ghc-pkg` and > unfortunately I don't remember exactly what I did, but everything built fine. > This time, the error persists and I'm getting nowhere messing with `ghc-pkg` > or manual builds of the offending libraries. It's odd that the dependencies > are all shown, although ghc-7.1.20110217 is highlighted in blue (not sure > what that means): >> >> $ ghc-pkg list -v >> >> using cache: >> /Users/wknop/.ghc/x86_64-darwin-7.1.20110217/package.conf.d/package.cache >> >> using cache: >> /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d/package.cache >> >> /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d >> >> Cabal-1.11.0 (Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80) >> >> array-0.3.0.2 (array-0.3.0.2-82b79889a63c9f1c51bec752ba6e74c2) >> >> base-4.3.1.0 (base-4.3.1.0-772e705367f0e57fa35bb2732ef27d5f) >> >> bin-package-db-0.0.0.0 >> (bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686) >> >> binary-0.5.0.2 (binary-0.5.0.2-0fc98c736c6f368bb204d82d52e9b985) >> >> bytestring-0.9.1.10 (bytestring-0.9.1.10-9ed25604136f5805a5307d3964bed1a2) >> >> containers-0.4.0.0 (containers-0.4.0.0-e65ebc811ae84f909e4426649d5305b6) >> >> directory-1.1.0.0 (directory-1.1.0.0-af496658c243f2bddd90748bc896b9cb) >> >> extensible-exceptions-0.1.1.2 >> (extensible-exceptions-0.1.1.2-d8c5b906654260efd7249f497d17a831) >> >> ffi-1.0 (builtin_ffi) >> >> filepath-1.2.0.0 (filepath-1.2.0.0-083d27aec2076819a3255aa35e2ce43b) >> >> ghc-7.1.20110217 (ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4) >> >> ghc-prim-0.2.0.0 (ghc-prim-0.2.0.0-dcc46e56b3af1fa9c9fa226ef635850d) >> >> haskell2010-1.0.0.0 (haskell2010-1.0.0.0-5a47cd47ec15d3267342d7569d62be69) >> >> haskell98-1.1.0.0 (haskell98-1.1.0.0-ff2f72cc8added329f0e4b03c5cc83e8) >> >> hoopl-3.8.6.1 (hoopl-3.8.6.1-9f2c1afa2d4e6e1f5dd2821dfd6b919b) >> >> hpc-0.5.0.6 (hpc-0.5.0.6-71c33aa47ae2440fd78a2a606987bc82) >> >> integer-gmp-0.2.0.2 (integer-gmp-0.2.0.2-a1c2a972ace139a643a7e915357c7135) >> >> old-locale-1.0.0.2 (old-locale-1.0.0.2-f8974f34bd37bc556cfeca15f8cf9933) >> >> old-time-1.0.0.6 (old-time-1.0.0.6-caa2975bbf8e858473e1d88cca412718) >> >> pretty-1.0.2.0 (pretty-1.0.2.0-86ef771ce2f9bebde0154187a7714390) >> &
GHC build error: cannot satisfy -package ghc-7.1.20110217
Hi all, I'm building GHC HEAD, and I've encountered the following error a couple times: "/usr/bin/ghc" -M -dep-makefile ghc/stage1/build/.depend.haskell.tmp > -include-pkg-deps -H32m -O -package-conf libraries/bootstrapping.conf > -hide-all-packages -i -ighc/. -ighc/stage1/build -ighc/stage1/build/autogen > -Ighc/stage1/build -Ighc/stage1/build/autogen -optP-include > -optPghc/stage1/build/autogen/cabal_macros.h -package array-0.3.0.2 -package > base-4.3.1.0 -package bytestring-0.9.1.10 -package directory-1.1.0.0 > -package filepath-1.2.0.0 -package ghc-7.1.20110217 -package process-1.0.1.4 > -package unix-2.4.1.0 -Wall -XHaskell98 -XNondecreasingIndentation -XCPP > -XPatternGuards -no-user-package-conf -rtsopts -odir ghc/stage1/build -hidir > ghc/stage1/build -stubdir ghc/stage1/build -hisuf hi -osuf o -hcsuf hc > ghc/./Main.hs : cannot satisfy -package ghc-7.1.20110217: ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4 is unusable due to > missing or recursive dependencies: Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80 > bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686 > hoopl-3.8.6.1-9f2c1afa2d4e6e1f5dd2821dfd6b919b > hpc-0.5.0.6-71c33aa47ae2440fd78a2a606987bc82 (use -v for more information) make[1]: *** [ghc/stage1/build/.depend.haskell] Error 1 make: *** [all] Error 2 The last time I saw this, I realized that `make clean` and even `make maintainer-clean` failed to remove the old .hs and .o files in ./libraries. I ran `find ./libraries | grep "\.hi$\|\.o$" | xargs -n 1 rm` which cleaned things up nicely. Then I had to fiddle around with `ghc-pkg` and unfortunately I don't remember exactly what I did, but everything built fine. This time, the error persists and I'm getting nowhere messing with `ghc-pkg` or manual builds of the offending libraries. It's odd that the dependencies are all shown, although ghc-7.1.20110217 is highlighted in blue (not sure what that means): $ ghc-pkg list -v using cache: > /Users/wknop/.ghc/x86_64-darwin-7.1.20110217/package.conf.d/package.cache using cache: > /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d/package.cache /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d Cabal-1.11.0 (Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80) array-0.3.0.2 (array-0.3.0.2-82b79889a63c9f1c51bec752ba6e74c2) base-4.3.1.0 (base-4.3.1.0-772e705367f0e57fa35bb2732ef27d5f) bin-package-db-0.0.0.0 > (bin-package-db-0.0.0.0-e7fefdd6f3601d1ce130006fe020c686) binary-0.5.0.2 (binary-0.5.0.2-0fc98c736c6f368bb204d82d52e9b985) bytestring-0.9.1.10 > (bytestring-0.9.1.10-9ed25604136f5805a5307d3964bed1a2) containers-0.4.0.0 (containers-0.4.0.0-e65ebc811ae84f909e4426649d5305b6) directory-1.1.0.0 (directory-1.1.0.0-af496658c243f2bddd90748bc896b9cb) extensible-exceptions-0.1.1.2 > (extensible-exceptions-0.1.1.2-d8c5b906654260efd7249f497d17a831) ffi-1.0 (builtin_ffi) filepath-1.2.0.0 (filepath-1.2.0.0-083d27aec2076819a3255aa35e2ce43b) ghc-7.1.20110217 (ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4) ghc-prim-0.2.0.0 (ghc-prim-0.2.0.0-dcc46e56b3af1fa9c9fa226ef635850d) haskell2010-1.0.0.0 > (haskell2010-1.0.0.0-5a47cd47ec15d3267342d7569d62be69) haskell98-1.1.0.0 (haskell98-1.1.0.0-ff2f72cc8added329f0e4b03c5cc83e8) hoopl-3.8.6.1 (hoopl-3.8.6.1-9f2c1afa2d4e6e1f5dd2821dfd6b919b) hpc-0.5.0.6 (hpc-0.5.0.6-71c33aa47ae2440fd78a2a606987bc82) integer-gmp-0.2.0.2 > (integer-gmp-0.2.0.2-a1c2a972ace139a643a7e915357c7135) old-locale-1.0.0.2 (old-locale-1.0.0.2-f8974f34bd37bc556cfeca15f8cf9933) old-time-1.0.0.6 (old-time-1.0.0.6-caa2975bbf8e858473e1d88cca412718) pretty-1.0.2.0 (pretty-1.0.2.0-86ef771ce2f9bebde0154187a7714390) process-1.0.1.4 (process-1.0.1.4-8e5c7fd6eb02062956e817290e78052c) random-1.0.0.3 (random-1.0.0.3-ba5d71475c84afcd915bdd0c7896d252) rts-1.0 (builtin_rts) template-haskell-2.5.0.0 > (template-haskell-2.5.0.0-d8450268cce481f1f0f0609421f45d6a) time-1.2.0.3 (time-1.2.0.3-54ba5c61f979a06ebaa014e89cb57800) unix-2.4.1.0 (unix-2.4.1.0-ed4a568ba9e55a6699f0a5637de1eb70) /Users/wknop/.ghc/x86_64-darwin-7.1.20110217/package.conf.d HUnit-1.2.2.3 (HUnit-1.2.2.3-cfbd4873c8348462ffebec9e0e2612ff) QuickCheck-2.4.0.1 (QuickCheck-2.4.0.1-203424cf15ac4e156e45863bdb6c5c3c) ansi-terminal-0.5.5 > (ansi-terminal-0.5.5-572a1d0154fb2632bb4e9431adf0cdb1) ansi-wl-pprint-0.6.3 > (ansi-wl-pprint-0.6.3-875ef2078f6bfbf85f537bf474d4db67) hostname-1.0 (hostname-1.0-fd008e4cbc7e53cd089e95782cd47a3a) mtl-2.0.1.0 (mtl-2.0.1.0-86fd290a44e249d2b21a3e6adc3985a4) regex-base-0.93.2 (regex-base-0.93.2-f611e499723a1c17ae67e04fe4ce3d1e) regex-posix-0.94.4 (regex-posix-0.94.4-9e243c82c4410fcdd8b9c4a9f579cd23) test-framework-0.3.3 > (test-framework-0.3.3-2e089ba99de1028033d51a65ef26cced) test-framework-hunit-0.2.6 > (test-framework-hunit-0.2.6-cd25c078816dfb54d