Automating GHC build for Windows

Páli Gábor János pali.gabor at gmail.com
Wed Oct 29 23:18:51 UTC 2014


2014-10-28 21:49 GMT+01:00 Gintautas Miliauskas <gintautas at miliauskas.lt>:
> Can you try running the offending command with -v to see which step
> breaks?

I have tried it, even together with building the GHC sources with a
recent toolchain, but I did not get much forward.

> I tried running it locally under strace but did not see any file renames
> either.

Although, I think I managed to find the place where some renaming
happens.  That is `writeFileAtomic` in Cabal's
Distribution.Simple.Utils module [1].  The bin-package-db library has
a patched version of this function [2] that has a workaround for
Windows.  After incorporating this change in Cabal, I was able to pass
the previously problematic point in the build.  Unfortunately, this
was not enough for the complete build, as a similar error (with
DeleteFile that time) was raised.

[1] https://github.com/haskell/cabal/blob/master/Cabal/Distribution/Simple/Utils.hs#L1032
[2] https://github.com/ghc/ghc/blob/master/libraries/bin-package-db/GHC/PackageDb.hs#L252


More information about the ghc-devs mailing list