strange cabal error

Hello, I recently ran into a strange cabal error. When trying to configure a package (leksah 0.1.1) I get the following error: MacBook-Pro:leksah-0.1.1 jwl$ runhaskell Setup.lhs configure Configuring leksah-0.1.1... Setup.lhs: ghc version >=6.2 is required but the version of /usr/local/bin/ghc could not be determined. MacBook-Pro:leksah-0.1.1 jwl$ /usr/local/bin/ghc --version The Glorious Glasgow Haskell Compilation System, version 6.8.2 This is on Mac OS 10.5.2, with GHC 6.8.2 (installed from Manuel C.'s binary package). Thus far several other packages have built and installed just fine (bytestring, binary, parsec, gtk2hs (from source, not darwinports)). Looking through leksah.cabal and Setup.lhs, I didn't see anything unusual (although I'm far from a cabal expert). I only found one relevant result from google, a Nov. 20th message on cabal-devel about another user getting this message on Debian with ghc 6.8.1. He reported getting this message when running install from a directory without write permissions. It doesn't seem to be a permissions problem for me; I do have write permissions for the directory in which I'm running cabal and all subdirectories. Can anyone tell me what's going on, or give me any advice to try? Would a different version of cabal possibly work? Thanks, John Lato

On Fri, 2008-05-23 at 15:07 -0500, John Lato wrote:
Hello,
I recently ran into a strange cabal error. When trying to configure a package (leksah 0.1.1) I get the following error:
MacBook-Pro:leksah-0.1.1 jwl$ runhaskell Setup.lhs configure Configuring leksah-0.1.1... Setup.lhs: ghc version >=6.2 is required but the version of /usr/local/bin/ghc could not be determined.
MacBook-Pro:leksah-0.1.1 jwl$ /usr/local/bin/ghc --version The Glorious Glasgow Haskell Compilation System, version 6.8.2
Run the configure step again with -v3, we should be able to see in the log exactly what string we got back from ghc. Also, to make sure you're using the version of the Cabal library you expect, try: ghc --make Setup.hs -package Cabal-1.2.3.0 ./Setup configure That way we know what we're using, even if you happen to have multiple versions of Cabal installed or if runhaskell happens to point at hugs rather than ghc. Duncan

On Sat, May 24, 2008 at 4:36 AM, Duncan Coutts
Run the configure step again with -v3, we should be able to see in the log exactly what string we got back from ghc.
Also, to make sure you're using the version of the Cabal library you expect, try:
ghc --make Setup.hs -package Cabal-1.2.3.0 ./Setup configure
That way we know what we're using, even if you happen to have multiple versions of Cabal installed or if runhaskell happens to point at hugs rather than ghc.
Duncan
Duncan, thanks for replying. Trying to use ghc --make Setup.hs failed with a bunch of linker errors, (although ghc-pkg reported that only Cabal-1.2.3.0 was installed), so somehow my Cabal libs must have gotten messed up. Anyway, rebuilding and reinstalling ghc fixed it. I don't know why cabal didn't fail on the other packages, maybe I forgot to clean them before I re-ran configure. I also don't know how the library got messed up; maybe I modified some other package that cabal depends on. Thanks, John
participants (2)
-
Duncan Coutts
-
John Lato