Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2017-05-30 Thread Alberto Valverde
Hi Moritz, Sounds like it should be pretty straightforward to run GHCSlave on wine, so it might just work indeed. I'll build a nix environment for my app using your GHC branch and report back ASAP. However, what might block me won't be related to the cross-compilation per-se but to the migration

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2017-05-27 Thread Moritz Angermann
Hi Alberto, let me know if I can be of help. As you likely saw I’ve been writing this all up on https://medium.com/@zw3rk. With the outstanding diffs[1], this should hopefully just work. As I haven’t used windows or know the linker on windows, I’m not perfectly sure about the implications. It

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2017-05-27 Thread Alberto Valverde
Hi Ben, I've just found this email from almost a year ago. Sorry for ignoring it until now. Given the date it was sent I think I missed it when it was fresh while I was on vacation. Regarding the question, I have abandoned the work I was doing on getting cross-compilation for Windows to work

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-08-26 Thread Ben Gamari
Alberto Valverde writes: > On Thu, Jul 7, 2016 at 9:30 AM, Simon Marlow wrote: > >> I agree, named pipes are probably a better plan, perhaps a better solution >> overall than the way we currently pass FD numbers on the command line. Do >> named pipes

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-07 Thread Alberto Valverde
On Thu, Jul 7, 2016 at 9:30 AM, Simon Marlow wrote: > On 6 July 2016 at 18:14, Ben Gamari wrote: > >> It would be great if there were some way we could make this work with >> named pipes. Not only does it side-step the dependency issue, but it >> feels

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-07 Thread Alberto Valverde
On Thu, Jul 7, 2016 at 2:57 AM, Moritz Angermann wrote: > Great work Alberto, > > Thanks :) > I’m in favor of adding some form of network layer, as there are scenarios > where you have to run the th compilation process on a different machine. > This would be the case for

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-07 Thread Simon Marlow
On 6 July 2016 at 18:14, Ben Gamari wrote: > > Alberto Valverde writes: > > > I've hacked around this to test the feasibility of the approach by using > > stdin/stdout instead of creating new pipes and, surprisingly, managed to > > cross-compile a

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-06 Thread Moritz Angermann
Great work Alberto, I’m in favor of adding some form of network layer, as there are scenarios where you have to run the th compilation process on a different machine. This would be the case for iOS for example. When I toyed with this ~2years ago, trying to port the out of process th solution

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-06 Thread Alberto Valverde
Ben, Phyx, On Wed, Jul 6, 2016 at 7:14 PM, Ben Gamari wrote: > (...) > Ahh, right. Out of curiosity what toolchain are you using to build your > stage 1 cross compiler? > I'm using an MXE (http://mxe.cc) environment in a Debian Jessie Docker image which has gcc-4.9.3.

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-06 Thread Phyx
> However, compiling TH by using wine and ghc-iserver.exe fails because the file descriptor ids that GHC passes as arguments to "wine ghc-iserv.exe" don't make sense in the emulated windows world. Just as a note, On Windows we don't pass FDs (As in the posix file descriptor) to the child process.

Re: Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-06 Thread Ben Gamari
Explicitly CCing Simon Marlow to ensure he sees this. Alberto Valverde writes: > Hello, > > I'm trying to put together a GHC 8.0.1 cross-compiler with Template Haskell > support. Initially to target Windows (32bits) from a Linux host but a > similar procedure should enable

Cross-compiling Template Haskell via -fexternal-interpreter and IPC

2016-07-06 Thread Alberto Valverde
Hello, I'm trying to put together a GHC 8.0.1 cross-compiler with Template Haskell support. Initially to target Windows (32bits) from a Linux host but a similar procedure should enable to target other platforms too. I'd like to contribute the patches back so I'm asking for advice on how to