cabal install passes --disable-benchmarks to setups built with Cabal lib versions that don't know that flag #932

bos opened this Issue May 24, 2012 · 2 comments


None yet

2 participants

Haskell member

(Imported from Trac #942, reported by @kosmikus on 2012-04-20)

Haskell member

(Imported comment by @creswick on 2012-04-20)

This bit me because I do all my work in sandboxes, so the system-installed version of Cabal was 1.12 (which came with ghc-7.2.x, I think 1.14 is needed for --disable-benchmarks).

cabal-installing Cabal-1.14.0 to my user-package db "fixed" the problem, because that cabal was then visible when building setup.hs; however, that's an unfortunate (and non-obvious) requirement.
Explicitly specifying the build-dependencies for setup.hs would help with this, and other similar build failures enormously.

I think cabal-install makes the (implicit?) assumption that whatever version of Cabal it was built with is available when it is building setup.hs. That's not a safe assumption any longer -- it would help enormously if we could actually control the environment that setup.hs is built in; as it has /nothing/ to do with the dependencies of the actual program that you're trying to compile.

Haskell member

(Imported comment by refold on 2012-05-03)

The same probably applies to --disable-tests.

@23Skidoo 23Skidoo added a commit that closed this issue Nov 29, 2012
@23Skidoo 23Skidoo Don't pass unsupported flags to setups built with old Cabal versions.
We must not pass '--disable-benchmarks' to setup scripts built with Cabal <
1.14; the same is also true for '--disable-tests' and Cabal < 1.10.

Fixes #932 and #1004.

Without this patch:

    $ cabal install -w /path/to/ghc-7.2.1/bin/ghc syb
    unrecognized option `--disable-benchmarks'
    Failed to install syb-0.3.7

With this patch:

    $ cabal install -w /path/to/ghc-7.2.1/bin/ghc syb
    Registering syb-0.3.7...
    Installed syb-0.3.7
@23Skidoo 23Skidoo closed this in 582d12e Nov 29, 2012
@ekmett ekmett added a commit to ekmett/ad that referenced this issue May 15, 2015
@ekmett ekmett try the fix mentioned in haskell/cabal#932 da6a879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment