[Haskell-cafe] Building Haskell stuff on Windows
duncan.coutts at worc.ox.ac.uk
Thu Nov 8 18:37:03 EST 2007
On Thu, 2007-11-08 at 22:04 +0000, Andrew Coppin wrote:
> >> Is that why Cabal packages never ever install on Windows?
> > Could you be more specific what your problems are?
> Not to the point that anybody is likely to be able to help me...
> According to the instructions, if I'm understanding this correctly,
> you're supposed to be able to unpack a package, and do
> runhaskell Setup configure
> runhaskell Setup make
> runhaskell Setup install
Yep, that's the procedure. Though as I keep telling everyone we're
trying to replace that with just:
cabal install blah
I tested this on Windows the other day, it's nearly working, just a
couple bugs to go.
> However, having so far tried this with not less than 3 different
> packages downloaded from Hackage, not one single one has ever worked. I
> suppose it's possible that I just happened to pick 3 packages that all
> have something wrong with them and normally it would work just fine...
> but all I've ever seen it do it fail.
> I tried to install HaXmL. It seemed to install, yet GHC insisted it
> wasn't installed.
Now that one I would expect to work under windows since it's pure
> OK, so I'm being a little over-harsh here. In the 3rd case, there are
> some extra instructions that are supposed to make it work - and who
> knows, maybe when I go try them SDL will work perfectly. But so far, 0
> out of 3 isn't very impressive. I had assumed that I'm just doing
> something wrong, or it isn't documented very well or something. But now
> I'm just wondering if it hasn't been tested on Windows very much...
That's a big part of the problem. Most developers cannot or do not test
under windows. This should not be a problem for pure Haskell modules but
for anything that binds to C libraries it's a major problem. Under unix
we can usually assume that the C library and it's header files are
installed in a standard location. Under windows that's never true.
Then as you noted, some packages use configure scripts which use sh.
That'll never fly on a standard windows install. Hopefully over time we
can replace those scripts with some better solution using Cabal.
> I realise it's much easier to sit here and criticise than to actually do
> something about fixing the problem. Clearly Cabal must work for
> somebody, so I was just wondering if my Cabal problems are because I'm
> on Windows, that's all.
So the ones I would expect to work out of the box on Windows are the
packages on hackage that use "build-type: Simple" and do not use
Apart from that, it's going to be hit and miss until we work out a
better system for reporting what works and what doesn't from hackage on
Some packages that use FFI work fine, like Cabal itself, or the zlib,
bzlib packages. But those were specifically tested on Windows.
> (For what it's worth, I actually managed to build Gtk2hs from source
> under Linux - and I've never built anything on Linux before! It was
> really quite simple though. I mean, took about 2 hours to think about
> it, but it's a very old laptop...)
(btw the Gtk2Hs INSTALL file describes how to configure for a quicker
More information about the Haskell-Cafe