Problems building cabal-install?

Viktor Dukhovni ietf-dane at dukhovni.org
Sun Nov 26 01:30:42 UTC 2023


On Sat, Nov 25, 2023 at 05:23:33PM -0500, Viktor Dukhovni wrote:

> > Which GHC version are you attempting to build with? My guess is that
> > `cabal-install-3.4` excludes your GHC's `base` via its version
> > constraints.
> 
> No, I'm specifically using GHC 8.10, which actually comes with the Cabal
> 3.4 library.  Also tried 8.8 with same results.

Here's the build output:

    $ ghc --version
    The Glorious Glasgow Haskell Compilation System, version 8.8.4

    $ cabal --version
    cabal-install version 3.0.1.0
    compiled using version 3.0.1.0 of the Cabal library

    $ cabal install --constraint 'cabal-install ^>=3.4' cabal-install
    Resolving dependencies...
    Build profile: -w ghc-8.8.4 -O1
    In order, the following will be built (use -v for more details):
     - Cabal-3.4.1.0 (lib) (requires build)
     - Cabal-syntax-3.10.2.0 (lib) (requires build)
     ...
     - hackage-security-0.6.2.3 (lib) (requires build)
     ...
     - cabal-install-3.4.1.0 (exe:cabal) (requires build)
    ...
    Installing   Cabal-syntax-3.10.2.0 (lib)
    Completed    Cabal-syntax-3.10.2.0 (lib)
    Starting     hackage-security-0.6.2.3 (lib)
    Building     hackage-security-0.6.2.3 (lib)
    Installing   hackage-security-0.6.2.3 (lib)
    Completed    hackage-security-0.6.2.3 (lib)
    Installing   Cabal-3.4.1.0 (lib)
    Completed    Cabal-3.4.1.0 (lib)
    Starting     cabal-install-3.4.1.0 (exe:cabal)
    Building     cabal-install-3.4.1.0 (exe:cabal)

    Failed to build exe:cabal from cabal-install-3.4.1.0.
    Build log (
    /home/viktor/.cabal/logs/ghc-8.8.4/cabal-install-3.4.1.0-0f55dc0aa499748357ddf42c4e32b1e210d53da7ef90484735d9a77309f7612d.log
    ):
    Configuring executable 'cabal' for cabal-install-3.4.1.0..
    Preprocessing executable 'cabal' for cabal-install-3.4.1.0..
    Building executable 'cabal' for cabal-install-3.4.1.0..
    [  1 of 180] Compiling Distribution.Client.Compat.Directory ( Distribution/Client/Compat/Directory.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/Directory.o )
    [  2 of 180] Compiling Distribution.Client.Compat.ExecutablePath ( Distribution/Client/Compat/ExecutablePath.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/ExecutablePath.o )
    ...
    [128 of 180] Compiling Distribution.Client.FetchUtils ( Distribution/Client/FetchUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/FetchUtils.o )

    Distribution/Client/FetchUtils.hs:195:36: error:
        • Couldn't match type ‘Distribution.Types.PackageId.PackageIdentifier’
                         with ‘Cabal-syntax-3.10.2.0:Distribution.Types.PackageId.PackageIdentifier’
          NB: ‘Cabal-syntax-3.10.2.0:Distribution.Types.PackageId.PackageIdentifier’
                is defined in ‘Distribution.Types.PackageId’
                    in package ‘Cabal-syntax-3.10.2.0’
              ‘Distribution.Types.PackageId.PackageIdentifier’
                is defined in ‘Distribution.Types.PackageId’
                    in package ‘Cabal-3.4.1.0’
          Expected type: Cabal-syntax-3.10.2.0:Distribution.Types.PackageId.PackageIdentifier
            Actual type: PackageId
        • In the second argument of ‘Sec.downloadPackage'’, namely ‘pkgid’
          In a stmt of a 'do' block: Sec.downloadPackage' rep pkgid path
          In the second argument of ‘($)’, namely
            ‘do info verbosity ("Writing " ++ path)
                Sec.downloadPackage' rep pkgid path’
        |
    195 |           Sec.downloadPackage' rep pkgid path
        |                                    ^^^^^
    cabal: Failed to build exe:cabal from cabal-install-3.4.1.0. See the build log
    above for details.

-- 
    Viktor.


More information about the ghc-devs mailing list