[Haskell-cafe] Damnit, we need a CPAN.
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Thu May 29 15:20:11 EDT 2008
On Thu, 2008-05-29 at 17:38 +0200, Achim Schneider wrote:
> No, wait, there's cabal-install. And it doesn't even depend on 20+
> packages I'd have to install manually. My day, for now, is saved, at
> least if portage installs it without hesitation.
>
> Ah, there it is:
> >>> Compiling source
> >>> in /var/tmp/portage/dev-haskell/cabal-darcs-0/work/cabal-darcs-0 ...
> * Bootstrapping Cabal...
>
> <no location info>: can't find file: Setup.lhs
> *
> * ERROR: dev-haskell/cabal-darcs-0 failed.
The ebuild for the darcs version of Cabal it out of date. This happens
frequently with *-darcs ebuilds because upstream changes.
> http://hackage.haskell.org/packages/archive/cabal-install/0.4.0/cabal-install-0.4.0.tar.gz
This version is unfortunately far far too old. I cannot upload a new
version to hackage until I release Cabal-1.4 which it depends on.
Fortunately I'll be releasing both soonish and in the mean time you can
try the darcs versions or the pre-release tarballs from a few weeks ago.
> Building works, installing too, but registering fails: the Makefile
> does not seem to like --user:
>
> % runhaskell Setup.lhs register --user
> -=-= Cabal executing: make register=-=-
> cat config/wxcore.pkg | sed -e
> "s|\${wxhlibdir}|/home/ksf/cabal-inst/lib|" | ghc-pkg update - Reading
> package info from stdin ... done. WARNING: unversioned dependencies are
> deprecated, and will NOT be accepted by GHC 6.10: base haskell98 Unable
> to rename "/usr/lib64/ghc-6.8.2/package.conf" to
> "/usr/lib64/ghc-6.8.2/package.conf.old" Saving old package config
> file... ghc-pkg.bin: /usr/lib64/ghc-6.8.2/package.conf: renameFile:
> permission denied (Permission denied)
The wx package seems to be broken. It is registering directly with
ghc-pkg and not respecting the --user flag. This is because it uses make
rather than the build infrastructure that Cabal provides. Not that I can
blame it for that, it's a pretty complex package and Cabal doesn't yet
provide all the features it needs. Gtk2Hs is not cabalised yet either.
> Just a second...
> # emerge wxhaskell -pv
>
> These are the packages that would be merged, in order:
>
> Calculating dependencies... done!
> [ebuild UD] dev-lang/ghc-6.4.2 [6.8.2] USE="X%* doc opengl%*
> -binary -ghcbootstrap -openal% -test%(-bash-completion%)" 0 kB [0=>1]
> [ebuild N ] dev-haskell/wxhaskell-0.9.4 USE="doc" 0 kB
>
>
> In other words: No way. The only program that touches anything in /usr/
> is portage.
It's trying to downgrade ghc because the version of wxhaskell in portage
only works with ghc-6.4.2 and not 6.6 or 6.8.
> Rationale: We need a CPAN, a cabal that is smart enough to know what to
> to, even if building depends on make, grapefruit authors that commit
> to hackage, a cabal-inst that can install from darcs (or at least from
> a local directory)
It can build from a local directory. Being able to build from darcs is
possible in principle but we've not implemented it yet.
> , or maybe just a make-replacement for haskell, like
> java has with ant (which is really cool if you successfully do not
> notice the xml-syntax).
We're doing something like that as a Google Summer of Code project this
summer.
> I would already shut up if there were an ebuild generator, but then I'm
> not that egoistic ;)
There is. It's called hackport. We use it to generate most of the 100's
of Haskell ebuilds that you find in the haskell overlay.
So I fully appreciate this packaging stuff is sometimes frustrating. I
hope you appreciate that it is actually improving.
BTW, if you have specific bugs to report in Cabal, cabal-install or
hackage (ie hackage itself, not problems with packages in hackage) then
please do report them in our bug tracker:
http://hackage.haskell.org/trac/hackage/
You'll also find links there to the darcs versions of Cabal and
cabal-install if you want to play with them.
Duncan
More information about the Haskell-Cafe
mailing list