problem building for cygwin

Simon Marlow simonmar at microsoft.com
Mon Sep 27 07:19:20 EDT 2004


We prefer not to add more tool dependencies if it can be avoided.  There
are already a lot of things that can go wrong when building GHC, so
reducing dependencies is one way we try to keep things from getting out
of control.

In any case, I don't think there should be significant amounts of code
to write to get GHC building on cygwin.  It has worked in the past,
after all.

(we don't have a problem with scsh in particular, I'm sure it's a fine
tool, just trying to avoid requiring more tools to build GHC).

Cheers,
	Simon

On 22 September 2004 13:08, Ben Kavanagh wrote:

> Um. Also, with respect to these changes, I'd prefer strongly to write
> utils to help with this task in scsh instead of sh. scsh is available
> on all platforms where GHC is available. Would you be opposed to this?
> 
> I assume you've heard of scsh but if not scsh is a language embedded
> in Scheme48 with built in support for process control. You can check
> it out at www.scsh.net. 
> 
> Ben
> 
> 
> Quoting Simon Peyton-Jones <simonpj at microsoft.com>:
> 
>> [Narrowing to cvs-ghc list]
>> 
>>>> Hi I'm trying to build for cygwin.
>> ...
>>>> Ran ./configure --with-ghc=c:/ghc/ghc-6.2.1/bin/ghc --with-
>>>>                                          gcc=c:/cygwin/bin/gcc
>> 
>> Yes, in principle GHC *should* build perfectly well when built for
>> Cygwin (i.e. target=i386-unknown-cygwin), but as the building makes
>> clear (I hope) this isn't a path we have ever actually tried (though
>> others have, and succeeded too, at various times in the past).
>> 
>> There is no reason it should not work, but I bet the build system
>> tests the wrong flags sometimes. 
>> 
>> I rather think that you should ./configure with
>> -target=i386-unknown-cygwin, as Simon says.  I don't think you need
>> specify the host as well; I don't think it has much effect, if any.
>> Though I'm hazy about many aspects of the build system.
>> 
>>  | Sounds like the compiler's Makefile should be checking the host
>> rather
>>> than the target when adding -package unix too.
>> 
>> And this is a good example of what I mean by "testing the wrong
>> flags". 
>> 
>> If you are prepared to push this through till it works, I know there
>> are people who'd like a Cygwin GHC (that is, a GHC that compiles
>> programs that run under Cygwin) because it gives access to Posix
>> stuff.  If you'd like to send us build-system patches, we'll apply
>> them. 
>> 
>> Simon



More information about the Cvs-ghc mailing list