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

> On Mon, 09 Jun 2014 21:45:27 +0200
> Joachim Breitner <m...@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 <i...@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
From 1b2d13b5d14917c39c88bd237531d5cb96944910 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <sly...@gentoo.org>
Date: Tue, 10 Jun 2014 01:05:10 +0300
Subject: [PATCH] Data/Coerce.hs: add GHC.Integer as a depend to coerce
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Same as commit aba043a0a142ef0ee66ed0e6cbfe2a39c65d8792 for
Unsafe.Coerce.

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]

Signed-off-by: Sergei Trofimovich <sly...@gentoo.org>
---
 libraries/base/Data/Coerce.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libraries/base/Data/Coerce.hs b/libraries/base/Data/Coerce.hs
index 9199835..01a1b85 100644
--- a/libraries/base/Data/Coerce.hs
+++ b/libraries/base/Data/Coerce.hs
@@ -23,5 +23,6 @@ module Data.Coerce
         ( -- * Safe coercions
           coerce, Coercible,
         ) where
+import GHC.Integer () -- for build ordering
 import GHC.Prim (coerce)
 import GHC.Types (Coercible)
-- 
2.0.0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to