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

--allow-newer suddenly requires Cabal >=1.19.2 to be available #2023

Closed
edsko opened this issue Aug 2, 2014 · 5 comments · Fixed by #8199
Closed

--allow-newer suddenly requires Cabal >=1.19.2 to be available #2023

edsko opened this issue Aug 2, 2014 · 5 comments · Fixed by #8199

Comments

@edsko
Copy link
Contributor

edsko commented Aug 2, 2014

# cabal install pandoc-1.12.4.2 -j1 --avoid-reinstalls --allow-newer --constraint texmath==0.6.7
Resolving dependencies...
Failed to install pandoc-1.12.4.2
cabal: Error: some packages failed to install:
pandoc-1.12.4.2 failed during the configure step. The exception was:
user error (The package 'pandoc' requires Cabal library version >=1.19.2 &&
>=1.10 but no suitable version is installed.)

[scratchpad-783 ~/env]
# ghc-pkg list | grep Cabal
    Cabal-1.18.1.3

This seems a spurious requirement, and is annoying because it very useful that the cabal binary can be copied from one Haskell install to another without bootstrapping it (more specifically, without copying anything else -- just the binary).

@23Skidoo 23Skidoo self-assigned this Aug 2, 2014
@23Skidoo
Copy link
Member

23Skidoo commented Aug 2, 2014

This seems a spurious requirement

No, Setup.hs scripts compiled against Cabal < 1.19.2 don't support --exact-configuration which is needed for --allow-newer to work.

and is annoying because it very useful that the cabal binary can be copied from one Haskell install to another without bootstrapping it (more specifically, without copying anything else -- just the binary).

Note that you can use cabal-install itself to install a newer version of Cabal.

@23Skidoo 23Skidoo closed this as completed Aug 2, 2014
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Aug 2, 2014
23Skidoo added a commit that referenced this issue Aug 2, 2014
@mietek
Copy link
Contributor

mietek commented Aug 14, 2014

Can we agree the error message is confusing, and should be improved?

I just ran into this while trying to get hscurses to build with GHC 7.8:

$ cabal sandbox init
Writing a default package environment file to
/private/tmp/allow/cabal.sandbox.config
Using an existing sandbox located at /private/tmp/allow/.cabal-sandbox

$ cabal install --allow-newer=unix hscurses
Resolving dependencies...
Notice: installing into a sandbox located at /private/tmp/allow/.cabal-sandbox
Configuring transformers-0.4.1.0...
Failed to install transformers-0.4.1.0
Build log ( /private/tmp/allow/.cabal-sandbox/logs/transformers-0.4.1.0.log ):
cabal: Error: some packages failed to install:
hscurses-1.4.1.2 depends on transformers-0.4.1.0 which failed to install.
mtl-2.2.1 depends on transformers-0.4.1.0 which failed to install.
transformers-0.4.1.0 failed during the configure step. The exception was:
user error (The package 'transformers' requires Cabal library version >=1.19.2
&& >=1.6 but no suitable version is installed.)

This stumped me for a while, as transformers does not actually require the Cabal library. Finally, I realised allow-newer is a recent addition to Cabal, and therefore the error message is most likely spurious.

mf59816 pushed a commit to liqd/thentos that referenced this issue Mar 28, 2015
- Bump attoparsec to contain haskell/attoparsec#79
- Remove work-around for haskell/cabal#2023
  (we don't need --alow-newer any more)
@23Skidoo 23Skidoo reopened this Mar 30, 2015
@23Skidoo
Copy link
Member

Reopening: error message should be improved.

@ttuegel ttuegel added this to the cabal-install-1.24 milestone Apr 24, 2015
jdnavarro added a commit to jdnavarro/smallcheck-lens that referenced this issue Sep 8, 2015
There are conflicts with upper bounds in `lens`.

Cabal needs to be reinstalled for `--allow-newers`, see
haskell/cabal#2023.

Even after that utf8-string gives issues with bytestring
@23Skidoo 23Skidoo modified the milestones: cabal-install 1.24, cabal-install 1.26 Feb 21, 2016
@23Skidoo 23Skidoo removed their assignment Jul 27, 2016
@ezyang ezyang modified the milestone: cabal-install 2.0 Sep 6, 2016
@ulysses4ever ulysses4ever added the re: error-message Concerning error messages delivered to the user label Jun 4, 2022
@ulysses4ever
Copy link
Collaborator

ulysses4ever commented Jun 5, 2022

Couple notes:

The error message could be something like: Current build configuration/flags requires Cabal library version >=1.19.2 && >=1.10 to build 'pandoc', but no suitable version is installed (instead of The package 'pandoc' requires Cabal library version >=1.19.2 && >=1.10 but no suitable version is installed). But I'm not sure if this message can appear under circumstances other than those presented in this issue (i.e. --allow-newer+ only Cabal < 1.19.2 available).

Another way to fight it could be to drop the check (referenced in the second bullet-point above) altogether on the grounds that cabal-install-3.x and future would hardly build with Cabal < 1.19.2. How does that sound?

@Mikolaj
Copy link
Member

Mikolaj commented Jun 6, 2022

Another way to fight it could be to drop the check (referenced in the second bullet-point above) altogether on the grounds that cabal-install-3.x and future would hardly build with Cabal < 1.19.2. How does that sound?

That's a good idea. Cabal 1.19.2 is way beyond our 5 years support window (https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md). We are currently on the verge of dropping 1.22 or 1.24 IIRC.

ulysses4ever added a commit that referenced this issue Jun 6, 2022
…9.2 (close #2023)

We used to check that, under presence of --allow-newer/older, Cabal version is >=1.19.2 (earlier versions don't get these flags), but we no longer support <.1.19.2 anyway, so the check is not needed. Remove.
ulysses4ever added a commit that referenced this issue Jun 6, 2022
…9.2 (close #2023)

We used to check that, under presence of --allow-newer/older, Cabal version is >=1.19.2 (earlier versions don't get these flags), but we no longer support <.1.19.2 anyway, so the check is not needed. Remove.
ulysses4ever added a commit that referenced this issue Jun 6, 2022
…9.2 (close #2023)

We used to check that, under presence of --allow-newer/older, Cabal version is >=1.19.2 (earlier versions don't get these flags), but we no longer support <.1.19.2 anyway, so the check is not needed. Remove.
ulysses4ever added a commit that referenced this issue Jun 6, 2022
…9.2 (close #2023)

We used to check that, under presence of --allow-newer/older, Cabal version is >=1.19.2 (earlier versions don't get these flags), but we no longer support <.1.19.2 anyway, so the check is not needed. Remove.
@mergify mergify bot closed this as completed in #8199 Jun 6, 2022
GuillaumeGen pushed a commit to tweag/cabal that referenced this issue Jun 17, 2022
…9.2 (close haskell#2023)

We used to check that, under presence of --allow-newer/older, Cabal version is >=1.19.2 (earlier versions don't get these flags), but we no longer support <.1.19.2 anyway, so the check is not needed. Remove.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants