
Hi guys: I don´t know how difficult really is, but it seens that it could be done because all the necessary elements are there (except perhaps the mapping package name-hackage url): Why hasn´t been done yet Is unknown to me. It would be very useful and a big save of time to have a cabal commad "chech-dependencies-and-install-them-by-downloading-them-from-hackage-then-configure-build-and-install-this-package?. The unix installers do is t from binaries and are obsolete, so I have to do it manually with cabal everytime when i download a new compiler version from haskell.org. Cheers Alberto.

Am Samstag, 17. Januar 2009 23:20 schrieb Alberto G. Corona:
Hi guys:
I don´t know how difficult really is, but it seens that it could be done because all the necessary elements are there (except perhaps the mapping package name-hackage url): Why hasn´t been done yet Is unknown to me. It would be very useful and a big save of time to have a cabal commad "chech-dependencies-and-install-them-by-downloading-them-from-hackage-then- configure-build-and-install-this-package?. The unix installers do is t from binaries and are obsolete, so I have to do it manually with cabal everytime when i download a new compiler version from haskell.org.
Cheers Alberto.
Use cabal-install: cabal update && cabal install foo checks for dependencies, downloads and builds them automatically (if possible).

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...
--------------------------------------------------
From: "Daniel Fischer"
Am Samstag, 17. Januar 2009 23:20 schrieb Alberto G. Corona:
Hi guys:
I don´t know how difficult really is, but it seens that it could be done because all the necessary elements are there (except perhaps the mapping package name-hackage url): Why hasn´t been done yet Is unknown to me. It would be very useful and a big save of time to have a cabal commad "chech-dependencies-and-install-them-by-downloading-them-from-hackage-then- configure-build-and-install-this-package?. The unix installers do is t from binaries and are obsolete, so I have to do it manually with cabal everytime when i download a new compiler version from haskell.org.
Cheers Alberto.
Use cabal-install:
cabal update && cabal install foo
checks for dependencies, downloads and builds them automatically (if possible).
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Sun, 2009-01-18 at 16:22 +0000, Sebastian Sylvan wrote:
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

Doesn't work on windows.
--------------------------------------------------
From: "Jeff Wheeler"
On Sun, 2009-01-18 at 16:22 +0000, Sebastian Sylvan wrote:
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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Sun, 2009-01-18 at 16:48 +0000, Sebastian Sylvan wrote:
Doesn't work on windows.
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

On a similar note, would it not be nice if cabal install understood about
platforms and could tell you straight away that a package won't install
under e.g. windows, rather then spending ages trying and then failing
because a package tries to run a unix command?
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"
On Sun, 2009-01-18 at 16:48 +0000, Sebastian Sylvan wrote:
Doesn't work on windows.
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

On Sun, 2009-01-18 at 18:35 +0000, Sebastian Sylvan wrote:
On a similar note, would it not be nice if cabal install understood about platforms and could tell you straight away that a package won't install under e.g. windows, rather then spending ages trying and then failing because a package tries to run a unix command?
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! :-) Duncan

On Sun, 2009-01-18 at 10:27 -0600, Jeff Wheeler wrote:
On Sun, 2009-01-18 at 16:22 +0000, Sebastian Sylvan wrote:
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.
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

On Sun, 2009-01-18 at 18:24 +0000, Duncan Coutts wrote:
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

On Sun, 2009-01-18 at 12:28 -0600, Jeff Wheeler wrote:
On Sun, 2009-01-18 at 18:24 +0000, Duncan Coutts wrote:
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).
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

Am Sonntag, 18. Januar 2009 17:22 schrieb Sebastian Sylvan:
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...
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.

On Sun, 2009-01-18 at 17:58 +0100, Daniel Fischer wrote:
Am Sonntag, 18. Januar 2009 17:22 schrieb Sebastian Sylvan:
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...
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
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

duncan.coutts:
On Sun, 2009-01-18 at 17:58 +0100, Daniel Fischer wrote:
Am Sonntag, 18. Januar 2009 17:22 schrieb Sebastian Sylvan:
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...
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
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.
Hmm. That's interesting. As we do in the distro tools, for example, makedepends=('ghc=6.10.1' 'haskell-http<4000' 'haskell-zlib') http://repos.archlinux.org/viewvc.cgi/community/devel/cabal-install/PKGBUILD?revision=1.1&root=community&pathrev=CURRENT 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

On Sun, Jan 18, 2009 at 8:22 AM, Sebastian Sylvan < sebastian.sylvan@gmail.com> wrote:
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...
You typically need HTTP and zlib. Perhaps cabal-install could have it's own minimal implementations to be standalone? However I don't find needing to cabal build and install 2 packages to be so difficult. And once you have cabal-install, you've got it ;-) It should be able to update itself. Maybe adding cabal-install to the ghc packaging solves all the problems, then they just need zlib and http in the main distribution. Dave
-------------------------------------------------- From: "Daniel Fischer"
Sent: Saturday, January 17, 2009 10:35 PM To: "Alberto G. Corona " ; Subject: Re: [Haskell-cafe] runghc Setup.hs doitall Am Samstag, 17. Januar 2009 23:20 schrieb Alberto G. Corona:
Hi guys:
I don´t know how difficult really is, but it seens that it could be done because all the necessary elements are there (except perhaps the mapping package name-hackage url): Why hasn´t been done yet Is unknown to me. It would be very useful and a big save of time to have a cabal commad
"chech-dependencies-and-install-them-by-downloading-them-from-hackage-then- configure-build-and-install-this-package?. The unix installers do is t from binaries and are obsolete, so I have to do it manually with cabal everytime when i download a new compiler version from haskell.org.
Cheers Alberto.
Use cabal-install:
cabal update && cabal install foo
checks for dependencies, downloads and builds them automatically (if possible).
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (8)
-
Alberto G. Corona
-
Daniel Fischer
-
David Leimbach
-
Don Stewart
-
Duncan Coutts
-
Jeff Wheeler
-
Peter Robinson
-
Sebastian Sylvan