patch applied (cabal-install): Rewrite the bootstrap.sh script

Thu Jan 15 02:22:10 PST 2009 Duncan Coutts

Hello, On Thursday 15 January 2009 12:25, Duncan Coutts wrote:
Thu Jan 15 02:22:10 PST 2009 Duncan Coutts
* Rewrite the bootstrap.sh script Hopefully more useful and more robust.
Yes, hopefully. A while back, I ran bootstrap.sh under Windows (with MSYS as I recall) and it sort of failed, I presume that the details are not interesting. I (think I) know, now, that you are not supposed to do that, that under Windows, you must install the dependencies individually. Getting to the point here: I don't see a check on the environment anywhere, I am not sure how to do that, but you probably know. In any case, adding a check that produces an error message if you try to run this script under (MSYS or Cygwin) under Windows would seem valuable. Had such a check been in place at the time a while back that I refer to, I would have been spared some agony.
---
Thanks and best regards Thorkil

On Thu, 2009-01-15 at 18:28 +0100, Thorkil Naur wrote:
Hello,
On Thursday 15 January 2009 12:25, Duncan Coutts wrote:
Thu Jan 15 02:22:10 PST 2009 Duncan Coutts
* Rewrite the bootstrap.sh script Hopefully more useful and more robust. Yes, hopefully. A while back, I ran bootstrap.sh under Windows (with MSYS as I recall) and it sort of failed, I presume that the details are not interesting. I (think I) know, now, that you are not supposed to do that, that under Windows, you must install the dependencies individually.
Getting to the point here: I don't see a check on the environment anywhere, I am not sure how to do that, but you probably know. In any case, adding a check that produces an error message if you try to run this script under (MSYS or Cygwin) under Windows would seem valuable. Had such a check been in place at the time a while back that I refer to, I would have been spared some agony.
Patches to make the script work on windows or to detect it and fail gracefully would be gratefully accepted. Indeed I would like to invite people to test the new script on various platforms and send in any patches. I've only tested on Linux and Solaris so far. Duncan

Hello Duncan, On Thursday 15 January 2009 20:36, Duncan Coutts wrote:
On Thu, 2009-01-15 at 18:28 +0100, Thorkil Naur wrote:
Hello,
On Thursday 15 January 2009 12:25, Duncan Coutts wrote:
Thu Jan 15 02:22:10 PST 2009 Duncan Coutts
* Rewrite the bootstrap.sh script Hopefully more useful and more robust. Yes, hopefully. A while back, I ran bootstrap.sh under Windows (with MSYS as I recall) and it sort of failed, I presume that the details are not interesting. I (think I) know, now, that you are not supposed to do that, that under Windows, you must install the dependencies individually.
Getting to the point here: I don't see a check on the environment anywhere, I am not sure how to do that, but you probably know. In any case, adding a check that produces an error message if you try to run this script under (MSYS or Cygwin) under Windows would seem valuable. Had such a check been in place at the time a while back that I refer to, I would have been spared some agony.
Patches to make the script work on windows or to detect it and fail gracefully would be gratefully accepted.
I would gladly work on that, but to make sure that I am not spending a lot of effort covering ground that has already been tread by others, could you tell me why the bootstrap.sh script is not being recommended for Windows (using MSYS and/or Cygwin)? On http://hackage.haskell.org/trac/hackage/wiki/CabalInstall I read that bootstrap.sh is for "Quick Installation on Unix". I seem to recall that, somewhere in the vicinity of that, an explicit statement to the effect "On Windows, you have to install the dependencies (zlib, etc.) by hand, then cabal-intall itself, using the "good old" runhaskell [Ss]etup.{,l}hs {configure,build,install} method" were written. But now I cannot find it. So, is this failure to recommend bootstrap.sh for Windows (using MSYS and/or Cygwin) simply a matter of not having the possibility of testing it? Or that it failed the first time somebody tried and there was no obvious explanation? Or is there, perhaps, some serious problem that needs to be solved to have any hope of making bootstrap.sh work under Windows (with MSYS and/or Cygwin)?
...
Thanks and best regards Thorkil

On Thu, 2009-01-15 at 23:50 +0100, Thorkil Naur wrote:
Patches to make the script work on windows or to detect it and fail gracefully would be gratefully accepted.
I would gladly work on that, but to make sure that I am not spending a lot of effort covering ground that has already been tread by others, could you tell me why the bootstrap.sh script is not being recommended for Windows (using MSYS and/or Cygwin)? On http://hackage.haskell.org/trac/hackage/wiki/CabalInstall I read that bootstrap.sh is for "Quick Installation on Unix". I seem to recall that, somewhere in the vicinity of that, an explicit statement to the effect "On Windows, you have to install the dependencies (zlib, etc.) by hand, then cabal-intall itself, using the "good old" runhaskell [Ss]etup.{,l}hs {configure,build,install} method" were written. But now I cannot find it.
So, is this failure to recommend bootstrap.sh for Windows (using MSYS and/or Cygwin) simply a matter of not having the possibility of testing it? Or that it failed the first time somebody tried and there was no obvious explanation? Or is there, perhaps, some serious problem that needs to be solved to have any hope of making bootstrap.sh work under Windows (with MSYS and/or Cygwin)?
I think it's not impossible that it could be made to work, though the utility on windows is lower than on other platforms since we can provide binaries for windows relatively easily. It's still useful for non-released versions of course. The main issues for windows in the script I think will be the use of $HOME, and the need for wget or curl. And of course the fact that it needs MSYS etc in the first place. Of course it may well be useful to the few ghc hackers who have MSYS. Even if it does work I would not change the documentation to suggest it should be used on Windows because that would confuse and annoy the majority of Windows users who do not have MSYS etc. Duncan
participants (2)
-
Duncan Coutts
-
Thorkil Naur