<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Times New Roman",serif;}
p.Code, li.Code, div.Code
{mso-style-name:Code;
mso-style-link:"Code Char";
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:10.0pt;
font-family:"Courier New";}
p.CodeCxSpFirst, li.CodeCxSpFirst, div.CodeCxSpFirst
{mso-style-name:CodeCxSpFirst;
mso-style-link:"Code Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:10.0pt;
font-family:"Courier New";}
p.CodeCxSpMiddle, li.CodeCxSpMiddle, div.CodeCxSpMiddle
{mso-style-name:CodeCxSpMiddle;
mso-style-link:"Code Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:10.0pt;
font-family:"Courier New";}
p.CodeCxSpLast, li.CodeCxSpLast, div.CodeCxSpLast
{mso-style-name:CodeCxSpLast;
mso-style-link:"Code Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:10.0pt;
font-family:"Courier New";}
span.CodeChar
{mso-style-name:"Code Char";
mso-style-link:Code;
font-family:"Courier New";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;mso-fareast-language:EN-US">I’m happy to do experiments to help narrow it down, but I haven’t the foggiest idea where to start, and am utterly stalled on GHC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-fareast-language:EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-fareast-language:EN-US"><br>
Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> ghc-devs [mailto:ghc-devs-bounces@haskell.org]
<b>On Behalf Of </b>lonetiger@gmail.com<br>
<b>Sent:</b> 17 November 2015 23:51<br>
<b>To:</b> Ryan Scott; ghc-devs@haskell.org<br>
<b>Subject:</b> RE: Window build broken<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Well the error is correct, it’s just checking against the machine type in the PE spec:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;border-collapse:collapse">
<tbody>
<tr>
<td width="39%" valign="top" style="width:39.08%;border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span style="font-size:10.0pt">IMAGE_FILE_MACHINE_AMD64<o:p></o:p></span></p>
</td>
<td width="10%" valign="top" style="width:10.6%;border:solid windowtext 1.0pt;border-left:none;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span style="font-size:10.0pt">0x8664<o:p></o:p></span></p>
</td>
<td width="50%" valign="top" style="width:50.32%;border:solid windowtext 1.0pt;border-left:none;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span style="font-size:10.0pt">x64<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So somewhere along the line an invalid PE file was generated (or for the wrong architecture).<o:p></o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"><br>
<b>From: </b>Ryan Scott<br>
<b>Sent: </b>Wednesday, November 18, 2015 00:44<br>
<b>To: </b><a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<b>Subject: </b>Re: Window build broken<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Wow, I happened to try building GHC on Windows for the first time ever<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">today, and I also experienced this error :)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Interestingly, someone reported a very similar error to this on Trac,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">but for GHC 7.8.3 [1]. Here's where the error message comes from [2]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">in Linker.c:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> static int verifyCOFFHeader<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> (COFF_header *hdr, pathchar *fileName)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> if (hdr->Machine != 0x8664) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> errorBelch("%" PATH_FMT ": Not x86_64 PEi386", fileName);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> return 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> ...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Ryan S.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-----<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[1] <a href="https://ghc.haskell.org/trac/ghc/ticket/10437">
https://ghc.haskell.org/trac/ghc/ticket/10437</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[2] <a href="https://github.com/ghc/ghc/blob/233d1312bf15940fca5feca6884f965e7944b555/rts/Linker.c#L3355">
https://github.com/ghc/ghc/blob/233d1312bf15940fca5feca6884f965e7944b555/rts/Linker.c#L3355</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">_______________________________________________<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ghc-devs mailing list<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>