
Quick question: how do I build Haddock from the darcs repo? Long version: Using Cabal as provided with ghc-6.4.1 gave me this error: $ ghc-6.4.1 --make Setup $ ./a.out configure --help a.out: Line 12: Unknown field 'data-files' So I tried to upgrade Cabal to a newer version. Following the instructions to the letter, there was some weirdness with compiler versions, but I did end up with a newer Cabal: $ cd cabal-1.1.3 $ ghc-pkg-6.4.1 unregister Cabal Saving old package config file... done. Writing new package config file... done. $ vi GNUMakefile # edit HC=ghc-6.4.1, HC_PKG=ghc-pkg-6.4.1 $ make install mkdir -p dist/tmp ghc-6.4.1 --make -Wall -fno-warn-unused-matches -cpp -i. -odir dist/tmp -hidir dist/tmp Setup.lhs -o setup ... ./setup configure --ghc --prefix=/usr/malcolm/local Configuring Cabal-1.1.3... configure: Using install prefix: /usr/malcolm/local configure: Using compiler: /grp/haskell/bin/ghc # this is wrong configure: Compiler flavor: GHC configure: Compiler version: 6.2.2 # eek! this is wrong configure: Using package tool: /grp/haskell/bin/ghc-pkg # this is wrong too ... ./setup install Installing: /usr/malcolm/local/lib/Cabal-1.1.3/ghc-6.2.2 & /usr/malcolm/local/bin Cabal-1.1.3... # installed for wrong compiler Registering Cabal-1.1.3... Reading package info from ".installed-pkg-config"done. Expanding embedded variables... done. Saving old package config file... done. Writing new package config file... done. # Cabal is missing from ghc-6.4.1 $ ghc-pkg-6.4.1 -l /usr/malcolm/local/lib/ghc-6.4.1/package.conf: rts-1.0, base-1.0, haskell98-1.0, template-haskell-1.0, unix-1.0, parsec-1.0, haskell-src-1.0, network-1.0, QuickCheck-1.0, HUnit-1.1, mtl-1.0, fgl-5.2, X11-1.1, HGL-3.1, OpenGL-2.0, GLUT-2.0, stm-1.0, readline-1.0, (lang-1.0), (concurrent-1.0), (posix-1.0), (util-1.0), (data-1.0), (text-1.0), (net-1.0), (hssource-1.0) # ...but is installed for ghc-6.2.2 $ ghc-pkg-6.2.2 -l /grp/haskell/lib/ghc-6.2.2/package.conf: rts, base, haskell98, haskell-src, network, parsec, QuickCheck, readline, unix, lang, concurrent, posix, util, data, text, net, hssource, hat, HaXml, wxcore, wx, Cabal But the killer is, it still doesn't work: $ cd haddock $ ghc-6.2.2 --make Setup -package Cabal Chasing modules from: Setup Compiling Main ( Setup.lhs, Setup.o ) Linking ... $ ./a.out t configure --help a.out: haddock.cabal:12: Unknown field 'data-files' So then I tried just building haddock directly with ghc: $ ghc-6.4 --make Main.hs Chasing modules from: Main.hs Main.hs:39:1: lexical error $ ghc-6.4 --make -cpp Main.hs Chasing modules from: Main.hs Could not find module `Paths_Haddock': use -v to see a list of the files searched for (imported from Main.hs) And now I'm stuck. There genuinely is no module called Paths_Haddock. Regards, Malcolm

On Tue, 2006-01-31 at 12:17 +0000, Malcolm Wallace wrote:
Quick question: how do I build Haddock from the darcs repo?
You need a later version of Cabal. Later than 1.1.3.
Could not find module `Paths_Haddock': use -v to see a list of the files searched for (imported from Main.hs)
And now I'm stuck. There genuinely is no module called Paths_Haddock.
This module is generated by Cabal. But not in Cabal 1.1.3, a later version. We really need a field: cabal-depends: 1.1.4 So that older versions of Cabal can say "you need version ${cabal-depends} of Cabal to build this package". Duncan

Duncan Coutts
Quick question: how do I build Haddock from the darcs repo?
You need a later version of Cabal. Later than 1.1.3.
Just to be clear, this can only mean the Cabal darcs repo, yes? I couldn't find a release candidate newer than 1.1.3 on the main Cabal webpage: http://haskell.org/cabal Regards, Malcolm

Duncan Coutts wrote:
On Tue, 2006-01-31 at 12:17 +0000, Malcolm Wallace wrote:
Quick question: how do I build Haddock from the darcs repo?
You need a later version of Cabal. Later than 1.1.3.
Could not find module `Paths_Haddock': use -v to see a list of the files searched for (imported from Main.hs)
And now I'm stuck. There genuinely is no module called Paths_Haddock.
This module is generated by Cabal. But not in Cabal 1.1.3, a later version.
We really need a field:
cabal-depends: 1.1.4
So that older versions of Cabal can say "you need version ${cabal-depends} of Cabal to build this package".
There is such a field: cabal-version: >=1.1.4 but I didn't use it in Haddock (now fixed). This field doesn't help with all the backwards compatibility issues, particularly API changes in the Cabal libraries, as we know (see previous discussions). Cheers, Simon

On Tue, 2006-01-31 at 13:54 +0000, Simon Marlow wrote:
Duncan Coutts wrote:
We really need a field:
cabal-depends: 1.1.4
So that older versions of Cabal can say "you need version ${cabal-depends} of Cabal to build this package".
There is such a field:
cabal-version: >=1.1.4
Really! I had never seen it.
but I didn't use it in Haddock (now fixed). This field doesn't help with all the backwards compatibility issues, particularly API changes in the Cabal libraries, as we know (see previous discussions).
Indeed, because by the time the cabal Setup.lhs reads the file it's too late. Hence my suggestion in the previous discussions for a cabal program that reads the file, decides which version of the Cabal libs to use and then builds a setup program and passes control on to that. Duncan

Duncan Coutts
On Tue, 2006-01-31 at 13:54 +0000, Simon Marlow wrote:
Duncan Coutts wrote:
We really need a field:
cabal-depends: 1.1.4
So that older versions of Cabal can say "you need version ${cabal-depends} of Cabal to build this package".
There is such a field:
cabal-version: >=1.1.4
Really! I had never seen it.
but I didn't use it in Haddock (now fixed). This field doesn't help with all the backwards compatibility issues, particularly API changes in the Cabal libraries, as we know (see previous discussions).
Indeed, because by the time the cabal Setup.lhs reads the file it's too late. Hence my suggestion in the previous discussions for a cabal program that reads the file, decides which version of the Cabal libs to use and then builds a setup program and passes control on to that.
Ahem. Cabal-install. It doesn't read that field yet, though. peace, isaac
participants (4)
-
Duncan Coutts
-
Isaac Jones
-
Malcolm Wallace
-
Simon Marlow