shawwn / wiki

Research wiki
https://www.shawwn.com
51 stars 8 forks source link

issues with cabal v2-build #5

Open kaustavha opened 4 years ago

kaustavha commented 4 years ago

Hi, sorry might be dumb question. I followed the readme, but when i get to cabal v2-build for mac i get this error:

$ cabal v2-build

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: wiki-0.1.0.0 (user goal)
[__1] next goal: base (dependency of wiki)
[__1] rejecting: base-4.13.0.0/installed-4.13.0.0 (conflict: wiki =>
base>=4.12 && <4.13)
[__1] skipping: base-4.14.0.0, base-4.13.0.0 (has the same characteristics
that caused the previous version to fail: excluded by constraint '>=4.12 &&
<4.13' from 'wiki')
[__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, wiki)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, wiki

Not 100% sure how to proceed, any tips?

Context:

10713  brew install ghc cabal-install
10714  ghc -Wall -optl-fuse-ld=gold -rtsopts -threaded -O2 --make hakyll.hs
10715  cabal v2-build
10716  brew install s3cmd
10717  brew install tidy-html5
10718  brew install imagemagick
10719  brew install exiftool
10720  npm i -g mathjax-node-page
10721  curl https://gitlab.haskell.org/haskell/ghcup/raw/master/bootstrap-haskell -sSf | sh
10722  . "$HOME/.ghcup/env"
10723  echo '. $HOME/.ghcup/env' >> "$HOME/.bash_profile"
10724  cabal v2-build
10725  cabal v2-run wiki -- build
10726  cabal init -n --is-executable
10727  cabal v2-run
10728  cabal v2-build
10729  cabal v2-run wiki -- build

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

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

shawwn commented 4 years ago

Hmm. I wonder if stack is throwing it off somehow (though this seems unlikely). I'm not too familiar with the build ecosystem myself.

bb:~/wiki3$ stack --version
-bash: stack: command not found
bb:~/wiki3$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library 
bb:~/wiki3$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5

Can you post the output of cabal list --installed and ghc-pkg list? For reference, here's mine.

* Cabal
    Synopsis: A framework for packaging Haskell software
    Default available version: 3.0.0.0
    Installed versions: 2.4.0.1
    Homepage: http://www.haskell.org/cabal/
    License:  BSD3

* array
    Synopsis: Mutable and immutable arrays
    Default available version: 0.5.3.0
    Installed versions: 0.5.3.0
    License:  BSD3

* base
    Synopsis: Basic libraries
    Default available version: 4.12.0.0
    Installed versions: 4.12.0.0
    License:  BSD-3-Clause

* binary
    Synopsis: Binary serialisation for Haskell values using lazy ByteStrings
    Default available version: 0.8.7.0
    Installed versions: 0.8.6.0
    Homepage: https://github.com/kolmodin/binary
    License:  BSD3

* bytestring
    Synopsis: Fast, compact, strict and lazy byte strings with a list interface
    Default available version: 0.10.10.0
    Installed versions: 0.10.8.2
    Homepage: https://github.com/haskell/bytestring
    License:  BSD3

* containers
    Synopsis: Assorted concrete container types
    Default available version: 0.6.2.1
    Installed versions: 0.6.0.1
    License:  BSD3

* deepseq
    Synopsis: Deep evaluation of data structures
    Default available version: 1.4.4.0
    Installed versions: 1.4.4.0
    License:  BSD3

* directory
    Synopsis: Platform-agnostic library for filesystem operations
    Default available version: 1.3.4.0
    Installed versions: 1.3.3.0
    License:  BSD3

* filepath
    Synopsis: Library for manipulating FilePaths in a cross platform way.
    Default available version: 1.4.2.1
    Installed versions: 1.4.2.1
    Homepage: https://github.com/haskell/filepath#readme
    License:  BSD3

* ghc
    Synopsis: The GHC API
    Default available version: 8.6.5
    Installed versions: 8.6.5
    Homepage: http://www.haskell.org/ghc/
    License:  BSD3

* ghc-boot
    Synopsis: Shared functionality between GHC and its boot libraries
    Default available version: 8.6.5
    Installed versions: 8.6.5
    License:  BSD3

* ghc-boot-th
    Synopsis: Shared functionality between GHC and the `template-haskell`
              library
    Default available version: 8.6.5
    Installed versions: 8.6.5
    License:  BSD3

* ghc-compact
    Synopsis: In memory storage of deeply evaluated data structure
    Default available version: 0.1.0.0
    Installed versions: 0.1.0.0
    License:  BSD3

* ghc-heap
    Default available version: [ Not available from any configured repository ]
    Installed versions: 8.6.5
    License:  BSD-3-Clause

* ghc-prim
    Synopsis: GHC primitives
    Default available version: 0.5.3
    Installed versions: 0.5.3
    License:  BSD-3-Clause

* ghci
    Synopsis: The library supporting GHC's interactive interpreter
    Default available version: 8.6.5
    Installed versions: 8.6.5
    License:  BSD3

* haskeline
    Synopsis: A command-line interface for user input, written in Haskell.
    Default available version: 0.7.5.0
    Installed versions: 0.7.4.3
    Homepage: https://github.com/judah/haskeline
    License:  BSD3

* hpc
    Synopsis: Code Coverage Library for Haskell
    Default available version: 0.6.0.3
    Installed versions: 0.6.0.3
    License:  BSD3

* integer-gmp
    Synopsis: Integer library based on GMP
    Default available version: 1.0.2.0
    Installed versions: 1.0.2.0
    License:  BSD3

* libiserv
    Default available version: [ Not available from any configured repository ]
    Installed versions: 8.6.3
    License:  BSD-3-Clause

* mtl
    Synopsis: Monad classes, using functional dependencies
    Default available version: 2.2.2
    Installed versions: 2.2.2
    Homepage: http://github.com/haskell/mtl
    License:  BSD3

* parsec
    Synopsis: Monadic parser combinators
    Default available version: 3.1.14.0
    Installed versions: 3.1.13.0
    Homepage: https://github.com/haskell/parsec
    License:  BSD3

* pretty
    Synopsis: Pretty-printing library
    Default available version: 1.1.3.6
    Installed versions: 1.1.3.6
    Homepage: http://github.com/haskell/pretty
    License:  BSD3

* process
    Synopsis: Process libraries
    Default available version: 1.6.5.1
    Installed versions: 1.6.5.0
    License:  BSD3

* rts
    Default available version: [ Not available from any configured repository ]
    Installed versions: 1.0
    License:  BSD-3-Clause

* stm
    Synopsis: Software Transactional Memory
    Default available version: 2.5.0.0
    Installed versions: 2.5.0.0
    Homepage: https://wiki.haskell.org/Software_transactional_memory
    License:  BSD3

* template-haskell
    Synopsis: Support library for Template Haskell
    Default available version: 2.14.0.0
    Installed versions: 2.14.0.0
    License:  BSD3

* terminfo
    Synopsis: Haskell bindings to the terminfo library.
    Default available version: 0.4.1.4
    Installed versions: 0.4.1.2
    Homepage: https://github.com/judah/terminfo
    License:  BSD3

* text
    Synopsis: An efficient packed Unicode text type.
    Default available version: 1.2.4.0
    Installed versions: 1.2.3.1
    Homepage: https://github.com/haskell/text
    License:  BSD2

* time
    Synopsis: A time library
    Default available version: 1.9.3
    Installed versions: 1.8.0.2
    Homepage: https://github.com/haskell/time
    License:  BSD3

* transformers
    Synopsis: Concrete functor and monad transformers
    Default available version: 0.5.6.2
    Installed versions: 0.5.6.2
    License:  BSD3

* unix
    Synopsis: POSIX functionality
    Default available version: 2.7.2.2
    Installed versions: 2.7.2.2
    Homepage: https://github.com/haskell/unix
    License:  BSD3

* xhtml
    Synopsis: An XHTML combinator library
    Default available version: 3000.2.2.1
    Installed versions: 3000.2.2.1
    Homepage: https://github.com/haskell/xhtml
    License:  BSD3
/Users/bb/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/package.conf.d
    Cabal-2.4.0.1
    array-0.5.3.0
    base-4.12.0.0
    binary-0.8.6.0
    bytestring-0.10.8.2
    containers-0.6.0.1
    deepseq-1.4.4.0
    directory-1.3.3.0
    filepath-1.4.2.1
    (ghc-8.6.5)
    ghc-boot-8.6.5
    ghc-boot-th-8.6.5
    ghc-compact-0.1.0.0
    ghc-heap-8.6.5
    ghc-prim-0.5.3
    ghci-8.6.5
    haskeline-0.7.4.3
    hpc-0.6.0.3
    integer-gmp-1.0.2.0
    libiserv-8.6.3
    mtl-2.2.2
    parsec-3.1.13.0
    pretty-1.1.3.6
    process-1.6.5.0
    rts-1.0
    stm-2.5.0.0
    template-haskell-2.14.0.0
    terminfo-0.4.1.2
    text-1.2.3.1
    time-1.8.0.2
    transformers-0.5.6.2
    unix-2.7.2.2
    xhtml-3000.2.2.1

Also note that when I run cabal list --installed, I get:

Warning: The package list for 'hackage.haskell.org' is 300 days old.
Run 'cabal update' to get the latest list of available packages.

I suspect that some new version of a package is causing problems.

kaustavha commented 4 years ago

Hey! Sorry for the wait!

Hmm yea I see version mismatches all over, I'll try to change my deps to match your versions and see if that works.


 cabal list --installed
* Cabal
    Synopsis: A framework for packaging Haskell software
    Default available version: 3.2.0.0
    Installed versions: 3.0.1.0
    Homepage: http://www.haskell.org/cabal/
    License:  BSD3

* array
    Synopsis: Mutable and immutable arrays
    Default available version: 0.5.4.0
    Installed versions: 0.5.4.0
    License:  BSD3

* base
    Synopsis: Basic libraries
    Default available version: 4.14.0.0
    Installed versions: 4.13.0.0
    License:  BSD-3-Clause

* binary
    Synopsis: Binary serialisation for Haskell values using lazy ByteStrings
    Default available version: 0.8.8.0
    Installed versions: 0.8.7.0
    Homepage: https://github.com/kolmodin/binary
    License:  BSD3

* bytestring
    Synopsis: Fast, compact, strict and lazy byte strings with a list interface
    Default available version: 0.10.10.0
    Installed versions: 0.10.10.0
    Homepage: https://github.com/haskell/bytestring
    License:  BSD3

* containers
    Synopsis: Assorted concrete container types
    Default available version: 0.6.2.1
    Installed versions: 0.6.2.1
    License:  BSD3

* deepseq
    Synopsis: Deep evaluation of data structures
    Default available version: 1.4.4.0
    Installed versions: 1.4.4.0
    License:  BSD3

* directory
    Synopsis: Platform-agnostic library for filesystem operations
    Default available version: 1.3.6.1
    Installed versions: 1.3.6.0
    License:  BSD3

* filepath
    Synopsis: Library for manipulating FilePaths in a cross platform way.
    Default available version: 1.4.2.1
    Installed versions: 1.4.2.1
    Homepage: https://github.com/haskell/filepath#readme
    License:  BSD3

* ghc
    Synopsis: The GHC API
    Default available version: 8.10.1
    Installed versions: 8.8.3
    Homepage: http://www.haskell.org/ghc/
    License:  BSD-3-Clause

* ghc-boot
    Synopsis: Shared functionality between GHC and its boot libraries
    Default available version: 8.8.3
    Installed versions: 8.8.3
    License:  BSD3

* ghc-boot-th
    Synopsis: Shared functionality between GHC and the `template-haskell`
              library
    Default available version: 8.10.1
    Installed versions: 8.8.3
    License:  BSD3

* ghc-compact
    Synopsis: In memory storage of deeply evaluated data structure
    Default available version: 0.1.0.0
    Installed versions: 0.1.0.0
    License:  BSD3

* ghc-heap
    Default available version: [ Not available from any configured repository ]
    Installed versions: 8.8.3
    License:  BSD-3-Clause

* ghc-prim
    Synopsis: GHC primitives
    Default available version: 0.6.1
    Installed versions: 0.5.3
    License:  BSD-3-Clause

* ghci
    Synopsis: The library supporting GHC's interactive interpreter
    Default available version: 8.10.1
    Installed versions: 8.8.3
    License:  BSD3

* haskeline
    Synopsis: A command-line interface for user input, written in Haskell.
    Default available version: 0.8.0.0
    Installed versions: 0.7.5.0
    Homepage: https://github.com/judah/haskeline
    License:  BSD3

* hpc
    Synopsis: Code Coverage Library for Haskell
    Default available version: 0.6.0.3
    Installed versions: 0.6.0.3
    License:  BSD3

* integer-gmp
    Synopsis: Integer library based on GMP
    Default available version: 1.0.3.0
    Installed versions: 1.0.2.0
    License:  BSD3

* libiserv
    Default available version: [ Not available from any configured repository ]
    Installed versions: 8.8.3
    License:  BSD-3-Clause

* mtl
    Synopsis: Monad classes, using functional dependencies
    Default available version: 2.2.2
    Installed versions: 2.2.2
    Homepage: http://github.com/haskell/mtl
    License:  BSD3

* parsec
    Synopsis: Monadic parser combinators
    Default available version: 3.1.14.0
    Installed versions: 3.1.14.0
    Homepage: https://github.com/haskell/parsec
    License:  BSD3

* pretty
    Synopsis: Pretty-printing library
    Default available version: 1.1.3.6
    Installed versions: 1.1.3.6
    Homepage: http://github.com/haskell/pretty
    License:  BSD3

* process
    Synopsis: Process libraries
    Default available version: 1.6.10.0
    Installed versions: 1.6.8.0
    License:  BSD3

* rts
    Default available version: [ Not available from any configured repository ]
    Installed versions: 1.0
    License:  BSD-3-Clause

* stm
    Synopsis: Software Transactional Memory
    Default available version: 2.5.0.0
    Installed versions: 2.5.0.0
    Homepage: https://wiki.haskell.org/Software_transactional_memory
    License:  BSD3

* template-haskell
    Synopsis: Support library for Template Haskell
    Default available version: 2.16.0.0
    Installed versions: 2.15.0.0
    License:  BSD3

* terminfo
    Synopsis: Haskell bindings to the terminfo library.
    Default available version: 0.4.1.4
    Installed versions: 0.4.1.4
    Homepage: https://github.com/judah/terminfo
    License:  BSD3

* text
    Synopsis: An efficient packed Unicode text type.
    Default available version: 1.2.4.0
    Installed versions: 1.2.4.0
    Homepage: https://github.com/haskell/text
    License:  BSD2

* time
    Synopsis: A time library
    Default available version: 1.10
    Installed versions: 1.9.3
    Homepage: https://github.com/haskell/time
    License:  BSD3

* transformers
    Synopsis: Concrete functor and monad transformers
    Default available version: 0.5.6.2
    Installed versions: 0.5.6.2
    License:  BSD3

* unix
    Synopsis: POSIX functionality
    Default available version: 2.7.2.2
    Installed versions: 2.7.2.2
    Homepage: https://github.com/haskell/unix
    License:  BSD3

* xhtml
    Synopsis: An XHTML combinator library
    Default available version: 3000.2.2.1
    Installed versions: 3000.2.2.1
    Homepage: https://github.com/haskell/xhtml
    License:  BSD3

$ ghc-pkg list
/Users/kaustavhaldar/.ghcup/ghc/8.8.3/lib/ghc-8.8.3/package.conf.d
    Cabal-3.0.1.0
    array-0.5.4.0
    base-4.13.0.0
    binary-0.8.7.0
    bytestring-0.10.10.0
    containers-0.6.2.1
    deepseq-1.4.4.0
    directory-1.3.6.0
    filepath-1.4.2.1
    ghc-8.8.3
    ghc-boot-8.8.3
    ghc-boot-th-8.8.3
    ghc-compact-0.1.0.0
    ghc-heap-8.8.3
    ghc-prim-0.5.3
    ghci-8.8.3
    haskeline-0.7.5.0
    hpc-0.6.0.3
    integer-gmp-1.0.2.0
    libiserv-8.8.3
    mtl-2.2.2
    parsec-3.1.14.0
    pretty-1.1.3.6
    process-1.6.8.0
    rts-1.0
    stm-2.5.0.0
    template-haskell-2.15.0.0
    terminfo-0.4.1.4
    text-1.2.4.0
    time-1.9.3
    transformers-0.5.6.2
    unix-2.7.2.2
    xhtml-3000.2.2.1
kaustavha commented 4 years ago

Trying adding this to wiki.cabal but it didnt help build-depends: array ==0.5.3.0, base >=4.12 && <4.13, bytestring ==0.10.8.2, containers ==0.6.0.1, text ==1.2.3.1, directory ==1.3.3, ghc ==8.6.5, ghc-boot-th ==8.6.5, pandoc >=2.7.2 && <= 2.7.3, MissingH ==1.4.1.0, pretty-show ==1.9.5, aeson ==1.4.2.0, tagsoup == 0.14.7, arxiv == 0.0.1, hakyll == 4.12.5.2, filestore ==0.6.3.4, time ==1.8.0.2

Seems ill have to manually individually uninstall, unregister and reinstall each mismatching dep 😬