Open spacekitteh opened 10 years ago
This is a really interesting feature request. I wouldn't have guessed that you can tell distcc to just use ghc. I wonder what caveats come up as you add support for cabal sandboxes?
Before getting too far into cabal support, I think we should convince some folks to try it out and report back with their findings. I expect that the first step in either case is figuring out how to do it manually. Has anyone already done that and written the steps/configuration down?
In the command line, you can tell distcc the compiler to use. I.e., after setting up hosts according to the man page, you just run "distcc ghc -o objectname -c source"
@spacekitteh This is really interesting.
At least for me, distcc is something like a black box: I don't want to learn a lot about it, just make compilation faster. The man page seems to include many options, and it's hard to understand what exactly is needed, and what isn't.
Could you elaborate a bit?
For example, if I have my machine (localhost
) and another machine (ssh, otherhost
), both have GHC 8.2.1 installed. I install distcc. What can I do next to a) compile a hello world with ghc directly using distcc, and b) compile with cabal + distcc.
Is it just:
export DISTCC_HOSTS='localhost otherhost'
And then run distcc cabal <options>
? Or is it something else?
distcc with cabal for CROSS would also be a plus. as rpi4-64 would be a useful plus.. ie ghc upgrades could use other os ie not Gentoo... as often less. ie debian arm64 on rpi4 for distcc emerge and bootstrap...
There should be a configuration option to allow cabal to automatically use distcc to distribute its compilation to multiple computers!
For those who don't know, distcc is a tool which distributes source code over multiple computers in order to compile in parallel. It's amazing when it works properly! http://en.wikipedia.org/wiki/distcc
See here for an example: https://stackoverflow.com/questions/10323419/is-there-a-distcc-like-tool-for-ghc