Automating GHC build for Windows
gintautas.miliauskas at gmail.com
Mon Nov 3 21:37:46 UTC 2014
Potentially related issues:
On Mon, Nov 3, 2014 at 1:24 AM, Gintautas Miliauskas <
gintautas.miliauskas at gmail.com> wrote:
> Without knowing much about the surrounding code, I would try two things
> 1. Is it possible that the file was opened by for writing and not closed
> because of lazy I/O?
> 2. Since the error is completely deterministic, you could try "freezing"
> evaluation right before the crash (either by a breakpoint in ghci or just
> adding a time delay / console read on the code), and then using a utility
> <http://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows> to
> check which process is keeping the file open, whether it's the same process
> or something else.
> If any of the involved paths is a directory, this could be #8482
> <https://ghc.haskell.org/trac/ghc/ticket/8482>, although that does not
> seem to be the case.
> On Thu, Oct 30, 2014 at 7:13 PM, Páli Gábor János <pali.gabor at gmail.com>
>> 2014-10-30 16:24 GMT+01:00 Gintautas Miliauskas <gintautas at miliauskas.lt
>> > I wonder what's going on with DeleteFile. What is the step that's
>> 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 , 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-0.3.1.0...
>> 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/ghc.mk:4: recipe for target
>> 'libraries/ghc-prim/dist-install/package-data.mk' failed
>> make: *** [libraries/ghc-prim/dist-install/package-data.mk] 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 :-)
> Gintautas Miliauskas
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs