Use cabal-install:
cabal update && cabal install foo
checks for dependencies, downloads and builds them automatically (if
possible).
_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--------------------------------------------------
From: "Daniel Fischer" <daniel.i...@web.de>
Sent: Saturday, January 17, 2009 10:35 PM
To: "Alberto G. Corona " <agoc...@gmail.com>; <haskel...@haskell.org>
Subject: Re: [Haskell-cafe] runghc Setup.hs doitall
> Is there some sort of bundle that you can use to install cabal-install
> easily? Because it looks to me like I'd have to spend the better part of an
> evening manually downloading and installing the gazillion of dependencies it
> has, which is far too much work when I just wanted to spend ten minutes
> playing with some package...
There's a bootstrap.sh file in root of the cabal-install that can do
this automatically.
In my experience, it usually fails because of missing dependencies like
zlib-dev on my own system, but those are easy to fix, at which point I
can rerun the bootstrap script.
Jeff Wheeler
Newer versions contain a bootstrap.sh script that works just fine for me.
Cheers,
Peter
--------------------------------------------------
From: "Jeff Wheeler" <je...@nokrev.com>
Sent: Sunday, January 18, 2009 4:27 PM
To: <haskel...@haskell.org>
Subject: Re: [Haskell-cafe] runghc Setup.hs doitall
> On Sun, 2009-01-18 at 16:22 +0000, Sebastian Sylvan wrote:
Wait, 'gazillion of dependencies'? If you have the extralibs bundle built,
there are only three dependencies to take care of
- a recent Cabal library
- HTTP
- zlib
Of course, downloading and building them manually may take half an hour or so,
but it's time well spent, cabal-install makes playing around for ten minutes
with some other package so much easier.
And of course, as has already been mentioned, there's now a bootstrap.sh
included which takes care of the above dependencies for you.
Is there some sort of bundle that you can use to install cabal-install easily? Because it looks to me like I'd have to spend the better part of an evening manually downloading and installing the gazillion of dependencies it has, which is far too much work when I just wanted to spend ten minutes playing with some package...
http://haskell.org/~duncan/cabal/cabal.exe
It's not the latest version but you can use it to self-update. I'll post
a more recent build after the next release. I might also put it in a
slightly more discoverable place ;-)
Duncan
I've also improved the bootstrap.sh script for unix users. Feedback as
to whether it still works on everyone's unix flavor would be much
appreciated.
http://darcs.haskell.org/cabal-install/bootstrap.sh
It's slightly smarter about not re-installing things that are already
installed. It should have rather better error handling too.
In fact I've heard reports that this new one even works on Windows,
though only for the people with MSYS of course.
> In my experience, it usually fails because of missing dependencies like
> zlib-dev on my own system, but those are easy to fix, at which point I
> can rerun the bootstrap script.
Patches accepted.
Duncan
I think the problem is that hackage is misleading. It looks from the
hackage page like there are a gazillion dependencies when in fact as you
say there are only 2 that are not included with the latest ghc.
The solution some have suggested would be for hackage to only list
dependencies that are not in some core set.
Duncan
> > In my experience, it usually fails because of missing dependencies like
> > zlib-dev on my own system, but those are easy to fix, at which point I
> > can rerun the bootstrap script.
>
> Patches accepted.
Without digressing too much, I don't think much can be done here. I
would not (and should not) expect the bootstrap.sh file to use apt to
get the missing dependencies as I had to do.
I don't think there's any general solution to this, beyond better error
handling (which apparently you just improved).
Jeff Wheeler
Hmm. That's interesting. As we do in the distro tools, for example,
makedepends=('ghc=6.10.1' 'haskell-http<4000' 'haskell-zlib')
So the distro packaging tools already have the 'implicit set' of things
we know are on the system if ghc is on it too.
-- Don
I always get a bit annoyed trying to do anything in windows with Haskell
libraries, at the very least I'd like it to be clear from the start that
something won't work (if it's by design) so I don't waste time trying.
Ideally the hackage website would even allow you to filter packages by the
OS you're using and would remove packages that won't build on that OS (by
recursively checking dependencies too).
--------------------------------------------------
From: "Duncan Coutts" <duncan...@worc.ox.ac.uk>
Sent: Sunday, January 18, 2009 6:20 PM
To: "Sebastian Sylvan" <sebastia...@gmail.com>
Cc: "Jeff Wheeler" <je...@nokrev.com>; <haskel...@haskell.org>
Subject: Re: [Haskell-cafe] runghc Setup.hs doitall
> On Sun, 2009-01-18 at 16:48 +0000, Sebastian Sylvan wrote:
It'll still fall over when it fails to find the zlib C lib. That's a
slightly more general issue:
Check for required C libraries during configure
http://hackage.haskell.org/trac/hackage/ticket/262
Again, patches gratefully accepted :-)
Duncan
We're pretty near to that. It does understand platforms. What we lack is
in the information that it does not work. We can get it in two ways. One
is if we cannot find sh.exe then we know straight away that all
configure based packages will not work.
We should be able to do similar things for packages that need C libs
headers etc that we cannot find. We should only need manual additional
info for a few packages.
The tickets in this context are:
http://hackage.haskell.org/trac/hackage/ticket/342
http://hackage.haskell.org/trac/hackage/ticket/400
> I always get a bit annoyed trying to do anything in windows with Haskell
> libraries, at the very least I'd like it to be clear from the start that
> something won't work (if it's by design) so I don't waste time trying.
> Ideally the hackage website would even allow you to filter packages by the
> OS you're using and would remove packages that won't build on that OS (by
> recursively checking dependencies too).
Yes, we should be able to use the same info on hackage as in
cabal-install.
So, as usual the limiting factor is the number of people hacking on the
infrastructure. Time to get involved! :-)
On Mon, 2009-01-19 at 01:36 +0100, Alberto G. Corona wrote:The standard Windows build of GHC does not use Cygwin. So all the
> The problem with Windows can be solved once and for all when CygWIN
> will be considered for Windows instead of MinGW. Is that possible?
programs built with GHC (like cabal) are native Windows programs and do
not understand Cygwin paths etc.
If you want to build GHC for Cygwin then there is quite a bit of work
for you to do to update GHC to build that way.
I get the general impression that most users would prefer not to have to
install Cygwin or MinGW at all.
Duncan