Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with 9.10 #1627

Closed
iWantToKeepAnon opened this issue Dec 15, 2024 · 2 comments
Closed

Fails to build with 9.10 #1627

iWantToKeepAnon opened this issue Dec 15, 2024 · 2 comments

Comments

@iWantToKeepAnon
Copy link

I tried to install hlint with cabal and got errors. I am using ghc and cabal installed via brew on a intel macbook. This must be caused by my environment; any pointers would be much appreciated!

$ brew info ghc ; brew info cabal-install
==> ghc: stable 9.10.1 (bottled), HEAD
Glorious Glasgow Haskell Compilation System
https://haskell.org/ghc/
Installed
/usr/local/Cellar/ghc/9.10.1 (12,377 files, 2GB) *
  Poured from bottle using the formulae.brew.sh API on 2024-08-28 at 08:27:37
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/ghc.rb
License: BSD-3-Clause AND MIT AND (LGPL-3.0-or-later OR GPL-2.0-or-later)
==> Dependencies
Build: autoconf ✘, automake ✘, python@3.12 ✘, sphinx-doc ✘, xz ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

==> cabal-install: stable 3.12.1.0 (bottled), HEAD
Command-line interface for Cabal and Hackage
https://www.haskell.org/cabal/
Installed
/usr/local/Cellar/cabal-install/3.12.1.0 (8 files, 43.0MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-08-28 at 08:29:06
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/c/cabal-install.rb
License: BSD-3-Clause
==> Dependencies
Required: ghc ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

My first attempt was via % cabal install hlint-3.8

Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: hlint-3.8 (user goal)
[__1] next goal: ghc-lib-parser (dependency of hlint +/-ghc-lib)
[__1] rejecting: ghc-lib-parser; 9.10.1.20241103, 9.10.1.20240511 (conflict: hlint +/-ghc-lib => ghc-lib-parser>=9.8 && <9.9)
[__1] trying: ghc-lib-parser-9.8.4.20241130
[__2] next goal: base (dependency of hlint)
[__2] rejecting: base-4.20.0.0/installed-inplace (conflict: ghc-lib-parser => base>=4.17 && <4.20)
[__2] skipping: base; 4.20.0.1, 4.20.0.0 (has the same characteristics that caused the previous version to fail: excluded by constraint '>=4.17 && <4.20' from 'ghc-lib-parser')
[__2] rejecting: base; 4.19.2.0, 4.19.1.0, 4.19.0.0, 4.18.2.1, 4.18.2.0, 4.18.1.0, 4.18.0.0, 4.17.2.1, 4.17.2.0, 4.17.1.0, 4.17.0.0, 4.16.4.0, 4.16.3.0, 4.16.2.0, 4.16.1.0, 4.16.0.0, 4.15.1.0, 4.15.0.0, 4.14.3.0, 4.14.2.0, 4.14.1.0, 4.14.0.0, 4.13.0.0, 4.12.0.0, 4.11.1.0, 4.11.0.0, 4.10.1.0, 4.10.0.0, 4.9.1.0, 4.9.0.0, 4.8.2.0, 4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (constraint from non-reinstallable package requires installed instance)
[__2] fail (backjumping, conflict set: base, ghc-lib-parser, hlint)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: hlint, base, ghc-lib-parser

My second attempt was via % cabal install --allow-newer hlint-3.8

Resolving dependencies...
Build profile: -w ghc-9.10.1 -O1
In order, the following will be built (use -v for more details):
 - mono-traversable-1.0.21.0 (lib) (requires download & build)
 - random-1.2.1.3 (lib) (requires download & build)
 - conduit-1.3.6 (lib) (requires build)
 - uuid-types-1.0.6 (lib) (requires build)
 - QuickCheck-2.15.0.1 (lib) (requires build)
 - libyaml-0.1.4 (lib) (requires build)
 - aeson-2.2.3.0 (lib) (requires build)
 - yaml-0.11.11.2 (lib) (requires build)
 - deriving-aeson-0.2.10 (lib) (requires build)
 - hlint-3.8 (lib) (requires build)
 - hlint-3.8 (exe:hlint) (requires build)
Downloading  random-1.2.1.3
Downloaded   random-1.2.1.3
Downloading  mono-traversable-1.0.21.0
Starting     random-1.2.1.3 (lib)
Downloaded   mono-traversable-1.0.21.0
Starting     mono-traversable-1.0.21.0 (lib)
Building     random-1.2.1.3 (lib)
Building     mono-traversable-1.0.21.0 (lib)
Installing   random-1.2.1.3 (lib)
Completed    random-1.2.1.3 (lib)
Starting     uuid-types-1.0.6 (lib)
Starting     QuickCheck-2.15.0.1 (lib)
Building     QuickCheck-2.15.0.1 (lib)
Building     uuid-types-1.0.6 (lib)
Installing   uuid-types-1.0.6 (lib)
Completed    uuid-types-1.0.6 (lib)
Installing   QuickCheck-2.15.0.1 (lib)
Completed    QuickCheck-2.15.0.1 (lib)
Starting     aeson-2.2.3.0 (lib)
Installing   mono-traversable-1.0.21.0 (lib)
Completed    mono-traversable-1.0.21.0 (lib)
Starting     conduit-1.3.6 (lib)
Building     aeson-2.2.3.0 (lib)
Building     conduit-1.3.6 (lib)
Installing   conduit-1.3.6 (lib)
Completed    conduit-1.3.6 (lib)
Starting     libyaml-0.1.4 (lib)
Building     libyaml-0.1.4 (lib)
Installing   libyaml-0.1.4 (lib)
Completed    libyaml-0.1.4 (lib)
Installing   aeson-2.2.3.0 (lib)
Completed    aeson-2.2.3.0 (lib)
Starting     deriving-aeson-0.2.10 (lib)
Starting     yaml-0.11.11.2 (lib)
Building     yaml-0.11.11.2 (lib)
Building     deriving-aeson-0.2.10 (lib)
Installing   deriving-aeson-0.2.10 (lib)
Completed    deriving-aeson-0.2.10 (lib)
Installing   yaml-0.11.11.2 (lib)
Completed    yaml-0.11.11.2 (lib)
Starting     hlint-3.8 (lib)
Building     hlint-3.8 (lib)

Failed to build hlint-3.8.
Build log ( /Users/e43921/.cache/cabal/logs/ghc-9.10.1/hlnt-3.8-72f7a199.log
):
Configuring library for hlint-3.8...
Preprocessing library for hlint-3.8...
Building library for hlint-3.8...
[ 1 of 62] Compiling EmbedData        ( src/EmbedData.hs, dist/build/EmbedData.o, dist/build/EmbedData.dyn_o )
[ 2 of 62] Compiling Extension        ( src/Extension.hs, dist/build/Extension.o, dist/build/Extension.dyn_o )
[ 3 of 62] Compiling Fixity           ( src/Fixity.hs, dist/build/Fixity.o, dist/build/Fixity.dyn_o )
src/Fixity.hs:55:49: error: [GHC-83865]
    • Couldn't match type ‘NoExtField’ with ‘NamespaceSpecifier’
      Expected: XFixitySig GhcPs
        Actual: NoExtField
    • In the first argument of ‘FixitySig’, namely ‘noExtField’
      In the expression:
        FixitySig noExtField [noLocA $ mkRdrUnqual (mkVarOcc name)] x
      In an equation for ‘toFixitySig’:
          toFixitySig (toFixity -> (name, x))
            = FixitySig noExtField [noLocA $ mkRdrUnqual (mkVarOcc name)] x
   |
55 | toFixitySig (toFixity -> (name, x)) = FixitySig noExtField [noLocA $ mkRdrUnqual (mkVarOcc name)] x
   |                                                 ^^^^^^^^^^

[ 4 of 62] Compiling GHC.Util.ApiAnnotation ( src/GHC/Util/ApiAnnotation.hs, dist/build/GHC/Util/ApiAnnotation.o, dist/build/GHC/Util/ApiAnnotation.dyn_o )
src/GHC/Util/ApiAnnotation.hs:48:27: error: [GHC-76037]
    Not in scope: data constructor ‘EpaEofComment’
    Suggested fix:
      Perhaps use one of these:
        ‘EpaDocComment’ (imported from GHC.Parser.Annotation),
        ‘EpaComment’ (imported from GHC.Parser.Annotation)
   |
48 | comment_ (L _ (EpaComment EpaEofComment _)) = ""
   |                           ^^^^^^^^^^^^^

src/GHC/Util/ApiAnnotation.hs:58:10: error: [GHC-76037]
    Not in scope: data constructor ‘EpAnnNotUsed’
   |
58 | comments EpAnnNotUsed = emptyComments
   |          ^^^^^^^^^^^^

[ 5 of 62] Compiling GHC.Util.Brackets ( src/GHC/Util/Brackets.hs, dist/build/GHC/Util/Brackets.o, dist/build/GHC/Util/Brackets.dyn_o )
src/GHC/Util/Brackets.hs:29:18: error: [GHC-27346]
    • The data constructor ‘HsPar’ should have 2 arguments, but has been given 4
    • In the pattern: HsPar _ _ (L _ SectionL {}) _
      In the pattern: L _ (HsPar _ _ (L _ SectionL {}) _)
      In an equation for ‘remParen’:
          remParen (L _ (HsPar _ _ (L _ SectionL {}) _)) = Nothing
   |
29 |   remParen (L _ (HsPar _ _ (L _ SectionL{}) _)) = Nothing
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/GHC/Util/Brackets.hs:111:18: error: [GHC-27346]
    • The data constructor ‘ParPat’ should have 2 arguments, but has been given 4
    • In the pattern: ParPat _ _ x _
      In the pattern: L _ (ParPat _ _ x _)
      In an equation for ‘remParen’:
          remParen (L _ (ParPat _ _ x _)) = Just x
    |
111 |   remParen (L _ (ParPat _ _ x _)) = Just x
    |                  ^^^^^^^^^^^^^^

src/GHC/Util/Brackets.hs:154:33: error: [GHC-88464]
    Data constructor not in scope: EpAnnNotUsed :: AnnParen
    |
154 |   addParen e = noLocA $ HsParTy EpAnnNotUsed e
    |                                 ^^^^^^^^^^^^

[ 6 of 62] Compiling GHC.Util.DynFlags ( src/GHC/Util/DynFlags.hs, dist/build/GHC/Util/DynFlags.o, dist/build/GHC/Util/DynFlags.dyn_o )
[ 7 of 62] Compiling GHC.Util.FreeVars ( src/GHC/Util/FreeVars.hs, dist/build/GHC/Util/FreeVars.o, dist/build/GHC/Util/FreeVars.dyn_o )
src/GHC/Util/FreeVars.hs:103:18: error: [GHC-76037]
    Not in scope: data constructor ‘HsLamCase’
    Suggested fix: Perhaps use ‘LamCase’ (imported from GHC.Hs)
    |
103 |   freeVars (L _ (HsLamCase _ _ MG{mg_alts=(L _ ms)})) = free (allVars ms) -- Lambda case
    |                  ^^^^^^^^^

[ 8 of 62] Compiling GHC.Util.HsDecl  ( src/GHC/Util/HsDecl.hs, dist/build/GHC/Util/HsDecl.o, dist/build/GHC/Util/HsDecl.dyn_o )
[ 9 of 62] Compiling GHC.Util.Scope   ( src/GHC/Util/Scope.hs, dist/build/GHC/Util/Scope.o, dist/build/GHC/Util/Scope.dyn_o )
src/GHC/Util/Scope.hs:134:13: error: [GHC-27346]
    • The data constructor ‘IEVar’ should have 3 arguments, but has been given 2
    • In the pattern: IEVar _ y
      In the pattern: L _ (IEVar _ y)
      In an equation for ‘g’:
          g (L _ (IEVar _ y)) = Just $ tag == unwrapName y
    |
134 |     g (L _ (IEVar _ y)) = Just $ tag == unwrapName y
    |             ^^^^^^^^^

[10 of 62] Compiling GHC.Util.SrcLoc  ( src/GHC/Util/SrcLoc.hs, dist/build/GHC/Util/SrcLoc.o, dist/build/GHC/Util/SrcLoc.dyn_o )
[12 of 62] Compiling HsColour         ( src/HsColour.hs, dist/build/HsColour.o, dist/build/HsColour.dyn_o )
[13 of 62] Compiling Parallel         ( src/Parallel.hs, dist/build/Parallel.o, dist/build/Parallel.dyn_o )
[14 of 62] Compiling Paths_hlint      ( dist/build/autogen/Paths_hlint.hs, dist/build/Paths_hlint.o, dist/build/Paths_hlint.dyn_o )
[15 of 62] Compiling Refact           ( src/Refact.hs, dist/build/Refact.o, dist/build/Refact.dyn_o )
src/Refact.hs:47:26: error: [GHC-76037]
    Not in scope: type constructor or class ‘GHC.SrcSpanAnn'’
    NB: neither ‘GHC.Parser.Annotation’ nor ‘GHC.Types.SrcLoc’ export ‘SrcSpanAnn'’.
    Suggested fix:
      Perhaps use one of these:
        ‘GHC.SrcSpanAnnA’ (imported from GHC.Parser.Annotation),
        ‘GHC.SrcSpanAnnC’ (imported from GHC.Parser.Annotation),
        ‘GHC.SrcSpanAnnL’ (imported from GHC.Parser.Annotation)
   |
47 | toSSA :: GHC.GenLocated (GHC.SrcSpanAnn' a) e -> R.SrcSpan
   |                          ^^^^^^^^^^^^^^^

[17 of 62] Compiling Timing           ( src/Timing.hs, dist/build/Timing.o, dist/build/Timing.dyn_o )
[18 of 62] Compiling Util             ( src/Util.hs, dist/build/Util.o, dist/build/Util.dyn_o )
Error: [Cabal-7125]
Failed to build hlint-3.8 (which is required by exe:hlint from hlint-3.8). See the build log above for details.
@sirrus233
Copy link

Dupe of #1593

@shayne-fletcher
Copy link
Collaborator

closing as duplicate #1593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants