<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=us-ascii">
<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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        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;}
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;
        font-size:11.0pt;
        font-family:"Courier New";
        color:#1F497D;
        mso-fareast-language:EN-US;}
span.CodeChar
        {mso-style-name:"Code Char";
        mso-style-link:Code;
        font-family:"Courier New";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Verdana","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Verdana","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;}
--></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"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Actually, the two problems seem to be the same.  A fresh build from scratch yields<o:p></o:p></span></p>
<p class="Code">libraries/random/ghc.mk:5: recipe for target 'libraries/random/dist-install/build/System/Random.o' failed<o:p></o:p></p>
<p class="Code">make[1]: *** [libraries/random/dist-install/build/System/Random.o] Segmentation fault<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Then sniping the command line that tried to build Random.o yields<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="Code">"inplace/bin/ghc-stage2.exe" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Werror -Wall -H64m -O0    -package-name random-1.0.1.1 -hide-all-packages -i -ilibraries/random/. -ilibraries/random/dist-install/build -ilibraries/random/dist-install/build/autogen
 -Ilibraries/random/dist-install/build -Ilibraries/random/dist-install/build/autogen -Ilibraries/random/.    -optP-include -optPlibraries/random/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package time-1.4.2 -O2 -XHaskell98 -XCPP -O2 -O
 -dcore-lint -fno-warn-amp  -fno-warn-deprecated-flags -dcore-lint  -no-user-package-db -rtsopts      -odir libraries/random/dist-install/build -hidir libraries/random/dist-install/build -stubdir libraries/random/dist-install/build   -c libraries/random/./System/Random.hs
 -o libraries/random/dist-install/build/System/Random.o<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">bash: [6536: 1 (255)] tcsetattr: Inappropriate ioctl for device<o:p></o:p></p>
<p class="MsoNormal" align="right" style="text-align:right"><span style="font-family:"Verdana","sans-serif";color:#1F497D">io<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">So this ioctl thing seems to be reported as a seg fault by the make system.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Running the same command from a ‘cmd’ window does give a seg-fault pop-up window.  Alas.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Running with –dshow-passes shows that it happens during code generation,<o:p></o:p></span></p>
<p class="Code">*** CorePrep:<o:p></o:p></p>
<p class="Code">Result size of CorePrep = {terms: 1,214, types: 912, coercions: 52}<o:p></o:p></p>
<p class="Code">*** Core Linted result of CorePrep:<o:p></o:p></p>
<p class="Code">*** Stg2Stg:<o:p></o:p></p>
<p class="Code">*** CodeOutput:<o:p></o:p></p>
<p class="Code">*** New CodeGen:<o:p></o:p></p>
<p class="Code">*** CPSZ:<o:p></o:p></p>
<p class="Code">*** CPSZ:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">I am totally stuck.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Simon<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" style="margin:0cm;margin-bottom:.0001pt"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Simon Peyton Jones
<br>
<b>Sent:</b> 06 March 2014 22:11<br>
<b>To:</b> ghc-devs@haskell.org<br>
<b>Subject:</b> new Windows build problem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Sigh.  Totally new problem with building GHC (HEAD) on Windows.. 
<o:p></o:p></span></p>
<p class="Code">"inplace/bin/ghc-stage2.exe" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Werror -Wall -H64m -O0    -package-name haskell98-2.0.0.3 -hide-all-packages -i -ilibraries/haskell98/. -ilibraries/haskell98/dist-install/build -ilibraries/haskell98/dist-install/build/autogen
 -Ilibraries/haskell98/dist-install/build -Ilibraries/haskell98/dist-install/build/autogen -Ilibraries/haskell98/.    -optP-include -optPlibraries/haskell98/dist-install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.0.0 -package directory-1.2.0.2
 -package old-locale-1.0.0.6 -package old-time-1.1.0.2 -package process-1.2.0.0 -package time-1.4.2 -Wall -XHaskell98 -O2 -O -dcore-lint -fno-warn-amp  -fno-warn-deprecated-flags -dcore-lint  -no-user-package-db -rtsopts      -odir libraries/haskell98/dist-install/build
 -hidir libraries/haskell98/dist-install/build -stubdir libraries/haskell98/dist-install/build   -c libraries/haskell98/./Directory.hs -o libraries/haskell98/dist-install/build/Directory.o
<o:p></o:p></p>
<p class="Code"><b><span style="color:red">bash: [6536: 1 (255)] tcsetattr: Inappropriate ioctl for device<o:p></o:p></span></b></p>
<p class="Code">HEAD $<span style="color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">What on earth is this ioctl stuff?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">The above is repeatable; same command line, same result.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">But I’m also getting random seg-faults when building libraries with the stage2 compiler
<o:p></o:p></span></p>
<p class="Code">libraries/random/ghc.mk:5: recipe for target 'libraries/random/dist-install/build/System/Random.o' failed<o:p></o:p></p>
<p class="Code">make[1]: *** [libraries/random/dist-install/build/System/Random.o] Segmentation fault<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">This is NOT repeatable.  Saying ‘make’ again gets further.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Any ideas?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Simon<o:p></o:p></span></p>
</div>
</div>
</body>
</html>