Help with build ordering issue

Sylvain Henry sylvain at
Tue Feb 20 16:23:51 UTC 2018

On 20/02/2018 03:25, Ben Gamari wrote:
> Sylvain Henry <sylvain at> writes:
>> Hi,
>> @Bodigrim is working on a patch (
>> to fix #14170.
>> The build fails because of interface file errors: "bad interface file"
>> for GHC.Natural and "failed to load interface" for GHC.Types.
>> I suspect it is a wired-in module build ordering issue but I haven't
>> been able to help fixing it. If anyone with more insights could help it
>> would be much appreciated!
> Can you paste the full error? What module is failing to compile? Which
> definition is it loading the interface for?
> Cheers,
> - Ben

"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -O0 -H64m -Wall      -this-unit-id base- -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -Ilibraries/base/dist-install/build -ilibraries/base/dist-install/build/./autogen -Ilibraries/base/dist-install/build/./autogen -Ilibraries/base/include   -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include -optPlibraries/base/dist-install/build/./autogen/cabal_macros.h -package-id rts -package-id ghc-prim- -package-id integer-gmp- -this-unit-id base -XHaskell2010 -O  -no-user-package-db -rtsopts  -Wno-trustworthy-safe -Wno-deprecated-flags     -Wnoncanonical-monad-instances  -odir libraries/base/dist-install/build -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-install/build   -dynamic-too -c libraries/base/./GHC/Natural.hs -o libraries/base/dist-install/build/GHC/Natural.o -dyno libraries/base/dist-install/build/GHC/Natural.dyn_o

<interactive>:1:1: error:
     Bad interface file: libraries/base/dist-install/build/GHC/Natural.hi
         libraries/base/dist-install/build/GHC/Natural.hi: openBinaryFile: does not exist (No such file or directory)

It fails in the CoreTidy pass.

I also got this one (only after a make clean IIRC):

libraries/base/GHC/Exception/Type.hs-boot:1:1: error:
     Failed to load interface for ‘GHC.Types’
     There are files missing in the ‘ghc-prim-’ package,
     try running 'ghc-pkg check'.
     Use -v to see a list of the files searched for.

@hvr suggests it could could related to hs-boot files dependencies.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list