<div dir="ltr">Hi!<div><br></div><div>The check for Windows in sync-all is failing (line 790). On a mingw/msys system $OSNAME contains &#39;msys&#39; and not MSWin32 or Cygwin that it is checking for. </div><div><br></div>
<div>Niklas</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/23 Simon Peyton-Jones <span dir="ltr">&lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">I’ve got a new Windows laptop, and have being having a torrid time getting GHC to build on it.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p><u></u><span>1.<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span><u></u>Build falls over with <u></u><u></u></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<u></u><u></u></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<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: error: in `/c/code/HEAD&#39;:<u></u><u></u></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<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">Turns out that an earlier error was<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: Making in-tree mingw tree<u></u><u></u></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<u></u><u></u></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<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">tar: Child returned status 2<u></u><u></u></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<u></u><u></u></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<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: In-tree mingw tree created<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">configure: Making in-tree perl tree<u></u><u></u></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.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
<p><u></u><span>2.<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span><u></u>Why wasn’t ghc-tarballs there?  Oh, apparently you have to say
<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-family:&quot;Courier New&quot;">sync-all
<span style="color:red">–windows </span>get<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">That’s really hard for a naïve user to work out.  Can’t we either always get it, or work out that we are on windows?<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
<p><u></u><span>3.<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span><u></u>I carefully installed mingw/msys as described on <a href="http://www.mingw.org/wiki/Getting_Started" target="_blank">
http://www.mingw.org/wiki/Getting_Started</a><br>
I used mingw-set-inst, which launches a GUI for a package installer.  All seems well.  I update my path.  But then<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">Can&#39;t locate Autom4te/ChannelDefs.pm in @INC (@INC contains: /mingw/share/autoco<u></u><u></u></span></p>

<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">nf /usr/lib/perl5/5.8/msys /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/msys<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_<u></u><u></u></span></p>

<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">perl/5.8/msys /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) a<u></u><u></u></span></p>

<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">t /c/Programme/MinGW/bin/autoreconf-2.68 line 40.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">BEGIN failed--compilation aborted at /c/Programme/MinGW/bin/autoreconf-2.68 line<u></u><u></u></span></p>

<p class="MsoNormal" style="margin-left:72.0pt"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">  40.<u></u><u></u></span></p>
<p>After a long struggle I found that I had missed a crucial thing.  With the new autoconf tools,
<b>it’s essential that c:/mingw be mounted as /mingw</b>, because /mingw is hard-coded into autoconf perl scripts. 
<a href="http://www.mingw.org/wiki/Getting_Started" target="_blank">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.  Saying “<span style="font-family:&quot;Courier New&quot;">mount
 c:/mingw /mingw</span>” did work.  I have no idea why. <u></u><u></u></p>
<p><u></u> <u></u></p>
<p>What is horrible is how uninformative the error message is.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>I guess we should update the Windows build instructions.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p style="margin-left:0cm">I still don’t know if I’ve bottomed out here because I can’t find Happy/Alex in the Haskell platform. Sigh.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p style="margin-left:0cm">Simon<u></u><u></u></p>
</font></span></div>
</div>

<br>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>