<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=iso-8859-1">
<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:"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";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
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";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@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:2015109023;
        mso-list-type:hybrid;
        mso-list-template-ids:1667823564 134807567 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:\F0A7;
        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:\F0B7;
        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:\F0A7;
        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:\F0B7;
        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:\F0A7;
        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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I&#8217;ve got a new Windows laptop, and have being having a torrid time getting GHC to build on it.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>Build falls over with <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">checking for gcc... c:/code/HEAD/inplace/mingw/bin/gcc.exe<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">checking whether the C compiler works... no<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: error: in `/c/code/HEAD':<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: error: C compiler cannot create executables<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">Turns out that an earlier error was<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: Making in-tree mingw tree<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">tar (child): ../../ghc-tarballs/mingw/binutils*.tar.lzma: Cannot open: No such file or directory<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">tar (child): Error is not recoverable: exiting now<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">tar: Child returned status 2<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;;color:red">tar: Error is not recoverable: exiting now<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">./configure: line 4050: inplace/mingw/bin/realgcc.exe: No such file or directory<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: In-tree mingw tree created<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: Making in-tree perl tree<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">BUT this error was not fatal, so the build went on (notwithstanding the red message above), leading to a MUCH more obscure error later.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>Why wasn&#8217;t ghc-tarballs there?&nbsp; Oh, apparently you have to say
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">sync-all
<span style="color:red">&#8211;windows </span>get<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">That&#8217;s really hard for a naïve user to work out.&nbsp; Can&#8217;t we either always get it, or work out that we are on windows?<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>I carefully installed mingw/msys as described on <a href="http://www.mingw.org/wiki/Getting_Started">
http://www.mingw.org/wiki/Getting_Started</a><br>
I used mingw-set-inst, which launches a GUI for a package installer.&nbsp; All seems well.&nbsp; I update my path.&nbsp; But then<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">Can't locate Autom4te/ChannelDefs.pm in @INC (@INC contains: /mingw/share/autoco<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">nf /usr/lib/perl5/5.8/msys /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/msys<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">perl/5.8/msys /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) a<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">t /c/Programme/MinGW/bin/autoreconf-2.68 line 40.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">BEGIN failed--compilation aborted at /c/Programme/MinGW/bin/autoreconf-2.68 line<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-GB">&nbsp; 40.<o:p></o:p></span></p>
<p class="MsoListParagraph">After a long struggle I found that I had missed a crucial thing.&nbsp; With the new autoconf tools,
<b>it&#8217;s essential that c:/mingw be mounted as /mingw</b>, because /mingw is hard-coded into autoconf perl scripts.&nbsp;
<a href="http://www.mingw.org/wiki/Getting_Started">http://www.mingw.org/wiki/Getting_Started</a> does say (deep in the middle) to edit c:/mingw/msys/1.0/etc/fstab with a text editor, but that appeared to have no effect for me.&nbsp; Saying &#8220;<span style="font-family:&quot;Courier New&quot;">mount
 c:/mingw /mingw</span>&#8221; did work.&nbsp; I have no idea why. <o:p></o:p></p>
<p class="MsoListParagraph"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph">What is horrible is how uninformative the error message is.<o:p></o:p></p>
<p class="MsoListParagraph"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph">I guess we should update the Windows build instructions.<o:p></o:p></p>
<p class="MsoListParagraph"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph" style="margin-left:0cm">I still don&#8217;t know if I&#8217;ve bottomed out here because I can&#8217;t find Happy/Alex in the Haskell platform. Sigh.<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:0cm">Simon<o:p></o:p></p>
</div>
</body>
</html>