Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#15950 closed bug (fixed)

Hadrian build fails on Windows

Reported by: bgamari Owned by:
Priority: high Milestone: 8.8.1
Component: Build System (Hadrian) Version: 8.6.2
Keywords: Cc: alpmestan, snowleopard
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D5381
Wiki Page:

Description (last modified by bgamari)

As of 509d5be69c7507ba5d0a5f39ffd1613a59e73eea,

$ hadrian/ -j5 --flavour=Quick
$ hadrian/ -j5 --flavour=Quick
| ContextData oracle: resolving data for 'iserv' (Stage1, v)... 
| Configure package 'iserv' 
Configuring iserv-8.7.1... 
"C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc.exe" "--numeric-version"
]0;1s (99%)C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc.exe is version 
"C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc-pkg.exe" "--version"
C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc-pkg.exe is 
version 8.7.20181126 
"C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc.exe" "--supported-languages"
"C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc.exe" "--info" 
Reading installed packages... 
"C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc-pkg.exe" "dump" "--global" "-v0" "--global-package-db=C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage1/lib/package.conf.d" 
"C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc.exe" "--print-libdir" "-ghcversion-file=C:/msys64/home/ben/ghc/builds/0/project-0/_build/generated/ghcversion.h" 
CallStack (from HasCallStack): 
  die', called at .\Distribution\Simple\Configure.hs:969:20 in Cabal- 
  configureFinalizedPackage, called at .\Distribution\Simple\Configure.hs:467:12 in Cabal-
  configure, called at .\Distribution\Simple.hs:596:20 in Cabal-
  confHook, called at .\Distribution\Simple\UserHooks.hs:67:5 in Cabal-
  configureAction, called at .\Distribution\Simple.hs:178:19 in Cabal-
  defaultMainHelper, called at .\Distribution\Simple.hs:148:3 in Cabal-
  defaultMainWithHooksNoReadArgs, called at src\Hadrian\Haskell\Cabal\Parse.hs:145:14 in main:Hadrian.Haskell.Cabal.Parse
hadrian.exe: Encountered missing dependencies:
libiserv ==8.7.*
]0;FinishedshakeArgsWith   0.003s    0%
Function shake  0.442s    2%
Database read   0.851s    3%  =
With database   0.033s    0%
Running rules  20.749s   93%  =========================
Total          22.079s  100%
Error when running Shake build system:
  at src/Main.hs:58:30-42:
* Depends on: test
  at src/Rules/Test.hs:109:5-9:
* Depends on: _build/stage1/lib/bin/ghc-iserv.exe
  at src/Development/Shake/Internal/Rules/Oracle.hs:157:43-68:
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Program, pkgName = "iserv", pkgPath = "utils/iserv"}, way = v}))
  at src/Hadrian/Haskell/Cabal/Parse.hs:202:5-36:
* Depends on: _build/stage1/utils/iserv/setup-config
* Raised the exception:
ExitFailure 1

(Ignore garbage characters due to Window's broken ANSI console support).

This seems to only be reproducible on Windows.

Change History (9)

comment:1 Changed 3 months ago by bgamari

Description: modified (diff)

comment:2 Changed 3 months ago by bgamari

Cc: alpmestan snowleopard added
Description: modified (diff)

Perhaps iserv is missing a dependency on libiserv?

comment:3 Changed 3 months ago by bgamari

Description: modified (diff)
Operating System: Unknown/MultipleWindows

comment:4 Changed 3 months ago by bgamari

I see, Settings.Default.stage1Packages conditions both iserv and libiserv on the platform not being Windows. However, then Rules.Test.needIservBins depends upon iserv regardless. This all seems terribly fragile.

comment:5 Changed 3 months ago by bgamari

Differential Rev(s): Phab:D5381
Status: newpatch

comment:6 Changed 3 months ago by Ben Gamari <ben@…>

In cbf57b7d/ghc:

hadrian/test: Don't depend upon iserv on Windows

Iserv is not supported on Windows. This fixes #15950 but this whole situation
feels awfully fragile to me.

comment:7 Changed 2 months ago by bgamari

Resolution: fixed
Status: patchclosed

comment:8 Changed 2 months ago by Ben Gamari <ben@…>

In 22c2865a/ghc:

gitlab-ci: Disable Hadrian linting on Windows

The lint checks currently fail due to #15950.

comment:9 Changed 2 months ago by bgamari

Sigh, that was supposed to refer to #15971.

Note: See TracTickets for help on using tickets.