<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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 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";
        color:black;
        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";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Verdana","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
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 bgcolor="white" lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Thanks Kyra, you are a star.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Yes, msys2 has been updated to fix the ctypes bug.  I have the version from 20131022.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">With your edit I now get this:<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">  File "../driver/runtests.py", line 164, in <module><o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">    if mydll.kernel32.SetConsoleCP(65001) == 0:<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">  File "/usr/lib/python2.7/ctypes/__init__.py", line 435, in __getattr__<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">    dll = self._dlltype(name)<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">    self._handle = _dlopen(self._name, mode)<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New";color:#1F497D">OSError: No such file or directory<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="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">Any ideas about what to do now?  I guess you can reproduce if you install the later msys2.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D">thanks<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>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#1F497D"><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="color:windowtext;mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="color:windowtext;mso-fareast-language:EN-GB"> ghc-devs [mailto:ghc-devs-bounces@haskell.org]
<b>On Behalf Of </b>kyra<br>
<b>Sent:</b> 12 November 2013 06:45<br>
<b>To:</b> ghc-devs@haskell.org<br>
<b>Subject:</b> Re: Windows build<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I've looked into this.<br>
<br>
Current test script picks msys2-compiled python, which, after your modification, can't find 'windll', because msys2-compiled python is cygwin-like and it's 'ctypes' has no 'windll'. If we rewrite the relevant part of script thus:<br>
<br>
config.msys2 = False<br>
....<br>
    elif v.startswith("MINGW"):<br>
        config.msys2 = True<br>
....<br>
# Try to use UTF8<br>
if windows:<br>
    import ctypes<br>
    if config.cygwin or config.msys2:<br>
        # Is this actually right? Which calling convention does it use?<br>
        # As of the time of writing, ctypes.windll doesn't exist in the<br>
        # cygwin python, anyway.<br>
        mydll = ctypes.cdll<br>
    else:<br>
        mydll = ctypes.windll<br>
<br>
then we go slightly further and fail with:<br>
<br>
Traceback (most recent call last):<br>
  File "../driver/runtests.py", line 151, in <module><br>
    import ctypes<br>
  File "/usr/lib/python2.7/ctypes/__init__.py", line 451, in <module><br>
    pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])<br>
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__<br>
    self._handle = _dlopen(self._name, mode)<br>
OSError: No such file or directory<br>
<br>
And this is definitely a bug in msys2 python, because there is no such a file ("libpython*.dll) anywhere in msys2 distribution.<br>
<br>
What could be possible solutions?<br>
<br>
1. I'm seeing a new version of Msys2 appearing right now here <a href="http://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/">
http://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/</a>. It is now a bunch of separate packages, I've looked into python 2.7.5 package and found ctypes-related things definitely changed. Thus we could wait a couple of days until Msys2 release process
 is finished and installation information is available, hoping it's python is working properly.<br>
<br>
2. Another approach is to modify testing infrastructure to use some pure win32/mingw based python distribution. But I'm in no way an expert here, sorry.<br>
<br>
Cheers,<br>
Kyra<br>
<br>
<br>
On 11/12/2013 02:10, Simon Peyton-Jones wrote:<span style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Austin, or others,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">It would be SO GREAT if it was possible to validate on Windows again.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Currently I’m using msys2, which builds GHC fine, but things fail badly in the testsuite.</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">Traceback (most recent call last):</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">  File "../driver/runtests.py", line 144, in <module></span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">    raise Exception("Can't detect Windows terminal type")</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">Exception: Can't detect Windows terminal type</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">uname –s returns MINGW_NT-6.2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Changing the test from
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">    elif v.startswith("MINGW32"):</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">to</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">    elif v.startswith("MINGW"):</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">just produces a new error</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">Traceback (most recent call last):</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">  File "../driver/runtests.py", line 155, in <module></span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">    mydll = ctypes.windll</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">AttributeError: 'module' object has no attribute 'windll'</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New"">../mk/test.mk:242: recipe for target 'test' failed</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">It’s all very frustrating because I can’t validate.  Can anyone help?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Simon</span><o:p></o:p></p>
<p class="MsoNormalCxSpMiddle" style="margin-left:36.0pt;mso-add-space:auto"><span style="font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>ghc-devs mailing list<o:p></o:p></pre>
<pre><a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><o:p></o:p></pre>
<pre><a href="http://www.haskell.org/mailman/listinfo/ghc-devs">http://www.haskell.org/mailman/listinfo/ghc-devs</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>