开发者

Cygwin not recognized as Unix compatibility toolchain by Cabal

Greetings,

Trying to install a sample Snap Framework project using Cabal while on Windows 7 and in Cygwin.

cabal install

on my project in cygwin ends with

Resolving dependencies... Configuring unix-2.4.1.0... cabal.exe: The package has a './configure' script. This requires a Unix compatibility toolchain such as MinGW+MSYS or Cygwin. cabal.exe: Error: some packages failed to install: proj-0.1 depends on unix-2.4.1.0 which failed to install. unix-2.4.1.0 failed during the configure step. The exception was: ExitFailure 1

Sadly, I get this while inside cygwin.

So far, I've found that this discussion references a similar problem, but its proposed solution (install MinGW) seems like overkill, given that things should work within cygwin.

I'm fairly new to Haskell, so not really sure what conf files I should play with or what the actual dependencies are. Pointing me in the right 开发者_如何转开发direction would be much appreciated.


You need C:\cygwin and C:\cygwin\bin in your path. Then you can do this within cmd.


If I were doing it I'd try to install the unix package by hand using the Setup file:

Download the tar archive of unix-2.4.1.0 from Hackage and drop it into cygwin's /usr/local

> cd /usr/local
> tar xvfz unix-2.4.1.0.tar.gz
> cd unix-2.4.1.0

> runhaskell Setup.hs configure
> runhaskell Setup.hs build
> runhaskell Setup.hs install

If this works you can then go back to using Cabal to install Snap automatically.

Looking at the dependencies for Snap, unix and unix-compat are the only ones I'd expect problems with, most of the others seem to be pure Haskell libraries rather than FFI bindings.


Try using http://andlinux.org rather than Cygwin. I find it works better, is easier to install and maintain, and feels more like a linux box integrated with your windows setup. I think it is Debian-based, so if you are used to Ubuntu it should be an easy transition.


Also, if you already have Git installed on your Windows, you can just put C:\Program Files (x86)\Git\bin to your PATH. This worked for me.


Lastest Haskell platform from May 2011 and cygwin updated as of today worked like a charm for a simple Snap project for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜