duncan.coutts at worc.ox.ac.uk
Tue Feb 24 17:51:43 EST 2009
On Tue, 2009-02-24 at 14:24 +0000, Neil Mitchell wrote:
> Cabal documents itself as having a --builddir command to change the
> placement of dist stuff, which is fantastic.
> However, running with GHC 6.8.3, Cabal 184.108.40.206, I get:
> cabal build --builddir=../../../_make/Tools/ext/haddock-0.9/dist
> setup.exe: Unrecognised flags:
> i.e. cabal accepts the --builddir command, but the setup that cabal
> builds doesn't. Why?
Hmm. Does your ghc-6.8 have Cabal-220.127.116.11 registered? If you built
Cabal-18.104.22.168 and cabal-install with ghc-6.10 but not also for 6.8 then
cabal-install will be forced to pick an older Cabal lib when compiling
Setup scripts for 6.8.
You can check what it is doing. Clean and run with -v3 and near the top
you should see something like:
Using external setup method with build-type Simple
Creating ./mydist/setup (and its parents)
Using Cabal library version 22.214.171.124
Using ./mydist/setup/setup.hs as setup script.
Setup script is out of date, compiling...
("/usr/local/bin/ghc-6.8.2",["-v","--make", ... etc
So if it's forced to pick an older Cabal lib version then the Setup will
not grok --builddir.
Really of course we should notice this earlier and complain that we
cannot use this new feature while using the older lib version. We should
file a ticket about that. In fact the whole issue with what the Setup
command line must accept is a tricky issue when it comes to working with
custom build systems.
More information about the cabal-devel