Skip to content

"ghc: panic! (the 'impossible' happened)" using "--enable-executable-dynamic" #2039

Closed

Description

@coreyoconnor

From: jtdaugherty/vty#54

Using --enable-executable-dynamic leads to a ghc panic. Filing here as Cabal handles --enable-executable-dynamic. If this is confirmed to not be caused by Cabal (likely so IMO) then I'll move to ghc's bug tracker.

To reproduce:

  1. clone https://github.com/coreyoconnor/executable-dynamic-issue
  2. cabal configure --enable-tests --enable-executable-dynamic
  3. cabal test

Reproduced on GHC 7.8.2, GHC 7.8.3, Cabal 1.18, Cabal 1.20. Ubuntu. The vty report is on Nix, which I do not have a working environment to reproduce with.

Activity

  1. coreyoconnor commented on Aug 16, 2014

    @coreyoconnor
    Author

    Changing the test suite name to verifyFoo also fails. Changing the name to VerifyFoo results in a different failure:

    dist/build/VerifyFoo.o: file not recognized: File truncated

  2. coreyoconnor commented on Aug 16, 2014

    @coreyoconnor
    Author

    In vty, changing the test suite name has no effect: Using "VerifyAttributeOps", "AttributeOpsTest", "verifyAttributeOps", "attributeopstestsuite" All result in:

    ghc: panic! (the 'impossible' happened) (GHC version 7.8.2 for x86_64-unknown-linux): Don't understand library name attributeopstestsuite

  3. 23Skidoo commented on Aug 17, 2014

    @23Skidoo
    Member

    GHC panics are bugs in GHC. Please report this at the GHC bug tracker.

  4. rwbarton commented on Jan 22, 2015

    @rwbarton
    Contributor

    It was reported as a GHC bug in https://ghc.haskell.org/trac/ghc/ticket/9625

    However, to the best of my understanding, it may still be a bug in Cabal. (That is, even if GHC did not panic, GHC would instead exit with an error.) In thomie's simplified example, cabal is building a dynamic Haskell library with the name libbar-ghc7.8.3.so, and registering a package with hs-libraries: bar. Normally these libraries have names like libHSbar-ghc7.8.3.so and this is what is causing the panic. Does anyone understand whether the HS prefix is really necessary?

  5. robertmassaioli commented on Jun 30, 2015

    @robertmassaioli

    Does anybody have a workaround for this? It's affecting my nix installations:

    In-place registering test-descriptor-0.4.0.2...
    [1 of 1] Compiling Main             ( dist/build/test-descriptorStub/test-descriptorStub-tmp/test-descriptorStub.hs, dist/build/test-descriptorStub/test-descriptorStub-tmp/Main.dyn_o )
    Linking dist/build/test-descriptorStub/test-descriptorStub ...
    ghc: panic! (the 'impossible' happened)
      (GHC version 7.10.1 for x86_64-apple-darwin):
        Don't understand library name test-descriptor
    
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
    
    builder for ‘/nix/store/yq7zv4ad6a71sa9jk14l1xm89in7b53f-haskell-atlassian-connect-descriptor-0.4.0.2.drv’ failed with exit code 1
    cannot build derivation ‘/nix/store/gxbr64m2dzrxxckmm9ar8l80rsz9vdk6-ghc-7.10.1.drv’: 1 dependencies couldn't be built
    error: build of ‘/nix/store/gxbr64m2dzrxxckmm9ar8l80rsz9vdk6-ghc-7.10.1.drv’ failed
    /Users/rmassaioli/.nix-profile/bin/nix-shell: failed to build all dependencies
    

    This is for the atlassian-connect-descriptor package: http://hackage.haskell.org/package/atlassian-connect-descriptor

  6. added this to the milestone on Jun 30, 2015
  7. ttuegel commented on Jun 30, 2015

    @ttuegel
    Member

    I think this is a bug in the detailed test suite builder. I'm not sure why the HS prefix is missing; the test suite library is built with the same mechanism as ordinary libraries, so it too should have the prefix.

  8. modified the milestones: Cabal 1.24, on Feb 21, 2016
  9. added 3 commits that reference this issue on Jul 8, 2016
    7f1dedf
    a2b7da6
    f6d24ab
  10. ezyang commented on Aug 16, 2016

    @ezyang
    Contributor

    No longer occurs with GHC 7.10 and later, closing fixed.

  11. modified the milestones: Cabal 2.0, on Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions