Failed to load interface for GHC.Integer.Type

Hi, since http://git.haskell.org/ghc.git/commitdiff/1946922c61df427e59f8a00572fd4dd650... 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? Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org

On Mon, 09 Jun 2014 21:45:27 +0200
Joachim Breitner
Hi,
since http://git.haskell.org/ghc.git/commitdiff/1946922c61df427e59f8a00572fd4dd650... 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/f31b042c25b9c51efdbe84c1cb6f65f495... -- Sergei

Hi, Am Montag, den 09.06.2014, 23:56 +0300 schrieb Sergei Trofimovich:
I guess real fault is: http://ghc.haskell.org/trac/ghc/changeset/f31b042c25b9c51efdbe84c1cb6f65f495...
I don’t think so, reverting my patch fixed it again. Given that I as able to build with the patch from an unclean tree, I conclude that there is a build ordering problem, i.e. something else (in integer-gmp?) needs to build before Data.Coerce. But that is just an guess. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org

On Mon, 9 Jun 2014 23:56:37 +0300
Sergei Trofimovich
On Mon, 09 Jun 2014 21:45:27 +0200 Joachim Breitner
wrote: Hi,
since http://git.haskell.org/ghc.git/commitdiff/1946922c61df427e59f8a00572fd4dd650... 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/f31b042c25b9c51efdbe84c1cb6f65f495...
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
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

I'm guessing that it may be the fact that the type-class defaulting rules involve Integer. You added NoImplicitPrelude, which removed a dependency on Prelude. Maybe defaulting is looking for the type Integer, but the build system doesn't see any dependency on the module that declares the Integer data type. Try adding default () Or alternatively (and perhaps easier) import GHC.Base (), which in turn depends on GHC.Integer. To be honest Data.Coerce is so trivial that I don't know why it needs Integer, but I bet that fixes it Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Joachim | Breitner | Sent: 09 June 2014 20:45 | To: ghc-devs@haskell.org | Subject: Failed to load interface for GHC.Integer.Type | | Hi, | | since | http://git.haskell.org/ghc.git/commitdiff/1946922c61df427e59f8a00572fd4dd | 6501abd98 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? | | Greetings, | Joachim | | -- | Joachim “nomeata” Breitner | mail@joachim-breitner.de • http://www.joachim-breitner.de/ | Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F | Debian Developer: nomeata@debian.org

Ah. The reason that Data.Coerce looks for the interface for GHC.Integer.Type is because TidyPgm expands integer literals using 'mkInteger' from that module, and TidyPgm always does the lookup regardless just in case. There's a hack to switch this off for packages ghc-prim and integer-gmp/simple, but every other compilation will read that interface. That's why anyway Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Simon | Peyton Jones | Sent: 09 June 2014 23:16 | To: Joachim Breitner; ghc-devs@haskell.org | Subject: RE: Failed to load interface for GHC.Integer.Type | | I'm guessing that it may be the fact that the type-class defaulting rules | involve Integer. You added NoImplicitPrelude, which removed a dependency | on Prelude. Maybe defaulting is looking for the type Integer, but the | build system doesn't see any dependency on the module that declares the | Integer data type. | | Try adding | default () | | Or alternatively (and perhaps easier) import GHC.Base (), which in turn | depends on GHC.Integer. | | To be honest Data.Coerce is so trivial that I don't know why it needs | Integer, but I bet that fixes it | | Simon | | | -----Original Message----- | | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of | Joachim | | Breitner | | Sent: 09 June 2014 20:45 | | To: ghc-devs@haskell.org | | Subject: Failed to load interface for GHC.Integer.Type | | | | Hi, | | | | since | | | http://git.haskell.org/ghc.git/commitdiff/1946922c61df427e59f8a00572fd4dd | | 6501abd98 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? | | | | Greetings, | | Joachim | | | | -- | | Joachim “nomeata” Breitner | | mail@joachim-breitner.de • http://www.joachim-breitner.de/ | | Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F | | Debian Developer: nomeata@debian.org | | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs

Hi, Am Montag, den 09.06.2014, 22:16 +0000 schrieb Simon Peyton Jones:
I'm guessing that it may be the fact that the type-class defaulting rules involve Integer. You added NoImplicitPrelude, which removed a dependency on Prelude. Maybe defaulting is looking for the type Integer, but the build system doesn't see any dependency on the module that declares the Integer data type.
Try adding default ()
that didn’t help (for me).
Or alternatively (and perhaps easier) import GHC.Base (), which in turn depends on GHC.Integer.
That seems to work. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org
participants (3)
-
Joachim Breitner
-
Sergei Trofimovich
-
Simon Peyton Jones