Status of GHC testsuite driver on Windows

Ben Gamari ben at
Mon Oct 17 00:32:02 UTC 2016

So I spent my weekend in the jungles Windows compatibility layers. I'll
spare you the details as they are gruesome but here's a brief summary,

 * There are a few nasty bugs currently in msys2 which affect the GHC
   testsuite driver:

    * Mingw Python packages are terribly broken (#12554)

    * Msys Python packages are also broken, but differently and only
      with msys2-runtime >= 2.5.1 (#12660)

    * Both of these issues manifest as a failure to remove test
      directories; unfortunately this error is hidden by the testsuite
      driver and you will likely instead see an error of the form,

        [Error 183] Cannot create a file when that file already exists: ...

      from os.makedirs. This issue appears to happen more often when
      threading is enabled in the testsuite driver (e.g. `make test
      THREADS=4` after disable the check disabling it in,
      but can also happen in single-threaded mode.

 * If you see this issue do the following,

    * Check #12554 for comments suggesting that the issue has been fixed
      upstream. If so, update msys2.

    * Run `pacman -Q msys2-runtime` and verify that you are running a
      2.5-series runtime

    * If you are running a 2.5-series runtime, you can simply downgrade
      to the last-known-good version, 2.5.0, by running,

        $ wget
        $ pacman -U msys2-runtime-

    * If you are running any other runtime version then sadly you will
      need to reinstall msys2. This base tarball,,
      is known to work.

    * After you have an msys installation with function runtime, you'll
      need to ensure that the testsuite driver runs with the msys
      python interpreter (located in /usr/bin/python), not the mingw
      interpreter (located in /mingw*/bin/python). This can be
      accomplished with `make test PYTHON=/usr/bin/python`.

      Unfortunately there's no easy way of doing this with `./validate`.
      The easiest (but terrible) hack is,

         $ cp /usr/bin/python /mingw64/bin/python

 * Armed with this knowledge, I should soon be able to bring the Windows
   build bot back online.

 * At some point someone is going to need to track down these bugs in
   CPython and/or msys2 if Windows support is going to remain viable.
   If you have time and interest in a challenge please get let me know.

Now to go drown my sorrows.


- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list