Graphite causes error due to empty interfaces

Viewed 44

The problem I have is that I add the graphite dependency to a fresh project and it fails to build. Why does this happen and what can be done to rectify it?

To reproduce

  1. Run stack new project.
  2. Run cd project.
  3. Run stack build (works as expected).
  4. Edit package.yaml and add graphite as a dependency.
dependencies:
- base >= 4.7 && < 5
- graphite # add this line
  1. Run stack build (does not work).
QuickCheck> configure
QuickCheck> Configuring QuickCheck-2.14.2...
QuickCheck> build
graphviz  > configure
QuickCheck> Preprocessing library for QuickCheck-2.14.2..
QuickCheck> Building library for QuickCheck-2.14.2..
QuickCheck> [ 1 of 16] Compiling Test.QuickCheck.Exception
graphviz  > Configuring graphviz-2999.20.1.0...
QuickCheck> [ 2 of 16] Compiling Test.QuickCheck.Random
QuickCheck> 
QuickCheck> /tmp/stack-05e37a900bbf6a92/QuickCheck-2.14.2/src/Test/QuickCheck/Random.hs:9:1: error:
QuickCheck>     Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/random-1.2.0-GAV679NMk7iDELNoxF99p4/System/Random.hi
QuickCheck>         Data.Binary.getPrim: end of file
QuickCheck>   |
QuickCheck> 9 | import System.Random
QuickCheck>   | ^^^^^^^^^^^^^^^^^^^^
QuickCheck> 
graphviz  > build                         
scientific> configure                     
graphviz  > Preprocessing library for graphviz-2999.20.1.0..
graphviz  > Building library for graphviz-2999.20.1.0..
graphviz  > [ 1 of 31] Compiling Data.GraphViz.Attributes.ColorScheme
scientific> Configuring scientific-0.3.7.0...
scientific> build                         
vector    > configure                     
scientific> Preprocessing library for scientific-0.3.7.0..
scientific> Building library for scientific-0.3.7.0..
scientific> [1 of 5] Compiling GHC.Integer.Compat
scientific> [2 of 5] Compiling Utils      
scientific>                               
scientific> /tmp/stack-05e37a900bbf6a92/scientific-0.3.7.0/src/Utils.hs:17:1: error:
scientific>     Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA/Data/Primitive/Array.hi
scientific>         Data.Binary.getPrim: end of file
scientific>    |                          
scientific> 17 | import qualified Data.Primitive.Array as Primitive
scientific>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
scientific>                               
vector    > Configuring vector-0.12.3.1...
vector    > build             
vector    > Preprocessing library for vector-0.12.3.1..
vector    > Building library for vector-0.12.3.1..
graphviz  > [ 2 of 31] Compiling Data.GraphViz.Exception
graphviz  > [ 3 of 31] Compiling Data.GraphViz.Internal.State
graphviz  >                   
graphviz  > /tmp/stack-05e37a900bbf6a92/graphviz-2999.20.1.0/Data/GraphViz/Internal/State.hs:33:1: error:
graphviz  >     Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/polyparse-1.13-CS3hwJapEwUHObxSp4JF8T/Text/ParserCombinators/Poly/StateText.hi
graphviz  >         Data.Binary.getPrim: end of file
graphviz  >    |              
graphviz  > 33 | import Text.ParserCombinators.Poly.StateText (Parser, stQuery, stUpdate)
graphviz  >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
graphviz  >                   
vector    > [ 1 of 21] Compiling Data.Vector.Fusion.Util
vector    > [ 2 of 21] Compiling Data.Vector.Fusion.Bundle.Size
vector    > [ 3 of 21] Compiling Data.Vector.Generic.Mutable.Base
vector    >         
vector    > /tmp/stack-05e37a900bbf6a92/vector-0.12.3.1/Data/Vector/Generic/Mutable/Base.hs:18:1: error:
vector    >     Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA/Control/Monad/Primitive.hi
vector    >         Data.Binary.getPrim: end of file
vector    >    |    
vector    > 18 | import Control.Monad.Primitive ( PrimMonad, PrimState )
vector    >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vector    >         
Progress 4/8        

--  While building package vector-0.12.3.1 (scroll up to its section to see the error) using:
      /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1


--  While building package graphviz-2999.20.1.0 (scroll up to its section to see the error) using:
      /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1


--  While building package scientific-0.3.7.0 (scroll up to its section to see the error) using:
      /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1


--  While building package QuickCheck-2.14.2 (scroll up to its section to see the error) using:
      /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

Check this out:

QuickCheck> /tmp/stack-05e37a900bbf6a92/QuickCheck-2.14.2/src/Test/QuickCheck/Random.hs:9:1: error:
QuickCheck>     Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7 /lib/x86_64-linux-ghc-8.10.7/random-1.2.0-GAV679NMk7iDELNoxF99p4/System/Random.hi
QuickCheck>         Data.Binary.getPrim: end of file

I navigate to /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/random-1.2.0-GAV679NMk7iDELNoxF99p4/System/Random.hi and the file is empty. I don't believe it should be empty.

graphite is available in the resolver from what I understand.

0 Answers
Related