Skip to content

ghc-9.10.1 Cabal can't build ghc-9.10 hadrian

Summary

It is not possible to build current ghc-9.10 with itself, since hadrian requires older Cabal < 3.11, whereas 9.10 ships 3.12

Steps to reproduce

Try to build ghc-9.10.1 hadrian with ghc-9.10.1 Cabal.

Configuring hadrian-0.1.0.0...
Error: Setup: Encountered missing or private dependencies:
Cabal >=3.10 && <3.11

Patching hadrian.cabal leads to:

[101 of 108] Compiling Hadrian.Haskell.Cabal.Parse

src/Hadrian/Haskell/Cabal/Parse.hs:413:9: error:
    Not in scope: ‘C.initialBuildSteps’
    NB: neither ‘Distribution.Simple’, ‘Distribution.Simple.Build’,
                ‘Distribution.Simple.Compiler’, ‘Distribution.Simple.Configure’,
                ‘Distribution.Simple.PackageDescription’,
                ‘Distribution.Simple.PackageIndex’,
                ‘Distribution.Simple.Program.Builtin’,
                ‘Distribution.Simple.Program.Db’,
                ‘Distribution.Simple.Program.Types’,
                ‘Distribution.Simple.Register’, ‘Distribution.Simple.Utils’,
                ‘Distribution.Types.ComponentLocalBuildInfo’,
                ‘Distribution.Types.LocalBuildInfo’, ‘Distribution.Verbosity’,
                ‘Distribution.ModuleName’, ‘Distribution.Package’,
                ‘Distribution.PackageDescription’,
                ‘Distribution.PackageDescription.Configuration’,
                ‘Distribution.Text’, ‘Distribution.Types.MungedPackageId’,
                ‘Distribution.Utils.Path’ nor ‘Distribution.Utils.ShortText’ export ‘initialBuildSteps’.
    |
413 |         C.initialBuildSteps cPath pd (lbi { C.localPkgDescr = pd }) C.silent
    |         ^^^^^^^^^^^^^^^^^^^
[103 of 108] Compiling Rules.Library[boot]

Expected behavior

ghc-9.10 should be able to build itself including hadrian with its own Cabal.

Environment

  • GHC version used: ghc-9.4.5

(this may seem contradicting but I am actually trying to build with ghc-9.4.5 and the Cabal shipped with ghc-9.10 - ie same story but compiling with ghc-9.4)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information