Personal tools

GHC under Wine

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
m (GHC under WINE moved to GHC under Wine)
(update current status / debug info)
Line 30: Line 30:
   
   
== Known problems ==
 
 
If you encounter specific, reproducible issues that are present in the latest release of wine you should file a bug report with the Wine project http://bugs.winehq.org (so long as one doesn't already exist for the issue)
 
If you encounter specific, reproducible issues that are present in the latest release of wine you should file a bug report with the Wine project http://bugs.winehq.org (so long as one doesn't already exist for the issue)
  +
  +
== Known problems ==
  +
  +
* removeDirectoryRecursive does not work correctly under most recent Wine - requires a [http://jeffz.name/wine/patches/0001-ntdll-modify-NtDeleteFile-to-fail-on-directories.patch patch to ntdll] - as such cabal does not work very well without this patch applied.
   
 
===Native DLLs===
 
===Native DLLs===
 
Wine isn't perfect (yet) but does offer a solution for using native dlls, as an alternative to builtin dlls if certain functions are not implemented or are buggy and not yet fixed. To configure this use winecfg where you can specify settings for the ordering of preferences for loading dlls, Builtin only, Native only, Builtin then Native and Native then Builtin.
 
Wine isn't perfect (yet) but does offer a solution for using native dlls, as an alternative to builtin dlls if certain functions are not implemented or are buggy and not yet fixed. To configure this use winecfg where you can specify settings for the ordering of preferences for loading dlls, Builtin only, Native only, Builtin then Native and Native then Builtin.
  +
  +
[http://wiki.winehq.org/winetricks winetricks] can be useful for installing common native dlls or software
  +
  +
==Debugging==
  +
  +
You can enable tracing of various components within Wine to aid in debugging issues with Wine by using [[http://wiki.winehq.org/DebugChannels Wine Debug Channels]].
  +
  +
==External Links==
  +
  +
[[http://appdb.winehq.org/objectManager.php?sClass=application&iId=6691 GHC at the Wine AppDB]]

Revision as of 01:09, 29 August 2008

GHC runs fairly well under Wine. Here's a guide on how to get it working.

Contents

1 Installation

First, get the latest version of Wine from http://www.winehq.com/site/download and install it.

Next, grab the latest windows version of GHC from http://haskell.org/ghc/download.html

installing ghc is as simple as typing: wine ghc-6.8.2-i386-unknown-mingw32.exe

Once this is all done, you should be good to start using GHC.

2 Testing

Create a simple haskell program to compile. Hello World examples are good. Try compiling it:

$ wine ghc -o hello --make HelloWorld.hs
Chasing modules from: HelloWorld.hs
Compiling Main             ( HelloWorld.hs, HelloWorld.o )
fixme:msvcrt:MSVCRT__sopen : pmode 0x01b6 ignored
fixme:msvcrt:MSVCRT__sopen : pmode 0x01b6 ignored
Linking ...
Wine exited with a successful status

And try running it:

$ wine hello
Hello, world!
Wine exited with a successful status

If it all works well then you should be able to compile your haskell programs for windows with wine.


If you encounter specific, reproducible issues that are present in the latest release of wine you should file a bug report with the Wine project http://bugs.winehq.org (so long as one doesn't already exist for the issue)

3 Known problems

  • removeDirectoryRecursive does not work correctly under most recent Wine - requires a patch to ntdll - as such cabal does not work very well without this patch applied.

3.1 Native DLLs

Wine isn't perfect (yet) but does offer a solution for using native dlls, as an alternative to builtin dlls if certain functions are not implemented or are buggy and not yet fixed. To configure this use winecfg where you can specify settings for the ordering of preferences for loading dlls, Builtin only, Native only, Builtin then Native and Native then Builtin.

winetricks can be useful for installing common native dlls or software

4 Debugging

You can enable tracing of various components within Wine to aid in debugging issues with Wine by using [Wine Debug Channels].

5 External Links

[GHC at the Wine AppDB]