<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:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Times New Roman",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.Code, li.Code, div.Code
{mso-style-name:Code;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:11.35pt;
margin-bottom:.0001pt;
font-size:9.0pt;
font-family:"Courier New";}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.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;}
/* List Definitions */
@list l0
{mso-list-id:184294157;
mso-list-type:hybrid;
mso-list-template-ids:-610890050 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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="purple">
<div class="WordSection1">
<p style="margin-left:36.0pt"><span lang="EN-US">I’m afraid I am not familiar enough with ld to offer a proper fix, but to get you working again:<o:p></o:p></span></p>
<p style="margin-left:36.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p style="margin-left:36.0pt"><span lang="EN-US">In <a href="https://phabricator.haskell.org/D1242#790afd03">
rules/build-package-way.mk</a> on line 154, remove the “$(if $(filter YES,$(LdIsGNULd)),-T $$($1_$2_LD_SCRIPT))” bit.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Yay. That worked! I can build again.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Could you possibly<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol;color:#1F497D;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="color:#1F497D;mso-fareast-language:EN-US">Push that change, so that Windows builds work again.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol;color:#1F497D;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="color:#1F497D;mso-fareast-language:EN-US">Open a ticket for a full fix. Presumably that bit of code was there for a reason, so there’s still an action outstanding.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><br>
Thanks!!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;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"> lonetiger@gmail.com [mailto:lonetiger@gmail.com]
<br>
<b>Sent:</b> 18 November 2015 22:41<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com>; David Macek <david.macek.0@gmail.com>; 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"><o:p> </o:p></span></p>
<p style="margin-left:36.0pt;text-indent:-18.0pt"><span lang="EN-US" style="font-family:Wingdings">Ø</span><span lang="EN-US" style="font-size:7.0pt">
</span><span lang="EN-US">Perhaps it is. Should I blow it away and re-install?<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">I’d hold on that this. I have just tried building myself and also hit it.<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">Taking a closer look, it seems that the .o file being produces isn’t an object file but an image file. It contains the standard image headers and a PE signature.<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">GHC is doing the right thing in error out here. I think this is coming from D1242, there’s a linker script in there driver/utils/merge_sections.ld that’s causing ld on windows to output an image file instead of an object file.<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">I’m afraid I am not familiar enough with ld to offer a proper fix, but to get you working again:<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">In <a href="https://phabricator.haskell.org/D1242#790afd03">
rules/build-package-way.mk</a> on line 154, remove the “$(if $(filter YES,$(LdIsGNULd)),-T $$($1_$2_LD_SCRIPT))” bit.<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">That should get It working again.<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">Regards,<o:p></o:p></span></p>
<p><span lang="EN-US">Tamar<o:p></o:p></span></p>
<p><span lang="EN-US"><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>Simon Peyton Jones<br>
<b>Sent: </b>Wednesday, November 18, 2015 14:39<br>
<b>To: </b>Tamar Christina;David Macek;ghc-devs@haskell.org<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">| Presumably Simon didn't change this. Maybe the msys2 install is broken?<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">Perhaps it is. Should I blow it away and re-install?<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">One other difficulty is that (before my machine change) I tried to follow the instructions on
<a href="https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows">https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows</a> to install 64-bit msys2; but I had a series of problems that Ben G was unable to get to the bottom of. Particularly
I could not run bash from emacs; the emacs shell window never got as far as a prompt. So I backed off. As far as I know that is still broken.<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">I think I have not tried the "32-bit msys2 installer" on that page. Maybe that should be my next step?<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">Regardless, it's hard to see how any of this concerns the error message I was getting. As lonetiger said, it looks very similar to
<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"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">What next?<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">Simon<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">| -----Original Message-----<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| From: Tamar Christina [<a href="mailto:lonetiger@gmail.com">mailto:lonetiger@gmail.com</a>]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| Sent: 18 November 2015 09:14<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| To: David Macek; Simon Peyton Jones; <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">| Subject: RE: Window build broken<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">| Hmm,<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">| Presumably Simon didn't change this. Maybe the msys2 install is broken?<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">| TamarFrom: David Macek<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| Sent: 18/11/2015 09:35<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| To: Simon Peyton Jones; <a href="mailto:lonetiger@gmail.com">
lonetiger@gmail.com</a>; <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">| Subject: Re: Window build broken<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| On 18. 11. 2015 9:29, Simon Peyton Jones wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| > It’s msys2. I don’t have Cygwin on this machine. I have no idea where<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| that prompt comes from, but I agree it’s suspicious.<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">| Looks like your /etc/fstab is wrong. There should be a line like this one,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| that removes the `cygdrive` prefix from Windows drive/letter<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">| mounts:<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">| none / cygdrive binary,posix=0,noacl,user 0 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">| David Macek<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>