Automating GHC build for Windows

Páli Gábor János pali.gabor at
Thu Oct 30 18:13:10 UTC 2014

2014-10-30 16:24 GMT+01:00 Gintautas Miliauskas <gintautas at>:
> I wonder what's going on with DeleteFile. What is the step that's failing?

Basically it happens at the same point, that is, at the "configure"
phase but at the ghc-prim package.  Note that the previously mentioned
workaround has a "removeFile" action [1], I guess the failure of that
triggers the DeleteFile exception.

> Can you post the log?

"inplace/bin/ghc-cabal.exe" configure libraries/ghc-prim dist-install
"" --with-ghc="C:/msys64/home/ghc-builder/ghc/inplace/bin/ghc-stage1.exe"
--flag=include-ghc-prim --disable-library-for-ghci
--enable-library-vanilla --enable-library-for-ghci
--enable-library-profiling --disable-shared
--configure-option=CFLAGS=" -U__i686 -march=i686 -fno-stack-protector
 " --configure-option=LDFLAGS="   " --configure-option=CPPFLAGS="   "
--gcc-options=" -U__i686 -march=i686 -fno-stack-protector       "
--with-ar="/usr/bin/ar" --with-alex="/usr/local/bin/alex"
Configuring ghc-prim-
ghc-cabal.exe: DeleteFile "dist-install\\setup-config": permission
denied (The process cannot access the file because it is being used by
another process.)
libraries/ghc-prim/ recipe for target
'libraries/ghc-prim/dist-install/' failed
make[1]: *** [libraries/ghc-prim/dist-install/] Error 1
Makefile:71: recipe for target 'all' failed

> I also wonder why this issue is not arising on other Windows machines...

As the comment in the workaround goes, it has a "Big fat hairy race
condition".  Therefore I am inclined to believe that it may be a
problem for other systems as well, but I am the most unfortunate one
who hits this error with 100% probability :-)


More information about the ghc-devs mailing list