Re: [Haskell-cafe] ANNOUNCE: Sifflet visual programming language, release 1.0!

gdweber@iue.edu wrote:
I hope it does work on Windows! I don't know of any reason why not, but I haven't tested it on Windows. Please let me know if there's any problem on that platform.
Unfortunately, yes: Indirectly it requires the "curl" package. Since that's a binding to a C library, it won't build on Windows. (I have every reason to believe that everything else will work though...)

Thanks for the report! It surprises me that curl is a problem. I see on the curl web site there are multiple versions for Windows: http://curl.haxx.se/download.html Have you tried installing any of those? If so, and it still doesn't work, could you be more specific about why not? I think the dependency on curl comes through my using hxt to process the SiffML XML files -- it's unfortunate, because Sifflet doesn't really need curl for what it's doing: because all the XML files are local, there's no need for network access. HXT is rather a *large* package! Greg On 2010-Aug-19, Andrew Coppin wrote:
gdweber@iue.edu wrote:
I hope it does work on Windows! I don't know of any reason why not, but I haven't tested it on Windows. Please let me know if there's any problem on that platform.
Unfortunately, yes: Indirectly it requires the "curl" package. Since that's a binding to a C library, it won't build on Windows.
(I have every reason to believe that everything else will work though...)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- ___ ___ __ _ / _ \ / _ \| | | | Gregory D. Weber, Associate Professor / /_\// / | | | /\ | | Indiana University East / /_\\/ /__| | |/ \| | http://mypage.iu.edu/~gdweber/ \____/\_____/\___/\__/ Tel. (765) 973-8420; FAX (765) 973-8550

gdweber@iue.edu wrote:
Thanks for the report!
It surprises me that curl is a problem. I see on the curl web site there are multiple versions for Windows:
The problem is not usually that the C library doesn't exist for Windows (they tend to be widely portable, in fact). Rather, the problem is that Cabal won't build the Haskell binding. I've tried in the past, and I've never yet got it to work even once. The only known exception is Gtk2hs, which somehow manages to build on Windows. In the case of Curl, Cabal downloads it, unpacks it, sees that it uses a autoconf script and dies. (At least Cabal now correctly reports the /cause/ of the problem - the configure script.) Things like autoconf, automake, bash, sed, awk, etc. do not usually exist on Windows, so any packages that require these tools won't build. And even the packages that don't usually fall over being unable to find the C headers in C:\usr\local or something dumb like that.
I think the dependency on curl comes through my using hxt to process the SiffML XML files -- it's unfortunate, because Sifflet doesn't really need curl for what it's doing: because all the XML files are local, there's no need for network access. HXT is rather a *large* package!
...in other words, it's an unfortunate indirect dependency. Welcome to automatic dependency tracking. :-) Now, if Curl was in the Haskell Platform (i.e., pre-built for me)...

There are some instructions here for building curl with minGW http://haskell.forkio.com/Home/curl-win32 I've never needed curl myself so haven't first hand experience, but the guide is pretty recent thus one might expect it to work.

On Fri, 20 Aug 2010 08:30:24 +0200, Andrew Coppin
gdweber@iue.edu wrote: The problem is not usually that the C library doesn't exist for Windows (they tend to be widely portable, in fact). Rather, the problem is that Cabal won't build the Haskell binding. I've tried in the past, and I've never yet got it to work even once. The only known exception is Gtk2hs, which somehow manages to build on Windows.
In the case of Curl, Cabal downloads it, unpacks it, sees that it uses a autoconf script and dies. (At least Cabal now correctly reports the /cause/ of the problem - the configure script.) Things like autoconf, automake, bash, sed, awk, etc. do not usually exist on Windows, so any packages that require these tools won't build. And even the packages that don't usually fall over being unable to find the C headers in C:\usr\local or something dumb like that.
Curl compiles without problems on my Windows XP system. There is a HaskellWiki page [0] that describes how to compile packages with Unix scripts on Windows systems. Regards, Henk-Jan van Tuyl [0] http://www.haskell.org/haskellwiki/Windows#Tools_for_compilation -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --

Henk-Jan van Tuyl wrote:
Curl compiles without problems on my Windows XP system. There is a HaskellWiki page [0] that describes how to compile packages with Unix scripts on Windows systems.
I did once try setting up MinGW and MSYS, just to see if I could make it work. But after many, many hours of trying to comprehend the terse documentation, I finally gave up. It's just too hard to get it to work. (I never even got as far as *trying* to build anything; I just couldn't install the tools.)

Thanks to both Stephen Tetley and Henk-Jan van Tuyl for pointing them out those pages on installing curl and, in general, Unixy software, on Windows. Both looked rather cryptic to me also, although I did not try them out. I will try my hand at building a Windows binary for Sifflet and making it available for folks to download. I have recently acquired a Windows 7 system, partly for this very purpose. It's a guest host under Linux/KVM, and I think it's 32-bit Windows so it'll be a 32-bit binary, although my hardware is x86_64. Will that be okay? I haven't done *anything* with Haskell on Windows yet! So the first step will be installing the Haskell Platform, which I hope will go smoothly, but the rest might take some time, if I succeed at all. Other options seem to be: - Asking for curl and hxt to be included in the Haskell Platform - Asking the author of hxt to split it into parts that do and do not depend on curl. But either of these would also probably take some time, if they are approved at all. So, don't hold your breath, Andrew, but I'll try. * http://haskell.forkio.com/Home/curl-win32 http://www.haskell.org/haskellwiki/Windows#Tools_for_compilation Greg On 2010-Aug-20, Andrew Coppin wrote:
Henk-Jan van Tuyl wrote:
Curl compiles without problems on my Windows XP system. There is a HaskellWiki page [0] that describes how to compile packages with Unix scripts on Windows systems.
I did once try setting up MinGW and MSYS, just to see if I could make it work. But after many, many hours of trying to comprehend the terse documentation, I finally gave up. It's just too hard to get it to work. (I never even got as far as *trying* to build anything; I just couldn't install the tools.)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- ___ ___ __ _ / _ \ / _ \| | | | Gregory D. Weber, Associate Professor / /_\// / | | | /\ | | Indiana University East / /_\\/ /__| | |/ \| | http://mypage.iu.edu/~gdweber/ \____/\_____/\___/\__/ Tel. (765) 973-8420; FAX (765) 973-8550

gdweber@iue.edu wrote:
I will try my hand at building a Windows binary for Sifflet and making it available for folks to download.
I too was going to have a go at this. I had a Windows VM (so I don't ruin my *real* Windows box) and I was going to set up all the junk which is apparently necessary to make C bindings build. And then I was going to build all the libraries I want but can't have, package them up into nice little installers with NSIS, and make the binary installers available for each version of the Haskell Platform. But, as I say, I utterly failed to make MinGW and MSYS actually work. I never got as far as installing HP at all!
I have recently acquired a Windows 7 system, partly for this very purpose. It's a guest host under Linux/KVM, and I think it's 32-bit Windows so it'll be a 32-bit binary, although my hardware is x86_64. Will that be okay?
Better than nothing, I'd imagine. In fact, I'm not actually sure whether there *is* a 64-bit edition of GHC itself... Anybody know?
I haven't done *anything* with Haskell on Windows yet! So the first step will be installing the Haskell Platform, which I hope will go smoothly, but the rest might take some time, if I succeed at all.
HP installs under Windows just fine from what I've seen. I know GHC used to have an issue where only the current user's search path is updated, not the global one; I haven't tested whether HP does this. (Makes it fun if you have to log in as admin to install things; then only admin can run GHC!) I was surprised and pleased to discover that HP now contains zlib. (And it works!) I was surprised and disappointed to discover that they're planning to remote OpenGL support from HP. Presumably it's impossible to build from source if you want it, so there goes the end of that! Until now, I've held off using HP because Gtk2hs won't work with it. With the new Cabalised, Windows-buildable Gtk2hs, I believe this is no longer an issue. So maybe I'll finally update my main work machine to HP.
Other options seem to be: - Asking for curl and hxt to be included in the Haskell Platform - Asking the author of hxt to split it into parts that do and do not depend on curl. But either of these would also probably take some time, if they are approved at all.
Just including Curl in HP would presumably fix the problem. (I have a vague recollection that the Hackage Darcs package secretly requires libcurl, but doesn't actually depend on the Haskell "curl" package...) It's probably generally useful enough that it could be considered. Alternatively, make it possible to build C bindings on Windows. Yeah, don't hold your breath!
So, don't hold your breath, Andrew, but I'll try.
Good luck... ;-)

Andrew, I was going to chastise you for being the only Windows developer who has problems with MinGW / MSYS and spreading that unpleasant internet commodity "FUD". However, I've just gone back to mingw.org and its gone from "somewhat confusing" circa the last time I installed (Christmas 2009) to "frankly abysmal". So while is was easy to install MinGW / MSys a year ago I'll willing concede that it is difficult now. [A side issue - anyone who thinks socializing Hackage is a good idea should pay mingw.org a visit...] I followed this guide the last time I installed: http://www.mingw.org/faq/How_do_I_install_MSYS Having a slightly out-of-date installation shouldn't be a problem for Haskell development. Another side issue, commentators seem to be point to be pointing to TDM-GCC for a sanely packaged version of MinGW, but it isn't accompanied by MSys so wouldn't work for Haskell development.

Hello! I take it that the problem is that libcurl is a C library with a Unix-like build system, and that is the problem that needs Cygwin, right? I'm not a Windows expert, but having C code is perfectly fine, I guess. My 'hipmunk' library includes a whole C library. When I tried to 'cabal install' it on Windows, it worked flawlessly even if I never really did develop it for Windows. Given that the problem is building libcurl, and not the Haskell curl package, won't a binary distribution of libcurl cut it? I was thinking of [1], where there is an installer for libcurl. http://curl.haxx.se/download.html#Win32 Cheers! =) -- Felipe.

On 22 August 2010 13:48, Felipe Lessa
I take it that the problem is that libcurl is a C library with a Unix-like build system, and that is the problem that needs Cygwin, right?
No - generally you don't want to compile bindings with Cygwin, compiling with Cygwin brings in dependencies on cygwin1.dll which doesn't work well with GHC.

Felipe Lessa wrote:
I take it that the problem is that libcurl is a C library with a Unix-like build system, and that is the problem that needs Cygwin, right?
One needs a compiler and libraries on the one hand, and a bunch of command-line tools on the other hand. On Windows, MinGW provides the former, while Cygwin provides a package manager to install the latter. MinGW seems to be bundled with the Haskell platform on Windows, so that should be ok. The Cygwin tools however have to be installed in addition to the Haskell platform, which is no big deal, but somewhat annoying. There are two steps to be done: (1) Install the core of Cygwin, and put it in the search path after the MinGW bundled with the Haskell platform. (2) If a cabal package fails to install because some tools (bash, perl, sed, make, ...) are missing, install the missing tool using the Cygwin package manager. So a cabal package is better suited for installation on Windows if it does not depend on any command-line tools for building (or operation, of course). In practice, that means that a portable Setup.hs should contain Haskell code, not system calls to command-line tools. Tillmann

On 22 August 2010 16:56, Tillmann Rendel
One needs a compiler and libraries on the one hand, and a bunch of command-line tools on the other hand. On Windows, MinGW provides the former, while Cygwin provides a package manager to install the latter.
Its not ideal to use MinGW with Cgywin. For Haskell development, you want to be linking to C libraries compiled with MinGW's GCC. You can use Cygwin, and cross compile with MinGW's GCC, but this is likely to be more tiresome than using MSys and makes a problem for every compile and build - as you are cross compiling you can't just ./configure && make && make install. Whereas MSys just has the initial problem that it no longer has a comprehensible install plan. The hyperbole in my original message was somewhat tongue-in-cheek, but there's a fair amount of truth in it - MinGW / MSys is a very good system, its sad that it is in such a crazy state at the moment. MSys has all the tools (bash, perl, make, autoconf) needed for compiling and excepting the installer situation, it is very stable.

Felipe Lessa wrote:
Hello!
I take it that the problem is that libcurl is a C library with a Unix-like build system, and that is the problem that needs Cygwin, right?
No. It's completely possible to download a pre-built binary for libcurl (or just about any other OSS library, for that matter). The problem is that the Haskell "curl" package expects to just run autoconf and this will actually work. Naturally, on Windows it just complains that no such command exists and dies. (Actually, cabal-install is smart enough to detect this situation and exit gracefully, explaining what the problem is in a sane mannar. It still won't build it though.) Similar problems with Haskell packages that expect to be able to use Make, Bash scripts, run Awk and so forth. These tools do not exist on Windows. (Unless you install MSYS / MinGW.)
I'm not a Windows expert, but having C code is perfectly fine, I guess. My 'hipmunk' library includes a whole C library. When I tried to 'cabal install' it on Windows, it worked flawlessly even if I never really did develop it for Windows.
Oh, if you just want to install a library which _includes_ C code, that's usually fine. The problem is if you want to access an external C library. Cabal can't find the header files, can't run autoconf, and general chaos ensues.
Given that the problem is building libcurl, and not the Haskell curl package, won't a binary distribution of libcurl cut it?
Like I say, that part isn't the problem.

On Sun, Aug 22, 2010 at 5:04 PM, Stephen Tetley
Andrew, I was going to chastise you for being the only Windows developer who has problems with MinGW / MSYS and spreading that unpleasant internet commodity "FUD". However, I've just gone back to mingw.org and its gone from "somewhat confusing" circa the last time I installed (Christmas 2009) to "frankly abysmal". So while is was easy to install MinGW / MSys a year ago I'll willing concede that it is difficult now.
Agreed. I tried to set up an msys development environment to compile chicken scheme a couple of weeks ago, and, quite frankly, gave up. I settled for installing mingw and putting the mingw bin directory first in my cygwin path. This worked very well indeed, even though it isn't an officially supported chicken build environment, so it's worth experimenting with for haskell as well. (Note that it needs a reboot of windows after setting up the cygwin environment variables; I never figured out why). martin

Stephen Tetley wrote:
Andrew, I was going to chastise you for being the only Windows developer who has problems with MinGW / MSYS and spreading that unpleasant internet commodity "FUD". However, I've just gone back to mingw.org and its gone from "somewhat confusing" circa the last time I installed (Christmas 2009) to "frankly abysmal". So while is was easy to install MinGW / MSys a year ago I'll willing concede that it is difficult now.
[A side issue - anyone who thinks socializing Hackage is a good idea should pay mingw.org a visit...]
I followed this guide the last time I installed:
http://www.mingw.org/faq/How_do_I_install_MSYS
Having a slightly out-of-date installation shouldn't be a problem for Haskell development.
Well, part of the issue is that it just annoys me as a matter of principle that I have to install a *Unix* emulator in order to write *Windows* software. What's up with that? But anyway, as I say, I figured I could just install the emulator on a VM, build the libraries once, and then use the binaries anywhere. Unfortunately, I was eventually forced to give up after trying to install MSYS / MinGW. You'd think you could just download a file and unzip it, or maybe run an installer... but no. That would be far too easy.

Andrew Coppin wrote:
Well, part of the issue is that it just annoys me as a matter of principle that I have to install a *Unix* emulator in order to write *Windows* software. What's up with that?
You've actually got that a bit backwards. GHC, Curl and all the other things you are complaining about are all pieces of software that started life on Unix and just so happen to be able to (if you're luck) compile on windows. What you need is not a Unix emaulator, but the build tools that are used on Unix but on windows. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/

Andrew Coppin wrote:
I too was going to have a go at this. I had a Windows VM (so I don't ruin my *real* Windows box) and I was going to set up all the junk which is apparently necessary to make C bindings build. And then I was going to build all the libraries I want but can't have, package them up into nice little installers with NSIS, and make the binary installers available for each version of the Haskell Platform.
But, as I say, I utterly failed to make MinGW and MSYS actually work. I never got as far as installing HP at all!
I'm going to be a bit of a heretic here and suggest that you attack this problem from the other end. How you ask? Install Debian Testing/Unstable with Wine in a VM and cross compile to Windows. For C libraries that originate on Unix, cross compiling them on from Linux -> Windows is often easier than getting them to compile on Windows. For the Haskell stuff, install the windows version of GHC using Wine (I messed with this a bit and it worked like a charm). Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/

On 23 August 2010 06:12, Erik de Castro Lopo
I'm going to be a bit of a heretic here and suggest that you attack this problem from the other end. How you ask?
Install Debian Testing/Unstable with Wine in a VM and cross compile to Windows.
No - that's a completely azzback solution. MinGW / MSYS works fine, the problem is solely that the documentation of the install procedure has gone awry, with conflicting and seemingly out of date guides on the mingw.org website. The best solution would be to sign up to the mingw-user mailing list and ask what the currently preferred method is for installing.

I'd agree with Stephen.
I've used MinGW / msys for years and would never consider doing any
open source development (especially involving C) without it.
In the past, installing it has only taken a few minutes. That still
looks to be the case for MinGW but it now appears that msys has been
split into a confusing and long list of packages. I think that it
needs a standard installer as well (in fact the combined MinGW/msys
package needs one standard installer as I think it is rare these days
to use one without the other.)
Kevin
On Aug 23, 8:53 am, Stephen Tetley
On 23 August 2010 06:12, Erik de Castro Lopo
wrote: I'm going to be a bit of a heretic here and suggest that you attack this problem from the other end. How you ask?
Install Debian Testing/Unstable with Wine in a VM and cross compile to Windows.
No - that's a completely azzback solution.
MinGW / MSYS works fine, the problem is solely that the documentation of the install procedure has gone awry, with conflicting and seemingly out of date guides on the mingw.org website.
The best solution would be to sign up to the mingw-user mailing list and ask what the currently preferred method is for installing. _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Aug 23, 2010 at 12:36:18AM -0700, Kevin Jardine wrote:
In the past, installing it has only taken a few minutes. That still looks to be the case for MinGW but it now appears that msys has been split into a confusing and long list of packages. I think that it needs a standard installer as well (in fact the combined MinGW/msys package needs one standard installer as I think it is rare these days to use one without the other.)
When I need a msys+mingw environment, I tend to turn to msysgit's netinstall package. The only downside to it that I've noticed is that you seem to get a git source tree for free when installing, as well as a spurious sdl-config binary. http://code.google.com/p/msysgit/ -- Lars Viklund | zao@acc.umu.se
participants (10)
-
Andrew Coppin
-
Erik de Castro Lopo
-
Felipe Lessa
-
gdweber@iue.edu
-
Henk-Jan van Tuyl
-
Kevin Jardine
-
Lars Viklund
-
Martin DeMello
-
Stephen Tetley
-
Tillmann Rendel