Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Unable to build ghc-mod with the current/recent setup #948

Open
mouse07410 opened this issue Mar 28, 2019 · 0 comments
Open

Unable to build ghc-mod with the current/recent setup #948

mouse07410 opened this issue Mar 28, 2019 · 0 comments

Comments

@mouse07410
Copy link

mouse07410 commented Mar 28, 2019

Nothing appears to work. Neither cabal install, nor cabal new-install, nor cabal install --constraint "network < 3.0.0.0 && >= 2.6.0.0". stack install also fails.

MacOS 10.14.4 (with Macports installed, and Macports-installed libiconv.dylib in /opt/local/lib), GHC-8.6.3 installed with the current ghcup, cabal-2.4.1.0, stack-1.9.3.

$ git clone https://github.com/DanielG/ghc-mod.git
. . . . .
$ cd ghc-mod
$  cabal install
Warning: The install command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Warning: the following files would be used as linker inputs, but linking is not being done: /usr/lib/libiconv.dylib /usr/lib/libiconv.dylib
Warning: ghc-mod.cabal:98:10: Tabs used as indentation at 98:10, 160:10
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: ghc-mod-5.9.0.0 (user goal)
[__1] next goal: base (dependency of ghc-mod)
[__1] rejecting: base-4.12.0.0/installed-4.1... (conflict: ghc-mod =>
base<4.11 && >=4.6.0.1)
[__1] rejecting: base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: base, ghc-mod)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc-mod, base

$ cabal new-install
Resolving dependencies...
Up to date
Warning: You asked to install executables, but there are no executables in
targets: . Perhaps you want to use --lib to install libraries instead.
$ 
$ stack init --ignore-subdirs --solver
Warning: /Users/ur20980/.stack/config.yaml: Unrecognized field in ConfigMonoid: resolver
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./


Warning: Cabal file warning in /Users/ur20980/src/ghc-mod/ghc-mod.cabal@ 98:10: Tabs used as
         indentation at 98:10, 160:10
Selecting the best among 15 snapshots...

* Rejected lts-13.14
    ghc-8.6.4 cannot be used for these packages:
        - ghc-mod
    base version 4.12.0.0 found
        - ghc-mod requires >=4.6.0.1 && <4.11
    ghc version 8.6.4 found
        - ghc-mod requires >=7.10 && <8.4
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded nightly-2019-03-28 build plan.    
Didn't see asif-5.0.2@sha256:c6ca85ba32d63480e79c21075fa73643713fd4b78d3038ecf2a6172159d9271e,4151 in your package indices.
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                Downloading timestamp                                                                           Downloading snapshot                                                                            Updating index                                                                                  Updated package index downloaded                                                                Update complete                                                                                 Populated index cache.    
* Rejected nightly-2019-03-28
    ghc-8.6.4 cannot be used for these packages:
        - ghc-mod
    base version 4.12.0.0 found
        - ghc-mod requires >=4.6.0.1 && <4.11
    ghc version 8.6.4 found
        - ghc-mod requires >=7.10 && <8.4
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-12.26 build plan.    
* Rejected lts-12.26
    ghc-8.4.4 cannot be used for these packages:
        - ghc-mod
    base version 4.11.1.0 found
        - ghc-mod requires >=4.6.0.1 && <4.11
    ghc version 8.4.4 found
        - ghc-mod requires >=7.10 && <8.4
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-11.22 build plan.    
* Partially matches lts-11.22
    cabal-helper not found
        - ghc-mod requires <0.9 && >=0.8.1.0
    extra version 1.6.9 found
        - ghc-mod requires <1.6 && >=1.4
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    haskell-src-exts version 1.20.2 found
        - ghc-mod requires <1.20 && >=1.18
    hlint version 2.1.10 found
        - ghc-mod requires <2.1 && >=2.0.8
    monad-journal version 0.8.1 found
        - ghc-mod requires >=0.4 && <0.8
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-10.10 build plan.    
* Partially matches lts-10.10
    cabal-helper not found
        - ghc-mod requires <0.9 && >=0.8.1.0
    extra version 1.6.4 found
        - ghc-mod requires <1.6 && >=1.4
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    monad-journal version 0.8.1 found
        - ghc-mod requires >=0.4 && <0.8
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-9.21 build plan.    
* Partially matches lts-9.21
    cabal-helper version 0.7.3.0 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    optparse-applicative version 0.13.2.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-8.24 build plan.    
* Partially matches lts-8.24
    cabal-helper version 0.7.3.0 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    hlint version 1.9.41 found
        - ghc-mod requires <2.1 && >=2.0.8
    optparse-applicative version 0.13.2.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-7.24 build plan.    
* Partially matches lts-7.24
    cabal-helper version 0.7.3.0 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    doctest version 0.11.2 found
        - ghc-mod requires <0.14 && >=0.11.3
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    haskell-src-exts version 1.17.1 found
        - ghc-mod requires <1.20 && >=1.18
    hlint version 1.9.35 found
        - ghc-mod requires <2.1 && >=2.0.8
    optparse-applicative version 0.12.1.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-6.35 build plan.    
* Partially matches lts-6.35
    Cabal version 1.22.8.0 found
        - ghc-mod requires <2.1 && >=1.24
    cabal-helper version 0.6.3.1 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    doctest version 0.11.2 found
        - ghc-mod requires <0.14 && >=0.11.3
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    haskell-src-exts version 1.17.1 found
        - ghc-mod requires <1.20 && >=1.18
    hlint version 1.9.35 found
        - ghc-mod requires <2.1 && >=2.0.8
    optparse-applicative version 0.12.1.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-5.18 build plan.    
* Partially matches lts-5.18
    Cabal version 1.22.8.0 found
        - ghc-mod requires <2.1 && >=1.24
    cabal-doctest not found
        - ghc-mod requires <1.1 && >=1
    cabal-helper version 0.6.3.1 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    doctest version 0.10.1 found
        - ghc-mod requires <0.14 && >=0.11.3
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    haskell-src-exts version 1.17.1 found
        - ghc-mod requires <1.20 && >=1.18
    hlint version 1.9.31 found
        - ghc-mod requires <2.1 && >=2.0.8
    optparse-applicative version 0.12.1.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-4.2 build plan.    
* Partially matches lts-4.2
    Cabal version 1.22.6.0 found
        - ghc-mod requires <2.1 && >=1.24
    cabal-doctest not found
        - ghc-mod requires <1.1 && >=1
    cabal-helper version 0.6.3.0 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    criterion version 1.1.0.0 found
        - ghc-mod requires <1.2 && >=1.1.1.0
    doctest version 0.10.1 found
        - ghc-mod requires <0.14 && >=0.11.3
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    haskell-src-exts version 1.17.1 found
        - ghc-mod requires <1.20 && >=1.18
    hlint version 1.9.26 found
        - ghc-mod requires <2.1 && >=2.0.8
    optparse-applicative version 0.12.0.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-3.22 build plan.    
* Partially matches lts-3.22
    Cabal version 1.22.6.0 found
        - ghc-mod requires <2.1 && >=1.24
    cabal-doctest not found
        - ghc-mod requires <1.1 && >=1
    cabal-helper not found
        - ghc-mod requires <0.9 && >=0.8.1.0
    criterion version 1.1.0.0 found
        - ghc-mod requires <1.2 && >=1.1.1.0
    doctest version 0.10.1 found
        - ghc-mod requires <0.14 && >=0.11.3
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    haskell-src-exts version 1.16.0.1 found
        - ghc-mod requires <1.20 && >=1.18
    hlint version 1.9.22 found
        - ghc-mod requires <2.1 && >=2.0.8
    optparse-applicative version 0.11.0.2 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-2.22 build plan.    
* Rejected lts-2.22
    ghc-7.8.4 cannot be used for these packages:
        - ghc-mod
    ghc version 7.8.4 found
        - ghc-mod requires >=7.10 && <8.4
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-1.15 build plan.    
* Rejected lts-1.15
    ghc-7.8.4 cannot be used for these packages:
        - ghc-mod
    ghc version 7.8.4 found
        - ghc-mod requires >=7.10 && <8.4
    Using package flags:
        - ghc-mod: shelltest = False

Downloaded lts-0.7 build plan.    
* Rejected lts-0.7
    ghc-7.8.3 cannot be used for these packages:
        - ghc-mod
    ghc version 7.8.3 found
        - ghc-mod requires >=7.10 && <8.4
    Using package flags:
        - ghc-mod: shelltest = False

Selected resolver: lts-9.21
*** Resolver lts-9.21 will need external packages: 
    cabal-helper version 0.7.3.0 found
        - ghc-mod requires <0.9 && >=0.8.1.0
    ghc-mod-core not found
        - ghc-mod requires ==5.9.0.0
    optparse-applicative version 0.13.2.0 found
        - ghc-mod requires ==0.14.*
    Using package flags:
        - ghc-mod: shelltest = False

Using resolver: lts-9.21
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.0.2.                                      
Installed GHC.                                                                  

Warning: Installed version of cabal-install (2.4.1.0) is newer than stack has been tested with.  If you run into difficulties, consider downgrading.
         
Using compiler: ghc-8.0.2
Asking cabal to calculate a build plan...
Trying with packages from lts-9.21 as hard constraints...
Attempt failed.

>>>> Cabal errors begin
Warning: The install command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Warning: cannot determine version of /opt/local/bin/strip :
""
Warning: /Users/ur20980/src/ghc-mod/ghc-mod.cabal:98:10: Tabs used as
indentation at 98:10, 160:10
CallStack (from HasCallStack):
  die', called at ./Distribution/Client/Install.hs:238:21 in main:Distribution.Client.Install
cabal: Could not resolve dependencies:
[__0] trying: ghc-mod-5.9.0.0 (user goal)
[__1] rejecting: ghc-mod:!test (constraint from config file, command line
flag, or user target requires opposite flag selection)
[__1] trying: ghc-mod:*test
[__2] next goal: cabal-helper (dependency of ghc-mod *test)
[__2] rejecting: cabal-helper-0.8.1.2, cabal-helper-0.8.0.2,
cabal-helper-0.8.0.1, cabal-helper-0.8.0.0 (constraint from main config
/private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/cabal-solver80090/cabal.config
requires ==0.7.3.0)
[__2] rejecting: cabal-helper-0.7.3.0 (conflict: ghc-mod *test =>
cabal-helper<0.9 && >=0.8.1.0)
[__2] rejecting: cabal-helper-0.7.2.0, cabal-helper-0.7.1.0,
cabal-helper-0.6.3.1, cabal-helper-0.6.3.0, cabal-helper-0.6.2.0,
cabal-helper-0.6.1.0, cabal-helper-0.6.0.0, cabal-helper-0.5.3.0,
cabal-helper-0.5.1.0, cabal-helper-0.5.0.0, cabal-helper-0.4.0.0,
cabal-helper-0.3.9.0, cabal-helper-0.3.8.0, cabal-helper-0.3.7.0,
cabal-helper-0.3.6.0, cabal-helper-0.3.5.0, cabal-helper-0.3.4.0,
cabal-helper-0.3.3.0, cabal-helper-0.3.2.1, cabal-helper-0.3.2.0,
cabal-helper-0.3.1.0, cabal-helper-0.3.0.0, cabal-helper-0.2.0.0,
cabal-helper-0.1.0.1, cabal-helper-0.1.0.0, cabal-helper-0.8.1.1,
cabal-helper-0.8.1.0, cabal-helper-0.7.0.1, cabal-helper-0.5.2.0 (constraint
from main config
/private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/cabal-solver80090/cabal.config
requires ==0.7.3.0)
[__2] fail (backjumping, conflict set: cabal-helper, ghc-mod, ghc-mod:test)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc-mod (106), cabal-helper (35),
ghc-mod:test (4)

<<<< Cabal errors end

Could not parse cabal-install errors:

>>>> Cabal errors begin
Warning: The install command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Warning: cannot determine version of /opt/local/bin/strip :
""
Warning: /Users/ur20980/src/ghc-mod/ghc-mod.cabal:98:10: Tabs used as
indentation at 98:10, 160:10
CallStack (from HasCallStack):
  die', called at ./Distribution/Client/Install.hs:238:21 in main:Distribution.Client.Install
cabal: Could not resolve dependencies:
[__0] trying: ghc-mod-5.9.0.0 (user goal)
[__1] rejecting: ghc-mod:!test (constraint from config file, command line
flag, or user target requires opposite flag selection)
[__1] trying: ghc-mod:*test
[__2] next goal: cabal-helper (dependency of ghc-mod *test)
[__2] rejecting: cabal-helper-0.8.1.2, cabal-helper-0.8.0.2,
cabal-helper-0.8.0.1, cabal-helper-0.8.0.0 (constraint from main config
/private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/cabal-solver80090/cabal.config
requires ==0.7.3.0)
[__2] rejecting: cabal-helper-0.7.3.0 (conflict: ghc-mod *test =>
cabal-helper<0.9 && >=0.8.1.0)
[__2] rejecting: cabal-helper-0.7.2.0, cabal-helper-0.7.1.0,
cabal-helper-0.6.3.1, cabal-helper-0.6.3.0, cabal-helper-0.6.2.0,
cabal-helper-0.6.1.0, cabal-helper-0.6.0.0, cabal-helper-0.5.3.0,
cabal-helper-0.5.1.0, cabal-helper-0.5.0.0, cabal-helper-0.4.0.0,
cabal-helper-0.3.9.0, cabal-helper-0.3.8.0, cabal-helper-0.3.7.0,
cabal-helper-0.3.6.0, cabal-helper-0.3.5.0, cabal-helper-0.3.4.0,
cabal-helper-0.3.3.0, cabal-helper-0.3.2.1, cabal-helper-0.3.2.0,
cabal-helper-0.3.1.0, cabal-helper-0.3.0.0, cabal-helper-0.2.0.0,
cabal-helper-0.1.0.1, cabal-helper-0.1.0.0, cabal-helper-0.8.1.1,
cabal-helper-0.8.1.0, cabal-helper-0.7.0.1, cabal-helper-0.5.2.0 (constraint
from main config
/private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/cabal-solver80090/cabal.config
requires ==0.7.3.0)
[__2] fail (backjumping, conflict set: cabal-helper, ghc-mod, ghc-mod:test)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc-mod (106), cabal-helper (35),
ghc-mod:test (4)

<<<< Cabal errors end

CallStack (from HasCallStack):
  error, called at src/Stack/Solver.hs:131:25 in stack-1.9.3-AFEUqDV1V61AarVAbZ7WId:Stack.Solver
$ stack build
Warning: /Users/ur20980/.stack/config.yaml: Unrecognized field in ConfigMonoid: resolver
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
$ stack init --solver
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
- bench/data/simple-cabal/
- core/
- shelltest/browse/cabal/
- test/data/broken-cabal/
- test/data/broken-sandbox/
- test/data/cabal-flags/
- test/data/cabal-preprocessors/
- test/data/cabal-project/
- test/data/check-test-subdir/
- test/data/custom-cradle/
- test/data/duplicate-pkgver/
- test/data/file-mapping/duplicate-main/
- test/data/ghc-mod-check/
- test/data/pattern-synonyms/
- test/data/stack-project/
- test/manual/not-interpreted-error/proj/


Warning: Cabal file warning in /Users/ur20980/src/ghc-mod/ghc-mod.cabal@ 98:10: Tabs used as
         indentation at 98:10, 160:10
Unable to parse cabal file /Users/ur20980/src/ghc-mod/test/data/broken-cabal/broken.cabal

- 0:0: "name" field missing

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

No branches or pull requests

1 participant