haskell / haskell/cabal

Cabal gets confused using with-compiler and the Custom build-type

Open
#2,091 2 comments 0 reactions 0 assignees View on GitHub
build-type: custom cabal-install: other old-milestone: cabal-install 2.0 type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I was debugging a Cabal issue with Dan Rosen today and I noticed an interesting error. The steps to reproduce went something like this:
1. The system GHC is 7.8.2, with Cabal 1.20 installed, call this install A
2. We made a local build of GHC 7.8.2 (with some custom patches), call this install B, which ships Cabal 1.18 by default
3. We made a Cabal sandbox to store the build products of install B, and attempted to install entropy using 'cabal install entropy --with-ghc=$INSTALL_B_GHC'

Expected result: installed fine

Actual result: configure step failed looking for Cabal 1.20, which was not available.

Further investigation determined that we were attempting to build the Setup script (entropy has build-type Custom) and Cabal was passing it `-package-id Cabal-1.20-HASH`, which it couldn't find because that package isn't in the sandbox or the inplace package database.

Tested on cabal-install 1.20.0.3 and Cabal 1.20.0.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.