cabal
cabal copied to clipboard
--extra-include-dirs and --extra-lib-dirs not respected when building Setup itself
As you may be aware, the first thing that Cabal does upon configure is, if there is a Setup.hs script, attempt to compile it. This compilation does not appear to respect the usual options that apply to every other compilation, including the two named above: --extra-include-dirs and --extra-lib-dirs.
This is a problem, because some systems do not have global /usr and /lib directories, but rather put these things elsewhere. In particular, it has always been the case on the Mac really that one is supposed to be using paths within the SDK directory rather than global paths, to allow for compilation to target other versions of OS X than the one currently running. Now in this year's 10.NDA release, the global paths are removed entirely.
This problem appears to apply regardless of whether the paths are specified in ~/.cabal/config, or on the command line.
Things have gotten to this point without totally breaking because not every package uses a custom Setup.hs, so this build step doesn't always need to be done.
Tested on: cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library
I'll have a pull request shortly for everyone to ignore. You're welcome.