
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? I should say that my laptop broke so this is a new Windows machine, presumably with a slightly different config… Simon ./inplace/bin/ghc-stage2 --interactive GHCi, version 7.11.20151117: http://www.haskell.org/ghc/ :? for help ghc-stage2.exe: panic! (the 'impossible' happened) (GHC version 7.11.20151117 for x86_64-unknown-mingw32): loadObj "C:\\code\\HEAD-1\\libraries\\ghc-prim\\dist-install\\build\\HSghc-prim-0.5.0.0.o": failed Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug ghc-stage2.exe: C:\code\HEAD-1\libraries\ghc-prim\dist-install\build\HSghc-prim-0.5.0.0.o: Not x86_64 PEi386 /cygdrive/c/code/HEAD-1$

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

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

Hi Simon,
I’m wondering what environment you’re coming in, is it msys2? The prompt you showed earlier
/cygdrive/c/code/HEAD-1$
Looks like cygwin.
Tamar
From: Simon Peyton Jones
Sent: Wednesday, November 18, 2015 00:25
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

It’s msys2. I don’t have Cygwin on this machine. I have no idea where that prompt comes from, but I agree it’s suspicious.
Simon
From: lonetiger@gmail.com [mailto:lonetiger@gmail.com]
Sent: 17 November 2015 23:44
To: Simon Peyton Jones; David Macek; ghc-devs@haskell.org
Subject: RE: Window build broken
Hi Simon,
I’m wondering what environment you’re coming in, is it msys2? The prompt you showed earlier
/cygdrive/c/code/HEAD-1$
Looks like cygwin.
Tamar
From: Simon Peyton Jones
Sent: Wednesday, November 18, 2015 00:25
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

On 18. 11. 2015 9:29, Simon Peyton Jones wrote:
It’s msys2. I don’t have Cygwin on this machine. I have no idea where that prompt comes from, but I agree it’s suspicious.
Looks like your /etc/fstab is wrong. There should be a line like this one, that removes the `cygdrive` prefix from Windows drive/letter mounts: none / cygdrive binary,posix=0,noacl,user 0 0 -- David Macek

I'm getting similar error on my 32-bit Windows 10:
GHCi, version 7.11.20151114: http://www.haskell.org/ghc/ :? for help
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
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
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

Simon Peyton Jones
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?
I should say that my laptop broke so this is a new Windows machine, presumably with a slightly different config…
Hmm, very interesting. I hope this isn't the result of acce37f38bc3, which directly touched the Windows linker. Do you have this commit by any chance? I'll try to reproduce tomorrow. Cheers, - Ben

I have two builds failing in the same way. One is a branch that is not fully up to date, and doesn’t have acce37f38bc3. So it seems independent of whether that's there or not
Simon
| -----Original Message-----
| From: Ben Gamari [mailto:ben@well-typed.com]
| Sent: 17 November 2015 23:03
| To: Simon Peyton Jones
participants (5)
-
Ben Gamari
-
David Macek
-
lonetiger@gmail.com
-
Matej Borovec
-
Simon Peyton Jones