Hadrian looks for RTSs that should not be necessary for the build
If I try to make a build with this flavour:
userFlavour :: Flavour
userFlavour = defaultFlavour
{ name = "user"
, libraryWays = pure [vanilla]
, rtsWays = pure [debug, threadedDebug]
, args = args defaultFlavour <> rtsArgs
, dynamicGhcPrograms = return True
, ghcDebugged = True
}
where
rtsArgs :: Args
rtsArgs = builder Cc ? package rts ? arg "-O0" <> arg "-g3"
For some reason hadrial looks for non-debug runtime and fails:
Error when running Shake build system:
at action, called at src/Rules.hs:71:19 in main:Rules
at need, called at src/Rules.hs:93:5 in main:Rules
* Depends on: _build/stage1/bin/runghc
at need, called at src/Rules/Register.hs:76:5 in main:Rules.Register
* Depends on: _build/stage1/lib/x86_64-linux-ghc-8.11.0.20200211/libHSrts-1.0-ghc8.11.0.20200211.so
at error, called at src/Development/Shake/Internal/Rules/File.hs:179:58 in shake-0.18.3-a9de361a74bef613491c235c1a1f725e6f3f1e9824ca9a8fbdfa98ba6ccae272:Development.Shake.Internal.Rules.File
* Raised the exception:
Error, rule finished running but did not produce file:
_build/stage1/lib/x86_64-linux-ghc-8.11.0.20200211/libHSrts-1.0-ghc8.11.0.20200211.so
I have ghcDebugged = True
and build the debug RTSs in rtsWays = pure [debug, threadedDebug]
so this shouldn't fail.
It also doesn't work if I add threaded
way:
rtsWays = pure [debug, threadedDebug, threaded]
Error is:
Error when running Shake build system:
at action, called at src/Rules.hs:71:19 in main:Rules
at need, called at src/Rules.hs:93:5 in main:Rules
* Depends on: _build/stage1/bin/hsc2hs
at need, called at src/Rules/Register.hs:76:5 in main:Rules.Register
* Depends on: _build/stage1/lib/x86_64-linux-ghc-8.11.0.20200211/libHSrts-1.0-ghc8.11.0.20200211.so
at error, called at src/Development/Shake/Internal/Rules/File.hs:179:58 in shake-0.18.3-a9de361a74bef613491c235c1a1f725e6f3f1e9824ca9a8fbdfa98ba6ccae272:Development.Shake.Internal.Rules.File
* Raised the exception:
Error, rule finished running but did not produce file:
_build/stage1/lib/x86_64-linux-ghc-8.11.0.20200211/libHSrts-1.0-ghc8.11.0.20200211.so
I don't know why it's looking for non-threaded RTS.
In summary: hadrian looks for RTSs that should not be necessary for the flavour. If I'm asking for a debugged GHC it shouldn't need non-debug runtimes. Similarly if I ask for threaded runtime it shouldn't need non-threaded runtimes.