ghc-8.6.3 + Mac OSX + FFI dependency causes 'impossible happened' compiler failure
I am trying to build this library: https://github.com/GaloisInc/grift
The build works perfectly on my Mac OS X system under ghc-8.4.4 via the README instructions. However, if I update to ghc-8.6.3, I get the following error:
Building library for bv-sized-float-0.1.0..
[1 of 2] Compiling Data.BitVector.Sized.Float ( src/Data/BitVector/Sized/Float.hs, /Users/benselfridge/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3/bv-sized-float-0.1.0/build/Data/BitVector/Sized/Float.o )
[2 of 2] Compiling Data.BitVector.Sized.Float.App ( src/Data/BitVector/Sized/Float/App.hs, /Users/benselfridge/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3/bv-sized-float-0.1.0/build/Data/BitVector/Sized/Float/App.o )
ghc: loadArchive: Failed reading header from `/Users/benselfridge/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3/softfloat-hs-0.1.0/build/SoftFloat'
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.3 for x86_64-apple-darwin):
loadArchive "/Users/benselfridge/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3/softfloat-hs-0.1.0/build/SoftFloat": failed
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
The library "softfloat-hs" is a Haskell library that calls C functions that are dynamically linked. If I try to run it within this project via "cabal new-repl softfloat-hs", the dependency works fine. It's only when I try to build "bv-sized-float", which depends on softfloat-hs, that I get the above error.
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |