Skip to content

Cabal Stuck On Installing Package Failure #7005

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

Closed
dtheras opened this issue Aug 4, 2020 · 2 comments
Closed

Cabal Stuck On Installing Package Failure #7005

dtheras opened this issue Aug 4, 2020 · 2 comments

Comments

@dtheras
Copy link

dtheras commented Aug 4, 2020

Issue

I attempted to install 'hakyll' library package but cabal failed (banal - the package is out of date - submitted a pr).

cabal install --lib hakyll

HOWEVER, now attempting to install any other library produces the failed-to-install-hakyll message (see below).

cabal install --lib process
cabal install --lib yesod-core
cabal install --lib lifted-base

All three commands produce identical "failed to install hakyll" message, which is erroneous since obviously none of these depend on hakyll. I have never seen this behavior before.

Notes

  • Using new-install produces the same message about failing to install hakyll.
  • Attempting 'cabal install (package)' succeeds, but the follow up 'cabal install --lib (package)' still fails with the same hakyll warning.
  • Working directory is not in any folder with a cabal file. I've attempted the three lines in 4 different locations with identical results.

System

I am on recent macOS Catalina with the current ghc-8.10.1 / cabal-3.2.0.0

Banal failed to install hakyll message:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: base-4.14.0.0/installed-4.14.0.0 (user goal)
[__1] trying: ghc-8.10.1/installed-8.10.1 (user goal)
[__2] next goal: hakyll (user goal)
[__2] rejecting: hakyll-4.13.4.0 (conflict: ghc =>
template-haskell==2.16.0.0/installed-2.16.0.0, hakyll =>
template-haskell>=2.14 && <2.16)
[__2] rejecting: hakyll-4.13.3.0, 
....
[__2] fail (backjumping, conflict set: ghc, hakyll)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: hakyll, ghc, base
@dtheras dtheras closed this as completed Aug 7, 2020
@dtheras dtheras reopened this Aug 7, 2020
@fgaz
Copy link
Member

fgaz commented Aug 8, 2020

cabal install --lib has some problems handling subsequent installations at the moment, see #5559

If you really need to install them, try removing the default environment file (~/.ghc/<arch>-<version>/environments/default) and then installing them all together instead (cabal install --lib hakyll process yesod-core lifted-base). Or you could try @phadej's cabal-env, which is a prototype of a future cabal env command (#6841).

By the way, what is your use case for globally installing those libraries? Your needs might be served better by making a cabal package and putting those libraries in the build depends field (isolated and declarative)

@gbaz gbaz added the type: bug label Sep 11, 2021
@gbaz
Copy link
Collaborator

gbaz commented Sep 11, 2021

closing in favor of the above linked ticket.

@gbaz gbaz closed this as completed Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants