You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"ghc: panic! (the 'impossible' happened)" using "--enable-executable-dynamic" #2039
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.
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.
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
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?
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
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.
Activity
coreyoconnor commentedon Aug 16, 2014
Changing the test suite name to
verifyFooalso fails. Changing the name toVerifyFooresults in a different failure:dist/build/VerifyFoo.o: file not recognized: File truncatedcoreyoconnor commentedon Aug 16, 2014
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 attributeopstestsuite23Skidoo commentedon Aug 17, 2014
GHC panics are bugs in GHC. Please report this at the GHC bug tracker.
rwbarton commentedon Jan 22, 2015
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 withhs-libraries: bar. Normally these libraries have names likelibHSbar-ghc7.8.3.soand this is what is causing the panic. Does anyone understand whether theHSprefix is really necessary?robertmassaioli commentedon Jun 30, 2015
Does anybody have a workaround for this? It's affecting my nix installations:
This is for the atlassian-connect-descriptor package: http://hackage.haskell.org/package/atlassian-connect-descriptor
ttuegel commentedon Jun 30, 2015
I think this is a bug in the detailed test suite builder. I'm not sure why the
HSprefix is missing; the test suite library is built with the same mechanism as ordinary libraries, so it too should have the prefix.Add test build directory to LD_LIBRARY_PATH when running tests with -…
Add test build directory to LD_LIBRARY_PATH when -executable-dynamic
Add test build directory to LD_LIBRARY_PATH when -executable-dynamic
ezyang commentedon Aug 16, 2016
No longer occurs with GHC 7.10 and later, closing fixed.