[darcs-users] _real_ cygwin build?

Salvatore Insalaco kirby81 at gmail.com
Tue Mar 3 07:52:05 UTC 2009

> On 2009-03-02, Tuomo Valkonen <tuomov at iki.fi> wrote:
>> Is there such a thing as a _real_ cygwin build without all sorts
>> of Windows support hacks? I don't need them; I just need the plain
>> old *nix darcs compiled against cygwin, without broken putty-ssh
>> and without path-mangling. The provided "cygwin" version doesn't
>> work; even local pushes fail.

Hello Tuomo,
to build a "real" cygwin darcs (i.e. a darcs executable that uses
cygwin posix libraries) you need a Cygwin GHC. Unfortunately, from
So GHC targets MinGW, not Cygwin. It is in principle possible to build
a version of GHC, GHC-cygwin, that targets Cygwin instead. The up-side
of GHC-cygwin is that Haskell programs compiled by GHC-cygwin can
import the (Haskell) Posix library. We do not support GHC-cygwin,
however; it is beyond our resources.

I'm not saying that it is not possible, it's just going to be a bumpy ride.

I think you have got two choices:

1) (the hardest one) Provide a cygwin build of GHC, or at least
detailed instructions to do that. With that build, you can try to
build darcs sources with automake/autoconf: there aren't so many
"windows hacks", the behaviours you are seeing on windows are mostly
provided by GHC. If there are any issues, we will be happy to try to
help you and add another "supported" platform on darcs binary page. I
think that we can't give you much help on building a cygwin GHC, I
think GHC ML is a better place for that.

2) (the easiest one) Try to make the current windows "mixed cygwin"
darcs.exe do what you want. If you file specific issues, e.g. "the
current  cygwin darcs.exe doesn't work with cygwin paths" or "it can't
use cygwin ssh", we can try to help you. GHC compiled programs on
Windows can't call cygwin executable directly, but you could wrap them
in cygwin.exe invocations (maybe there're better ways).

As I said, there aren't too many Windows-specific hacks, it's just
that on Windows we can't use Cygwin Posix library. For ssh support, we
just run ssh (or any command that is configured as ssh) on any
platform; on Windows we suggest the usage of putty, but you can use
anything you like, provided that can be run by GHC "runProcess" call.

If anyone has better knowledge of running cygwin programs from windows
executable, or reading cygwin environment variables, please stand up!


More information about the darcs-users mailing list