[GHC] #9775: "Failed to remove" errors during Windows build from hsc2hs

GHC ghc-devs at haskell.org
Thu Nov 6 12:07:51 UTC 2014


#9775: "Failed to remove" errors during Windows build from hsc2hs
-------------------------------------+-------------------------------------
              Reporter:  gintas      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Build       |          Version:  7.8.3
  System                             |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:  Windows     |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by gintas):

 Looks like this is an old issue, all the way back from 2006, see here:

 http://web.archiveorange.com/archive/v/j7U5ds4Ozu7dvDiQLdtl

 The code that spews the error is already trying to work around the issue,
 but fails, it just does not break the build process. On the bright side,
 this particular error is not harmful, the outcome is just that a temporary
 file does not get deleted.

 Relevant code:

 {{{
 -- delay the cleanup of generated files until the end; attempts to
 -- get around intermittent failure to delete files which has
 -- just been exec'ed by a sub-process (Win32 only.)
 finallyRemove :: FilePath -> IO a -> IO a
 finallyRemove fp act =
   bracket_ (return fp)
            (const $ noisyRemove fp)
            act
  where
   noisyRemove fpath =
     catch (removeFile fpath)
           (\ e -> hPutStrLn stderr ("Failed to remove file " ++ fpath ++
 "; error= " ++ show e))
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9775#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list