Re: cabal-install calls setup with unrecognised distpref flag

Hello all,
I decided to bring this to libraries@haskell.org too in case anyone had the
same problem before.
Cheers,
Pedro
On Wed, Aug 6, 2008 at 11:38, José Pedro Magalhães
Hello all,
Recently, while developing a package here in the group, we changed the build-type from "Simple" to "Custom" to allow for "cabal test". The Setup.hs simply calls defaultMainWithHooks with simpleUserHooks where runTests has been redefined.
The problem is that this change gives me the following error when invoking "cabal build" (after invoking "cabal configure"): setup.exe: Unrecognised flags: --distpref=dist
runhaskell Setup.hs build works fine, though. This happens on a win64 machine, cabal-install version 0.5.1 using version 1.4.0.1 of the library. On a mac there seem to be no problems, though.
Am I doing something wrong?
Thanks, Pedro

On Tue, 2008-08-19 at 11:37 +0200, José Pedro Magalhães wrote:
Hello all,
I decided to bring this to libraries@haskell.org too in case anyone had the same problem before.
It'll be a bug in cabal-install. It's passing a flag to a Setup.hs that was built with an older version of the Cabal lib that does not understand a new flag. What's not obvious to me is why it's passing the flag at all. I'd expect it only to do that if you passed --distpref when you invoke cabal-install. I've filed a ticket so we do not forget. If you have any more details, add them to the ticket. Actually, could you run the failing command with -v3 and show us the output (including the full command used). I'm interested in what value of distpref is being passed as that might give us a clue as to where it is coming from. Thanks. Duncan
On Wed, Aug 6, 2008 at 11:38, José Pedro Magalhães
wrote: Hello all, Recently, while developing a package here in the group, we changed the build-type from "Simple" to "Custom" to allow for "cabal test". The Setup.hs simply calls defaultMainWithHooks with simpleUserHooks where runTests has been redefined.
The problem is that this change gives me the following error when invoking "cabal build" (after invoking "cabal configure"): setup.exe: Unrecognised flags: --distpref=dist
runhaskell Setup.hs build works fine, though. This happens on a win64 machine, cabal-install version 0.5.1 using version 1.4.0.1 of the library. On a mac there seem to be no problems, though.
Am I doing something wrong?
Thanks, Pedro
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Tue, 2008-08-19 at 11:40 +0100, Duncan Coutts wrote:
On Tue, 2008-08-19 at 11:37 +0200, José Pedro Magalhães wrote:
Hello all,
I decided to bring this to libraries@haskell.org too in case anyone had the same problem before.
It'll be a bug in cabal-install. It's passing a flag to a Setup.hs that was built with an older version of the Cabal lib that does not understand a new flag. What's not obvious to me is why it's passing the flag at all. I'd expect it only to do that if you passed --distpref when you invoke cabal-install.
I've filed a ticket so we do not forget. If you have any more details, add them to the ticket.
Sorry, forgot to mention: http://hackage.haskell.org/trac/hackage/ticket/328 If you don't have an account see the front page for how to register or login with the guest account: http://hackage.haskell.org/trac/hackage/ Duncan
participants (2)
-
Duncan Coutts
-
José Pedro Magalhães