I'm getting similar error on my 32-bit Windows 10:
 
ghc.exe: 
C:\ghc-8.0_git\usr\local\lib\ghc-prim-0.5.0.0\HSghc-prim-0.5.0.0.o: Not x86 
PEi386
ghc.exe: panic! (the 'impossible' happened)
(GHC version 7.11.20151114 for i386-unknown-mingw32):
      loadObj 
"C:\\ghc-8.0_git\\usr\\local\\lib\\ghc-prim-0.5.0.0\\HSghc-prim-0.5.0.0.o": 
failed
 
 
And running `file lib\ghc-prim-0.5.0.0\HSghc-prim-0.5.0.0.o` I get:
 
lib\ghc-prim-0.5.0.0\HSghc-prim-0.5.0.0.o: PE Unknown PE signature 
0x342f Intel 80386 (stripped to external PDB), for MS Windows
 
 
-----Original Message----- 
From: Simon Peyton Jones 
Sent: Wednesday, November 18, 2015 12:25 AM 
To: David Macek ; ghc-devs@haskell.org 
Subject: RE: Window build broken 
 
It says this:
 
bash$ file libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.0.0.o 
libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.0.0.o: PE Unknown PE 
signature 0x742e x86-64 (stripped to external PDB), for MS Windows
 
| -----Original Message-----
| From: David Macek [mailto:david.macek.0@gmail.com]
| Sent: 17 November 2015 22:45
| To: Simon Peyton Jones <simonpj@microsoft.com>; 
ghc-devs@haskell.org
| Subject: Re: Window build broken
| 
| On 17. 11. 2015 23:31, Simon Peyton Jones wrote:
| > Sigh.  My Windows build is broken.  See below.  Any 
ideas?  The stage2
| complier in non-interactive mode works ok. It’s just ghci fails.  
What does
| “Not x86_64 PEi386” mean?  What can I do to fix?
| 
| Maybe it's obvious and you already checked, but could it be that the 
object
| file is for a different architecture? What does `file` say about 
it?
| 
| --
| David Macek
 
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs