[GHC] #15908: Hadrian: Spurious build failure on fresh build

#15908: Hadrian: Spurious build failure on fresh build -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Building GHC Unknown/Multiple | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- On a freshly checked-out (Windows10 64)ghc tree I was building with hadrian (`hadrian/build.bat -j`). It aborted here: | Run Ghc CompileHs Stage1: libraries/pretty/src/Text/PrettyPrint/Annotated.hs => _build/stage1/libraries/pretty/build/Text/PrettyPrint/Annotated.o | Run Ar Pack Stage1: _build/stage1/libraries/stm/build/Control/Concurrent/STM.p_o (and 9 more) => _build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a C:/Users/ggreif/ghc/inplace/mingw/bin/ar.exe: creating _build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a C:/Users/ggreif/ghc/inplace/mingw/bin/ar.exe: unable to rename '_build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a'; reason: File exists shakeArgsWith 0.001s 0% Function shake 0.317s 0% Database read 0.468s 0% With database 0.013s 0% Running rules 3492.921s 99% ========================= Total 3493.720s 100% Error when running Shake build system: * _build/stage1/lib/package.conf.d/stm-2.5.0.0.conf * _build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a user error (Development.Shake.cmd, system command failed Command: C:/Users/ggreif/ghc/inplace/mingw/bin/ar.exe q _build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a @C:\Users\ggreif\AppData\Local\Temp\extA08E Exit code: 1 Stderr: C:/Users/ggreif/ghc/inplace/mingw/bin/ar.exe: creating _build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a C:/Users/ggreif/ghc/inplace/mingw/bin/ar.exe: unable to rename '_build/stage1/libraries/stm/build/libHSstm-2.5.0.0_p.a'; reason: File exists ) Can this be a concurrency problem, while renaming archives? Anyway it healed after restarting Hadrian. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15908 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15908: Hadrian: Spurious build failure on fresh build -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): I have just updated the repo and this happened: {{{ _build\stage1\libraries\ghc-prim\build\GHC\PrimopWrappers.hs:6:70: error: Module `GHC.Prim' does not export `Int16#' | 6 | import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Int8#, Word8#, Int16#, Word16#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayArray#, ArrayArray#, MutVar#, RealWorld, TVar#, MVar#, ThreadId#, Weak#, StableName#, Compact#, BCO#) | ^^^^^^ _build\stage1\libraries\ghc-prim\build\GHC\PrimopWrappers.hs:6:78: error: Module `GHC.Prim' does not export `Word16#' | 6 | import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Int8#, Word8#, Int16#, Word16#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayArray#, ArrayArray#, MutVar#, RealWorld, TVar#, MVar#, ThreadId#, Weak#, StableName#, Compact#, BCO#) | ^^^^^^^ shakeArgsWith 0.001s 0% Function shake 0.583s 0% Database read 0.980s 0% With database 0.045s 0% Running rules 933.195s 99% ========================= Total 934.803s 100% Error when running Shake build system: * test * _build/stage1/bin/ghc.exe * OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "Win32", pkgPath = "libraries/Win32"}, way = v})) * _build/stage1/libraries/Win32/setup-config * _build/stage1/lib/package.conf.d/base-4.12.0.0.conf * OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "base", pkgPath = "libraries/base"}, way = v})) * _build/stage1/libraries/base/setup-config * _build/stage1/lib/package.conf.d/ghc-prim-0.5.3.conf * _build/stage1/libraries/ghc-prim/build/libHSghc-prim-0.5.3.a * _build/stage1/libraries/ghc-prim/build/GHC/PrimopWrappers.o * _build/stage1/libraries/ghc-prim/build/GHC/PrimopWrappers.o _build/stage1/libraries/ghc-prim/build/GHC/PrimopWrappers.hi user error (Development.Shake.cmd, system command failed Command: _build/stage0/bin/ghc.exe -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db "-package-db _build/stage1/lib/package.conf.d" "-this-unit-id ghc-prim-0.5.3" "-package-id rts-1.0" -i -i_build/stage1/libraries/ghc-prim/build -i_build/stage1/libraries/ghc-prim/build/autogen -ilibraries/ghc-prim/. -Iincludes -I_build/generated -I_build/stage1/libraries/ghc-prim/build -IC:/Users/ggreif/ghc/_build/stage1/x86_64-windows- ghc-8.7.20181117/rts-1.0/include -I_build/generated -optc- I_build/generated -optP-include -optP_build/stage1/libraries/ghc- prim/build/autogen/cabal_macros.h -optc-fno-stack-protector -odir _build/stage1/libraries/ghc-prim/build -hidir _build/stage1/libraries/ghc- prim/build -stubdir _build/stage1/libraries/ghc-prim/build -Wnoncanonical- monad-instances -optc-Wno-error=inline -c _build/stage1/libraries/ghc- prim/build/GHC/PrimopWrappers.hs -o _build/stage1/libraries/ghc- prim/build/GHC/PrimopWrappers.o -O0 -H64m -this-unit-id ghc-prim -XHaskell2010 -ghcversion- file=C:/Users/ggreif/ghc/_build/generated/ghcversion.h -O -Wno-deprecated- flags -Wno-trustworthy-safe Exit code: 1 Stderr: _build\stage1\libraries\ghc-prim\build\GHC\PrimopWrappers.hs:6:70: error: Module `GHC.Prim' does not export `Int16#' | 6 | import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Int8#, Word8#, Int16#, Word16#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayArray#, ArrayArray#, MutVar#, RealWorld, TVar#, MVar#, ThreadId#, Weak#, StableName#, Compact#, BCO#) | ^^^^^^ _build\stage1\libraries\ghc-prim\build\GHC\PrimopWrappers.hs:6:78: error: Module `GHC.Prim' does not export `Word16#' | 6 | import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Int8#, Word8#, Int16#, Word16#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayArray#, ArrayArray#, MutVar#, RealWorld, TVar#, MVar#, ThreadId#, Weak#, StableName#, Compact#, BCO#) | ^^^^^^^ ) }}} Revision is: 36fcf9edee (origin/master, origin/HEAD) Introduce Int16# and Word16# -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15908#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15908: Hadrian: Spurious build failure on fresh build -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by alpmestan): * cc: snowleopard, alpmestan (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15908#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15908: Hadrian: Spurious build failure on fresh build -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by snowleopard): There are two closed issues on GitHub which seem related to the `unable to rename` failure: https://github.com/snowleopard/hadrian/issues/203 https://github.com/snowleopard/hadrian/issues/238 In both cases we were unable to reliable reproduce the problem and eventually closed the issues. The `GHC.Prim` issue seem unrelated. Can you reproduce it reliably? If yes, it may deserve a separate ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15908#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15908: Hadrian: Spurious build failure on fresh build -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): I see. You should be able to reproduce the `GHC.Prim` issue by `git reset --hard 36fcf9edee~1` (be sure to check `git status` first, and save all your work). Now zap your `_build` and redo it. Then `git reset --hard 36fcf9edee` and do an incremental build. This should result in the same error. The reason is probably that when new primitives are introduced, some generators (`genPrim` or such?) need to run. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15908#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC