snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 39 forks source link

Linux build failed: Failed to load interface for 'HsInstances' #576

Closed izgzhen closed 6 years ago

izgzhen commented 6 years ago
| Run Ar Pack Stage0: _build/stage0/compiler/build/c/parser/cutils.o (and 473 more) => _build/stage0/compiler/build/libHSghc-8.5.a
/usr/bin/ar: creating _build/stage0/compiler/build/libHSghc-8.5.a
/------------------------------------------------------\
| Successfully built library 'ghc' (Stage0, way v).    |
| Library: _build/stage0/compiler/build/libHSghc-8.5.a |
| Library synopsis: The GHC API.                       |
\------------------------------------------------------/
| Run Cc FindCDependencies Stage0: ghc/hschooks.c => _build/stage0/ghc/build/c/hschooks.o.d
| Run Ghc CompileCWithGhc Stage0: ghc/hschooks.c => _build/stage0/ghc/build/c/hschooks.o
| Run Ghc FindHsDependencies Stage0: ghc/Main.hs => _build/stage0/ghc/.dependencies.mk
| Remove file _build/stage0/ghc/.dependencies.mk.bak
| Run Ghc CompileHs Stage0: ghc/Main.hs => _build/stage0/ghc/build/Main.o
Failed to load interface for ‘HsInstances’
There are files missing in the ‘ghc-8.5’ package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
shakeArgsWith    0.000s    0%                           
Function shake   8.300s    1%                           
Database read    0.001s    0%                           
With database    0.000s    0%                           
Running rules  446.235s   98%  =========================
Total          454.536s  100%                           
Error when running Shake build system:
* _build/stage1/bin/unlit
* OracleQ (PackageDataFile (Context {stage = Stage1, package = Package {pkgLanguage = Haskell, pkgType = Program, pkgName = "unlit", pkgPath = "utils/unlit"}, way = v}))
* _build/stage1/utils/unlit/setup-config
* _build/stage0/bin/ghc
* _build/stage0/ghc/build/Main.o
* _build/stage0/ghc/build/Main.o _build/stage0/ghc/build/Main.hi
user error (Development.Shake.cmd, system command failed
Command: /usr/local/bin/ghc -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-db _build/stage0/lib/package.conf.d' '-package-id array-0.5.2.0' '-package-id base-4.10.1.0' '-package-id bytestring-0.10.8.2' '-package-id directory-1.3.0.2' '-package-id filepath-1.4.1.2' '-package-id ghc-8.5' '-package-id ghc-boot-8.5' '-package-id process-1.6.1.0' '-package-id unix-2.7.2.2' -i -i_build/stage0/ghc/build -i_build/stage0/ghc/build/ghc/autogen -ighc/. -Iincludes -I_build/generated -I_build/stage0/ghc/build -I/home/zhen/repos/ghc/_build/stage0/lib/x86_64-linux-ghc-8.2.2/ghc-8.5/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/process-1.6.1.0/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/directory-1.3.0.2/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/unix-2.7.2.2/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/time-1.8.0.2/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/bytestring-0.10.8.2/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/base-4.10.1.0/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/integer-gmp-1.0.1.0/include -I/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/include -I_build/generated -optc-I_build/generated -optP-include -optP_build/stage0/ghc/build/ghc/autogen/cabal_macros.h -optc-fno-stack-protector -odir _build/stage0/ghc/build -hidir _build/stage0/ghc/build -stubdir _build/stage0/ghc/build -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -c ghc/Main.hs -o _build/stage0/ghc/build/Main.o -O0 -H64m -Wall -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wnoncanonical-monoid-instances -XHaskell2010 -O -I_build/stage0/compiler/build
Exit code: 1
Stderr:
Failed to load interface for ‘HsInstances’
There are files missing in the ‘ghc-8.5’ package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
)
snowleopard commented 6 years ago

@izgzhen Is this from a clean build? Linux bots on Travis seem to be happy.

alpmestan commented 6 years ago

I'm also developping Hadrian from Linux and I have not seen this error.

snowleopard commented 6 years ago

Note that according to a recent AppVeyor build, HsInstances takes the longest time to build. Could GHC somehow fail to build it? Can you try to simply rerun Hadrian?

izgzhen commented 6 years ago

sorry, I redo everything and it looks like a false positive