Try `make clean` in the libraries directory and then building again. I usually need to run `make` twice in a row to build after cleaning the libraries.

On Nov 3, 2014, at 11:48 AM, Simon Peyton Jones <simonpj@microsoft.com> wrote:

Usually this is to do with stale .hi files
 
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Gintautas Miliauskas
Sent: 03 November 2014 16:31
To: ghc-devs@haskell.org
Subject: ghc panic during build
 

Just got this during a build:

 

"inplace/bin/ghc-stage1.exe" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Werror -Wall -H64m -O0    -this-package-key base_ESD4aQEEWwsHtYJVc1BwtJ -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -ilibraries/base/dist-install/build/autogen -Ilibraries/base/dist-install/build -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-key ghcpr_BE58KUgBe9ELCsPXiJ1Q2r -package-key integ_BcPVjqcazPNGsNFG4agFty -package-key rts -this-package-key base -XHaskell2010 -O2 -O -dcore-lint -fno-warn-deprecated-flags -fno-warn-tabs  -no-user-package-db -rtsopts      -odir libraries/base/dist-install/build -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-install/build   -c libraries/base/./GHC/TypeLits.hs -o libraries/base/dist-install/build/GHC/TypeLits.o

ghc-stage1.exe: panic! (the 'impossible' happened)

  (GHC version 7.9.20141031 for x86_64-unknown-mingw32):

        Ix{Int}.index: Index (2053) out of range ((0,10))

 

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 

libraries/base/ghc.mk:4: recipe for target 'libraries/base/dist-install/build/GHC/TypeLits.o' failed

 

I may have been building in a non-clean repository after a git pull though, could that have caused this?

 

--

Gintautas Miliauskas

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