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 runtests.py),
      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 
http://repo.msys2.org/msys/x86_64/msys2-runtime-2.5.0.17080.65c939c-1-x86_64.pkg.tar.xz
        $ pacman -U msys2-runtime-2.5.0.17080.65c939c-1-x86_64.pkg.tar.xz

    * If you are running any other runtime version then sadly you will
      need to reinstall msys2. This base tarball,
      http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20160719.tar.xz,
      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.

Cheers,

- Ben

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to