[Haskell-cafe] Cross compiling Haskell from Linux to Windows with GHCs LLVM backend?

Krzysztof Skrzętnicki gtener at gmail.com
Fri Jun 13 14:07:12 UTC 2014

Interesting. On my Arch Linux with wine ver. 1.7.19 it seems to work
nicely, at least for simple cases. To test it I have just installed latest
Haskell Platform, then upgraded cabal-install to latest version and finally
I run sandboxed Yesod installation. All appears to be ok. Everything is
seem to be slower, compared to native Linux, but that is a minor issue and
rather expected.

I would expect some building problems with native libraries, but this is
always more problematic than just plain Haskell builds.


On Fri, Jun 13, 2014 at 12:10 PM, Ivan Perez <ivanperezdominguez at gmail.com>

> Hi
> Not that this will get your hopes up, but my two cents...
> I have never been able to get wine to play along. GHC tends to fail when I
> use wine (exceptions, dll's that misbehave). Maybe it behaves better now.
> If you manage to make it work, please, let us know. I use hudson to
> recompile packages for multiple architectures, and windows gives me most of
> the headaches.
> If you use llvm's backend, I wonder what would happen the moment you use
> Template Haskell. I have just recently started to use the Android backend,
> and I expect problems. (But maybe I'm mistaken.)
> So far I use Windows in a VirtualBox VM. That approach (obviously) works.
> I'll celebrate the day when ReactOS works as a full replacement of Windows.
> Ivan
> On 13 June 2014 08:03, Krzysztof Skrzętnicki <gtener at gmail.com> wrote:
>> In the past I have succesfully compiled with Windows build of GHC simply
>> by using Wine. It might work for you as well. It worked surprisingly well
>> and without a single problem at the time. I was using GHC 6.8.2 back then.
>> --
>> Krzysztof
>> On Tue, Jun 10, 2014 at 10:59 AM, Rob Stewart <robstewart57 at gmail.com>
>> wrote:
>>> Hi,
>>> I compile my code with GHC on Linux, and don't have ready access to a
>>> Windows or a Mac operating system. Is it possible to use the GHC LLVM
>>> backend as a means to cross compile Haskell code to target multiple
>>> operating systems? I had envisaged it possible to generate the LLVM IR
>>> using GHCs -keep-llvm-files flag, and using LLVMs target triple flag
>>> to specify the CPU architecture and operating system of the users
>>> machine. I'd like to compile on Linux, to target WIndows and Mac
>>> machines.
>>> Strangely I cannot find blog posts or tutorials online for
>>> cross-compiling Haskell with GHC via LLVM.
>>> Is it possible? Thanks,
>>> --
>>> Rob
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140613/39b00253/attachment.html>

More information about the Haskell-Cafe mailing list