Failed to load interface for GHC.Integer.Type

Sergei Trofimovich slyich at gmail.com
Mon Jun 9 22:08:29 UTC 2014


On Mon, 9 Jun 2014 23:56:37 +0300
Sergei Trofimovich <slyich at gmail.com> wrote:

> On Mon, 09 Jun 2014 21:45:27 +0200
> Joachim Breitner <mail at joachim-breitner.de> wrote:
> 
> > Hi,
> > 
> > since
> > http://git.haskell.org/ghc.git/commitdiff/1946922c61df427e59f8a00572fd4dd6501abd98 travis is complaining:
> > 
> > 
> >   HC [stage 1] libraries/base/dist-install/build/GHC/Unicode.o-boot
> >   HC [stage 1] libraries/base/dist-install/build/Data/Coerce.o
> >   HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Debug.o
> > 
> > Top level:
> >     Failed to load interface for ‘GHC.Integer.Type’
> >     There are files missing in the ‘integer-gmp’ package,
> >     try running 'ghc-pkg check'.
> >     Use -v to see a list of the files searched for.
> > make[1]: *** [libraries/base/dist-install/build/Data/Coerce.o] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> > make: *** [all] Error 2
> > 
> > Does anyone have an idea what may be causing this?
> 
> A bit more context here is haddock started too early:
> 
> Writing utils/haddock/doc/haddock/invoking.html for chapter(invoking)
> cp libffi/build/inst/lib/libffi.a rts/dist/build/libCffi.a
>   HC [stage 1] libraries/base/dist-install/build/GHC/IO.o-boot
>   HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Classes.o
> Writing utils/haddock/doc/haddock/ch03s02.html for section
> Writing utils/haddock/doc/haddock/ch03s03.html for section
>   HC [stage 1] libraries/integer-gmp/dist-install/build/GHC/Integer/GMP/Prim.o
> Writing utils/haddock/doc/haddock/ch03s04.html for section
> Writing utils/haddock/doc/haddock/ch03s05.html for section
> Writing utils/haddock/doc/haddock/hyperlinking.html for section(hyperlinking)
> Writing utils/haddock/doc/haddock/module-attributes.html for section(module-attributes)
>   HC [stage 1] libraries/base/dist-install/build/GHC/Exception.o-boot
>   HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/CString.o
> Writing utils/haddock/doc/haddock/ch03s08.html for section
> Writing utils/haddock/doc/haddock/markup.html for chapter(markup)
>   HC [stage 1] libraries/base/dist-install/build/GHC/Unicode.o-boot
>   HC [stage 1] libraries/base/dist-install/build/Data/Coerce.o
> 
> Top level:
>     Failed to load interface for ‘GHC.Integer.Type’
>     There are files missing in the ‘integer-gmp’ package,
>     try running 'ghc-pkg check'.
>     Use -v to see a list of the files searched for.
> make[1]: *** [libraries/base/dist-install/build/Data/Coerce.o] ...
> 
> I guess real fault is:
> http://ghc.haskell.org/trac/ghc/changeset/f31b042c25b9c51efdbe84c1cb6f65f49534c14d/ghc

Or not. Looks like it's easy to reproduce as:

$ make libraries/base/dist-install/build/Data/Coerce.o V=1

What is more interesting:
ghc/libraries/base/Unsafe/Coerce.hs:
> import GHC.Integer () -- for build ordering

Attached patch fixes the error, but I have no idea why.
Maybe, NoImplicitPrelude is not enough and some types leak
in here?

Maybe Ian (CCed) remembers the story.
> commit aba043a0a142ef0ee66ed0e6cbfe2a39c65d8792
> Author: Ian Lynagh <ian at well-typed.com>
> Date:   Sun May 19 16:35:40 2013 +0100
> 
>     Fix build order when building with integer-simple
> 
>     The problem hasn't shown up with integer-gmp, but I can't see
>     why it couldn't happen in that case too.

-- 

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Data-Coerce.hs-add-GHC.Integer-as-a-depend-to-coerce.patch
Type: text/x-patch
Size: 1202 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140610/b7aacc97/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140610/b7aacc97/attachment-0001.sig>


More information about the ghc-devs mailing list