Has anyone successfully built a Cygwin version of GHC?
Has anyone successfully built a Cygwin version of GHC (since Haskell switched from using Cygwin to MinGW)?
From the haskell website:
"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." https://ghc.haskell.org/trac/ghc/wiki/Building/Platforms/Windows
I tried, unsuccessfully, building with Cygwin's configure/gcc. This fails because I couldn't get the Windows version of GHC to use Cygwin's gcc. This seems to be due to the fact that Windows' version of GHC is "registerised" and can't output c code. Further, this "unregisterising-and-porting" method is no longer supported.
If anyone has accomplished this (since Haskell switched from using Cygwin to MinGW), I'd really like to know. Instructions on how to do this would be great but if anyone has accomplished this a simple "yes" would be invaluable.
My latest attempt was with MinGW/MSys with the cross-compilation flag --target=i386-unknown-cygwin32
. This is the resulting error:
HSC2HS libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.hs
librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:169
directive let cannot be handled in cross-compilation mode
make[1]: *** [libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.hs] Error 1 make: ***
[all] Error 2
Since programs need to be linked against cygwin1.dll
I don't think setting the target to a Linux architecture would be useful.
上一篇: 使用Cabal和GHC建造图书馆的差异