[Haskell-cafe] HP/Cygwin and Curl

Claus Reinke claus.reinke at talk21.com
Tue Jun 8 16:40:59 EDT 2010

> Your condensed summary was my understanding, but if I try to issue
>    Cabal install --reinstall cmu
> It works every time from a MSYS shell, but with Cygwin I get

If MSYS works for you, why not stick with it?-)

Cygwin with MinGW tools should work, but it is very easy to mess up
with this setup (configure scripts might not notice that they are on
windows and use the wrong calling convention, Cygwin libraries and
compiler tools might be called accidentally if they are installed, and
so on). Of course, the more people give up and switch to MSYS, the
smaller the chances that such bugs (things that accidentally work when
using MSYS, or with a certain directory layout) get reported and fixed.

>    Linking dist\build\cmu\cmu.exe ...
>   C:\Program Files\Haskell Platform\2010.1.0.0\lib\..\mingw\bin\windres:
> can't open temporary file `\/cca04932.irc': No such file or directory
>    cabal.exe: Error: some packages failed to install:
>   cmu-1.2 failed during the building phase. The exception was:
>   ExitFailure 1
> ('cmu' is just an example; the same behaviour seems apparent whatever the
> package; I see something very similar when I ask GHC to compile hello.hs.)

You could try running 'ghc -v hello.hs' and check the windres command
for oddities. I have no problems building a simple hello world from Cygwin:

    $ uname -a
    CYGWIN_NT-6.1-WOW64 VAIO 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin

    $ type ghc
    ghc is hashed (/cygdrive/c/haskell/ghc/ghc-

    $ ghc tst.hs

    $ ./main.exe
    Hello, World!

> The general answer I seem to have been getting (and responses I have seen
> elsewhere top this problem) is 'don't expect the Haskell tools to work 
> with
> Cygwin'.

That tends to be a self-fulfilling prophesy, similar to 'don't expect the 
tools to work on Windows (because so many people rely on unixisms)'. But
the result is that problems do surface more often in this configuration. If 
want to investigate, you could file a report on the HP trac.


> At any rate it seems that, for some people at least, the latest version of
> the Haskell tools won't work when launched from Cygwin Bash.
> Chris
> -----Original Message-----
> From: haskell-cafe-bounces at haskell.org
> [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Claus Reinke
> Sent: 08 June 2010 09:02
> To: haskell-cafe at haskell.org
> Subject: Re: [Haskell-cafe] HP/Cygwin and Curl
>> Thanks Stephen--that was related to my original question, about using
>> HP with Cygwin. The answer seems to be No!--you must use MSYS (for
>> real work).
> The short version:
> - Cygwin provides commandline tools, compilers and libraries
> - MSYS provides commandline tools for the MinGW compilers and libraries
> You can use the commandline tools from either Cygwin or MSYS, but you need
> to compile and link with the compilers and libraries from MinGW.
> Cygwin's gcc produces binaries that live in a unix-emulation on top of
> windows, and depend on a cygwin dll to act as a translator. MinGW's gcc
> produces native windows binaries.
> Claus
> http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/ghci-cygwin.html
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list