
Just thought I install the latest version (0.4.0) from hackage and test it. Build and install went fine, but then it gets strange: ben@sarun: .../haskell/cabal-install-0.4.0 > sudo runhaskell Setup.lhs install Installing: /usr/local/bin ben@sarun: .../haskell/cabal-install-0.4.0 > rehash ben@sarun: .../haskell/cabal-install-0.4.0 > cabal --help Usage: cabal [GLOBAL FLAGS] or: cabal COMMAND [FLAGS] [...etc...] Commands: fetch Downloads packages for later installation or study. install Installs a list of packages. update Updates list of known packages clean Removes downloaded files list List available packages on the server. info Emit some info ben@sarun: .../haskell/cabal-install-0.4.0 > cd .. ben@sarun: .../software/haskell > cabal info Config file /home/ben/.cabal/config not found. Writing default configuration to /home/ben/.cabal/config. cabal: dist/Conftest.c: openFile: does not exist (No such file or directory) When later I tried the 'install' command, it reminds me to 'cabal update' first, which I do (no response, so probably worked), however next 'cabal install' gives the same funny answer about a missing dist/Conftest.c. Schade. Cheers Ben

ben.franksen:
Just thought I install the latest version (0.4.0) from hackage and test it. Build and install went fine, but then it gets strange:
ben@sarun: .../haskell/cabal-install-0.4.0 > sudo runhaskell Setup.lhs install Installing: /usr/local/bin ben@sarun: .../haskell/cabal-install-0.4.0 > rehash ben@sarun: .../haskell/cabal-install-0.4.0 > cabal --help Usage: cabal [GLOBAL FLAGS] or: cabal COMMAND [FLAGS]
[...etc...]
Commands: fetch Downloads packages for later installation or study. install Installs a list of packages. update Updates list of known packages clean Removes downloaded files list List available packages on the server. info Emit some info ben@sarun: .../haskell/cabal-install-0.4.0 > cd .. ben@sarun: .../software/haskell > cabal info Config file /home/ben/.cabal/config not found. Writing default configuration to /home/ben/.cabal/config. cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should go fine. -- Don

On Tue, 2007-11-27 at 18:02 -0800, Don Stewart wrote:
ben.franksen:
Just thought I install the latest version (0.4.0) from hackage and test it. Build and install went fine, but then it gets strange:
cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should go fine.
Yes, this was rather unfortunate. A fix for something else that we put into Cabal at the last minute ended up breaking cabal-install. As Don says, it's fixed in the darcs version of Cabal (HEAD and 1.2 branch) which will also be released with ghc-6.8.2 (or possibly earlier if that looks like it's going to take a while). Duncan

Don Stewart wrote:
ben.franksen:
cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should go fine.
Ok. So the package is broken in that it doesn't work with the advertised version of Cabal as stated on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cabal-install-0.4... See the line base (>=2.0&&<2.2), Cabal (>=1.2), filepath (>=1.0), HTTP (>=3000.0&&<3001.1), network, zlib (>=0.3) Anyway, I'll follow your advice & install latest cabal from darcs repo. (* looks for repo URL in Cabal home page; under "Download", nothing, hmmm; ah it's under "Source Code", right. Wait for darcs to finish getting...here we go *) ben@sarun: .../software/haskell > darcs get --partial http://darcs.haskell.org/cabal Copying patch 115 of 115... done! Applying patch 114 of 114... done. Finished getting. ben@sarun: .../software/haskell > cd cabal ben@sarun: .../haskell/cabal > runhaskell Setup.lhs configure Distribution/Simple/NHC.hs:77:1: lexical error at character 'i' Ups. Cheers Ben (feels like a real beta-tester now ;-)

On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
Don Stewart wrote:
ben.franksen:
cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should go fine.
Ok. So the package is broken in that it doesn't work with the advertised version of Cabal as stated on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cabal-install-0.4... See the line
base (>=2.0&&<2.2), Cabal (>=1.2), filepath (>=1.0), HTTP (>=3000.0&&<3001.1), network, zlib (>=0.3)
Anyway, I'll follow your advice & install latest cabal from darcs repo. (* looks for repo URL in Cabal home page; under "Download", nothing, hmmm; ah it's under "Source Code", right. Wait for darcs to finish getting...here we go *)
ben@sarun: .../software/haskell > darcs get --partial http://darcs.haskell.org/cabal Copying patch 115 of 115... done! Applying patch 114 of 114... done. Finished getting. ben@sarun: .../software/haskell > cd cabal ben@sarun: .../haskell/cabal > runhaskell Setup.lhs configure
Distribution/Simple/NHC.hs:77:1: lexical error at character 'i'
Ups.
Cheers Ben (feels like a real beta-tester now ;-)
Well, Cabal cannot automatically compile itself with itself. Use: $ make

Thomas Schilling wrote:
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
Don Stewart wrote:
ben.franksen:
cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should go fine.
ben@sarun: .../software/haskell > darcs get --partial http://darcs.haskell.org/cabal Copying patch 115 of 115... done! Applying patch 114 of 114... done. Finished getting. ben@sarun: .../software/haskell > cd cabal ben@sarun: .../haskell/cabal > runhaskell Setup.lhs configure
Distribution/Simple/NHC.hs:77:1: lexical error at character 'i'
Well, Cabal cannot automatically compile itself with itself.
Ok, I didn't know that. I thought it would work since I have the latest release of Cabal installed (1.2.2.0).
Use:
$ make
That did it. Many thanks. No more runhaskell Setup.[l]hs for me ;-) Cheers Ben

On Wed, 2007-11-28 at 21:00 +0100, Thomas Schilling wrote:
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
ben@sarun: .../software/haskell > cd cabal ben@sarun: .../haskell/cabal > runhaskell Setup.lhs configure
Distribution/Simple/NHC.hs:77:1: lexical error at character 'i'
Ups.
Cheers Ben (feels like a real beta-tester now ;-)
Well, Cabal cannot automatically compile itself with itself.
No actually it can, that was just a bug (which I've just fixed). Ben is indeed being a beta tester by using Cabal HEAD. I'd recommend the 1.2 branch: http://darcs.haskell.org/cabal-branches/cabal-1.2/ Or just darcs pull and try again. Duncan

Duncan Coutts wrote:
On Wed, 2007-11-28 at 21:00 +0100, Thomas Schilling wrote:
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
ben@sarun: .../software/haskell > cd cabal ben@sarun: .../haskell/cabal > runhaskell Setup.lhs configure
Distribution/Simple/NHC.hs:77:1: lexical error at character 'i'
Ups.
Cheers Ben (feels like a real beta-tester now ;-)
Well, Cabal cannot automatically compile itself with itself.
No actually it can, that was just a bug (which I've just fixed).
Ah, I wondered. If even 'the monster' (ghc) can build itself from earlier versions it should be possible for cabal to pull the same trick.
Ben is indeed being a beta tester by using Cabal HEAD. I'd recommend the 1.2 branch:
I was using HEAD as per Don's suggestion for how to build cabal-install. Now, re-reading this thread I see that you already mentioned that upgrading on the 2.1 branch would have been enough. Apropos beta-testing, cabal-1.3 seems to have introduced an incompatible API change; for instance, it can't build MissingH any longer. This might be ok by whatever versioning policy cabal uses, I didn't check; anyway: ben@sarun: ~ > cabal install MissingH Downloading 'MissingH-0.18.6'... [1 of 1] Compiling Main ( Setup.hs, dist/setup/Main.o ) Setup.hs:19:35: Couldn't match expected type `(Either GenericPackageDescription PackageDescription, HookedBuildInfo)' against inferred type `PackageDescription' In the first argument of `(confHook defaultUserHooks)', namely `mydescrip' In the expression: let mydescrip = case os of "mingw32" -> ... _ -> ... in (confHook defaultUserHooks) mydescrip flags In the definition of `customConfHook': customConfHook descrip flags = let mydescrip = case ... of "mingw32" -> ... _ -> ... in (confHook defaultUserHooks) mydescrip flags
Ok, let's try the 1.2 branch, might be a bit more on the safe side. (*builds cabal-install with this version (hiding Cabal-1.3)...ok, installing, ok, ... oh wait, this version gives me exactly the same error as above ...thinking hard for a moment...). Ok, running again ./Setup configure this time with -v3: Dependency Cabal>=1.2: using Cabal-1.3.1 O_o. I forgot that cabal ignores hidden/exposed status of packages (for good reasons IIRC). How do I tell it to use the newly installed 1.2.2.1? Is there a command line switch...(*stares at output of ./Setup configure --help; schade, no with-cabal=VERSION option*), no. To hell with it,I'll just add "&&<1.3" to the cabal file and indeed it now says Dependency Cabal>=1.2&&<1.3: using Cabal-1.2.2.1 One install of cabal-install later: same error with MissingH. So the package was broken to begin with an it wasn't related to the cabal upgrade! Grrrr. Not that it matters to me here at home (there is a debian package I can use), but at work we are still using debian /old-stable/ which is just a bit too outdated and anyway I don't have root access so I have to install everything from source. Unpacking MissingH and looking at the Setup.hs I see that I can simply replace it by a generic version, add unix dependency to the cabal file, and all works well. So much for "never again runhaskell Setup blabla" ;-) (I should add that for many packages cabal-install works perfectly well.) Thanks again for your help! Cheers Ben PS: a 'cabal remove' would also be nice to have.

On Thu, 2007-11-29 at 23:56 +0100, Ben Franksen wrote:
Duncan Coutts wrote:
On Wed, 2007-11-28 at 21:00 +0100, Thomas Schilling wrote:
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
ben@sarun: .../software/haskell > cd cabal ben@sarun: .../haskell/cabal > runhaskell Setup.lhs configure
Distribution/Simple/NHC.hs:77:1: lexical error at character 'i'
Ups.
Cheers Ben (feels like a real beta-tester now ;-)
Well, Cabal cannot automatically compile itself with itself.
No actually it can, that was just a bug (which I've just fixed).
Ah, I wondered. If even 'the monster' (ghc) can build itself from earlier versions it should be possible for cabal to pull the same trick.
Ben is indeed being a beta tester by using Cabal HEAD. I'd recommend the 1.2 branch:
I was using HEAD as per Don's suggestion for how to build cabal-install. Now, re-reading this thread I see that you already mentioned that upgrading on the 2.1 branch would have been enough.
Apropos beta-testing, cabal-1.3 seems to have introduced an incompatible API change; for instance, it can't build MissingH any longer.
Actually it was 1.2.x that made this change.
One install of cabal-install later: same error with MissingH. So the package was broken to begin with an it wasn't related to the cabal upgrade! Grrrr.
Yup. It's not been updated to work with ghc 6.8 and related libs.
Not that it matters to me here at home (there is a debian package I can use), but at work we are still using debian /old-stable/ which is just a bit too outdated and anyway I don't have root access so I have to install everything from source.
Unpacking MissingH and looking at the Setup.hs I see that I can simply replace it by a generic version, add unix dependency to the cabal file, and all works well. So much for "never again runhaskell Setup blabla" ;-)
I expect it can use configurations to add the unix package dependency conditionally and not need a custom Setup.hs file at all.
(I should add that for many packages cabal-install works perfectly well.)
Thanks again for your help!
Cheers Ben PS: a 'cabal remove' would also be nice to have.

Duncan Coutts wrote:
Apropos beta-testing, cabal-1.3 seems to have introduced an incompatible API change; for instance, it can't build MissingH any longer.
Actually it was 1.2.x that made this change.
Ok. I realized it wasn't 1.3 as I remarked later:
One install of cabal-install later: same error with MissingH. So the package was broken to begin with an it wasn't related to the cabal upgrade! Grrrr.
Yup. It's not been updated to work with ghc 6.8 and related libs.
I tried this (as everything else in this thread) with ghc-6.6.1. It seems to me that MissingH-0.18.6 only builds with an earlier version of Cabal.
Unpacking MissingH and looking at the Setup.hs I see that I can simply replace it by a generic version, add unix dependency to the cabal file, and all works well. So much for "never again runhaskell Setup blabla" ;-)
I expect it can use configurations to add the unix package dependency conditionally and not need a custom Setup.hs file at all.
That would be nice.
(I should add that for many packages cabal-install works perfectly well.)
Thanks again for your help!
Cheers Ben PS: a 'cabal remove' would also be nice to have.
+1 from my side. Cheers Ben
participants (4)
-
Ben Franksen
-
Don Stewart
-
Duncan Coutts
-
Thomas Schilling