Cabal 1.4.0.1 on Debian Stable/GHC 6.6

Hi, On a Debian stable (etch) system, I have the following packages installed: jochem@huygens:/tmp/Cabal-1.4.0.1$ dpkg -l | grep ghc ii ghc6 6.6-3 GHC - the Glasgow Haskell Compilation system ii ghc6-prof 6.6-3 Profiling libraries for the Glasgow Haskell ii libghc6-filepath-dev 0.11-2 GHC 6 library for manipulating FilePath's ii libghc6-mtl-dev 1.0-3 Haskell monad transformer library for GHC ii libghc6-network-dev 2.0-3 Haskell network library for GHC jochem@huygens:/tmp/Cabal-1.4.0.1$ ghc-pkg list /usr/lib/ghc-6.6/package.conf: Cabal-1.1.6, (FilePath-0.11), base-2.0, filepath-1.1.0.0, (ghc-6.6), haskell98-1.0, mtl-1.0, network-2.0, parsec-2.0, readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0, stm-2.0, template-haskell-2.0, unix-1.0 jochem@huygens:/tmp/Cabal-1.4.0.1$ I compiled Setup.hs, ran './Setup configure', './Setup build' and finally as root './Setup install'. Then ghc-pkg list gave: jochem@huygens:/tmp/bimap-0.2.2$ ghc-pkg list /usr/lib/ghc-6.6/package.conf: Cabal-1.1.6, Cabal-1.4.0.1, (FilePath-0.11), base-2.0, filepath-1.1.0.0, (ghc-6.6), haskell98-1.0, mtl-1.0, network-2.0, parsec-2.0, readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0, stm-2.0, template-haskell-2.0, unix-1.0 jochem@huygens:/tmp/bimap-0.2.2$ But Cabal seems to be broken; for example, with the bimap package from Hackage: jochem@huygens:/tmp/bimap-0.2.2$ runghc Setup.lhs configure Configuring bimap-0.2.2... Setup.lhs: ghc version >=6.4 is required but the version of /usr/bin/ghc could not be determined. jochem@huygens:/tmp/bimap-0.2.2$ Cabal 1.2.3.0 seems to be working. What am I doing wrong? Or is this an unsupported combination? -- Jochem Berndsen | jochem@functor.nl GPG: 0xE6FABFAB

On Tue, 2008-06-24 at 10:51 +0200, Jochem Berndsen wrote:
Hi,
On a Debian stable (etch) system, I have the following packages installed:
jochem@huygens:/tmp/Cabal-1.4.0.1$ dpkg -l | grep ghc ii ghc6 6.6-3
Ok, so that's actually ghc-6.6 not 6.6.1
jochem@huygens:/tmp/bimap-0.2.2$ runghc Setup.lhs configure Configuring bimap-0.2.2... Setup.lhs: ghc version >=6.4 is required but the version of /usr/bin/ghc could not be determined. jochem@huygens:/tmp/bimap-0.2.2$
Cabal 1.2.3.0 seems to be working. What am I doing wrong? Or is this an unsupported combination?
It's an untested combination. I checked it with 6.6.1 but not 6.6. It is supposed to work (indeed it's supposed to work with 6.4) so we should figure out what's going wrong. Can you : $ runghc Setup.lhs configure -v3 It should give more detail about how Cabal called ghc and what string value it returned. Duncan

On Tue, 2008-06-24 at 10:57 +0100, Duncan Coutts wrote:
jochem@huygens:/tmp/bimap-0.2.2$ runghc Setup.lhs configure Configuring bimap-0.2.2... Setup.lhs: ghc version >=6.4 is required but the version of /usr/bin/ghc could not be determined. jochem@huygens:/tmp/bimap-0.2.2$
Cabal 1.2.3.0 seems to be working. What am I doing wrong? Or is this an unsupported combination?
It's an untested combination. I checked it with 6.6.1 but not 6.6.
It is supposed to work (indeed it's supposed to work with 6.4) so we should figure out what's going wrong.
Can you : $ runghc Setup.lhs configure -v3
jochem@huygens:/tmp/bimap-0.2.2$ runghc Setup.lhs configure -v3 Configuring bimap-0.2.2... Creating dist (and its parents) searching for ghc in path. found ghc at /usr/bin/ghc ("/usr/bin/ghc",["--numeric-version"]) Warning: cannot determine version of /usr/bin/ghc : "" Setup.lhs: ghc version >=6.4 is required but the version of /usr/bin/ghc could not be determined. jochem@huygens:/tmp/bimap-0.2.2$ ghc --numeric-version 6.6 jochem@huygens:/tmp/bimap-0.2.2$ ghc in my sid (debian unstable) chroot gave "6.8.2". Maybe Cabal 1.4 doesn't like versions of the form x.y, only of the form x.y.z (wild speculation)? By the way, compiling the Setup.lhs-file of bimap and running it does work: jochem@huygens:/tmp/bimap-0.2.2$ ghc --make Setup.lhs -o Setup [1 of 1] Compiling Main ( Setup.lhs, Setup.o ) Linking Setup ... jochem@huygens:/tmp/bimap-0.2.2$ ./Setup configure Configuring bimap-0.2.2... jochem@huygens:/tmp/bimap-0.2.2$ -- Jochem Berndsen | jochem@functor.nl GPG: 0xE6FABFAB

On Tue, 2008-06-24 at 12:07 +0200, Jochem Berndsen wrote:
jochem@huygens:/tmp/bimap-0.2.2$ runghc Setup.lhs configure -v3 Configuring bimap-0.2.2... Creating dist (and its parents) searching for ghc in path. found ghc at /usr/bin/ghc ("/usr/bin/ghc",["--numeric-version"]) Warning: cannot determine version of /usr/bin/ghc : "" Setup.lhs: ghc version >=6.4 is required but the version of /usr/bin/ghc could not be determined. jochem@huygens:/tmp/bimap-0.2.2$ ghc --numeric-version 6.6 jochem@huygens:/tmp/bimap-0.2.2$
I cannot reproduce this. I tried on the community server which is debian 4.0 (which I think is etch right?). It was using ghc-6.6. I tried with Cabal-1.4.0.1 and bimap from hackage.
ghc in my sid (debian unstable) chroot gave "6.8.2". Maybe Cabal 1.4 doesn't like versions of the form x.y, only of the form x.y.z (wild speculation)?
No, that should be fine. It's parsing a Version so that can be any sequence of digits separated by dots.
By the way, compiling the Setup.lhs-file of bimap and running it does work:
jochem@huygens:/tmp/bimap-0.2.2$ ghc --make Setup.lhs -o Setup [1 of 1] Compiling Main ( Setup.lhs, Setup.o ) Linking Setup ... jochem@huygens:/tmp/bimap-0.2.2$ ./Setup configure Configuring bimap-0.2.2... jochem@huygens:/tmp/bimap-0.2.2$
That's pretty weird. Are you sure ghc and runghc are the same version? Duncan

On Tue, 2008-06-24 at 11:53 +0100, Duncan Coutts wrote:
I cannot reproduce this. I tried on the community server which is debian 4.0 (which I think is etch right?). It was using ghc-6.6. I tried with Cabal-1.4.0.1 and bimap from hackage.
4.0 is etch, indeed.
ghc in my sid (debian unstable) chroot gave "6.8.2". Maybe Cabal 1.4 doesn't like versions of the form x.y, only of the form x.y.z (wild speculation)?
No, that should be fine. It's parsing a Version so that can be any sequence of digits separated by dots.
By the way, compiling the Setup.lhs-file of bimap and running it does work:
jochem@huygens:/tmp/bimap-0.2.2$ ghc --make Setup.lhs -o Setup [1 of 1] Compiling Main ( Setup.lhs, Setup.o ) Linking Setup ... jochem@huygens:/tmp/bimap-0.2.2$ ./Setup configure Configuring bimap-0.2.2... jochem@huygens:/tmp/bimap-0.2.2$
That's pretty weird. Are you sure ghc and runghc are the same version?
Yes, the only version I ever installed on that machine is ghc 6.6 from the Debian archives. Also, there exists a symlink /usr/bin/runghc -> /etc/alternatives/runghc -> /usr/lib/ghc-6.6/bin/runghc. I can't reproduce the problem on my laptop (debian etch) as well. Adding some debug output in Cabal seems to reveal the problem: waitForProcess, when called from rawSystemStdout, throws an exception: waitForProcess: does not exist (No child processes) Reinstalling the ghc6 package, reinstalling filepath and cabal did not fix this problem. Any idea? I guess it is outside the realm of Cabal. -- Jochem Berndsen | jochem@functor.nl GPG: 0xE6FABFAB

On Tue, 2008-06-24 at 13:33 +0200, Jochem Berndsen wrote:
I can't reproduce the problem on my laptop (debian etch) as well. Adding some debug output in Cabal seems to reveal the problem: waitForProcess, when called from rawSystemStdout, throws an exception:
waitForProcess: does not exist (No child processes)
Reinstalling the ghc6 package, reinstalling filepath and cabal did not fix this problem. Any idea? I guess it is outside the realm of Cabal.
This seems to be an instance of a bug in GHC 6.6, #945, see http://hackage.haskell.org/trac/ghc/ticket/945 I'm sorry to have bothered you :) by the way, a `catch` around waitForProcess to ignore all exceptions makes Cabal 1.4.0.1 work for me (as a workaround; this probably will cause havoc in the future. I've been warned) :) -- Jochem Berndsen | jochem@functor.nl GPG: 0xE6FABFAB
participants (2)
-
Duncan Coutts
-
Jochem Berndsen