
Hello, Does anyone have any advice about how I might make a smallish GHC installation? The context is that I need to make a demo VM, which has a limited amount of space, and I'd like to have GHC installed on the system but the default GHC installation (~700MB) does not fit. The installation does not need to be complete---I don't need documentation, or profiling, or Template Haskell---and I only need to install a fairly limited set of libraries, just enough to build my project. I'd be happy to build a custom version of GHC, if that's the easiest way to achieve the goal. So, if you have experience doing something similar, or you know of what might be the best way to approach the problem, advice would be most welcome! -Iavor

Hi, Am Dienstag, den 11.10.2011, 11:02 -0700 schrieb Iavor Diatchki:
The context is that I need to make a demo VM, which has a limited amount of space, and I'd like to have GHC installed on the system but the default GHC installation (~700MB) does not fit. The installation does not need to be complete---I don't need documentation, or profiling, or Template Haskell---and I only need to install a fairly limited set of libraries, just enough to build my project. I'd be happy to build a custom version of GHC, if that's the easiest way to achieve the goal.
So, if you have experience doing something similar, or you know of what might be the best way to approach the problem, advice would be most welcome!
The debian ghc package comes without profiling (in ghc-prof) and documentation (ghc-doc). I’d be happy to hear that someone actually profits from that split :-) Installed size is about 250MB. So also in terms of efforts it might be easiest to bootstrap a minimal Debian and install ghc on it. Greetings, Joachim PS: I’m a Debian Developer, so of course my advice is biased :-) -- Joachim "nomeata" Breitner mail@joachim-breitner.de | nomeata@debian.org | GPG: 0x4743206C xmpp: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/

Also, I find UPX essential in this kind of situation. It can make
self-decompressing executables without a noticable slowdown (in fact, a
speedup on network drives!).
Typically I see something like this:
ghc: *54.6 MB*
after 'strip': *33.1 MB*
after UPX: *6.2* * MB*
-Ryan
On Tue, Oct 11, 2011 at 4:00 PM, Joachim Breitner
Hi,
Am Dienstag, den 11.10.2011, 11:02 -0700 schrieb Iavor Diatchki:
The context is that I need to make a demo VM, which has a limited amount of space, and I'd like to have GHC installed on the system but the default GHC installation (~700MB) does not fit. The installation does not need to be complete---I don't need documentation, or profiling, or Template Haskell---and I only need to install a fairly limited set of libraries, just enough to build my project. I'd be happy to build a custom version of GHC, if that's the easiest way to achieve the goal.
So, if you have experience doing something similar, or you know of what might be the best way to approach the problem, advice would be most welcome!
The debian ghc package comes without profiling (in ghc-prof) and documentation (ghc-doc). I’d be happy to hear that someone actually profits from that split :-) Installed size is about 250MB. So also in terms of efforts it might be easiest to bootstrap a minimal Debian and install ghc on it.
Greetings, Joachim
PS: I’m a Debian Developer, so of course my advice is biased :-)
-- Joachim "nomeata" Breitner mail@joachim-breitner.de | nomeata@debian.org | GPG: 0x4743206C xmpp: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On 11/10/2011 19:02, Iavor Diatchki wrote:
Hello,
Does anyone have any advice about how I might make a smallish GHC installation?
The context is that I need to make a demo VM, which has a limited amount of space, and I'd like to have GHC installed on the system but the default GHC installation (~700MB) does not fit. The installation does not need to be complete---I don't need documentation, or profiling, or Template Haskell---and I only need to install a fairly limited set of libraries, just enough to build my project. I'd be happy to build a custom version of GHC, if that's the easiest way to achieve the goal.
So, if you have experience doing something similar, or you know of what might be the best way to approach the problem, advice would be most welcome!
You can get rid of: - profiling (*_p.a, *.p_hi) - dynamic (*_dyn.a, *.dyn_hi) - the GHC package (rm -rf lib/ghc-7.2.1), assuming you don't need it - any other libraries you don't need - Haddock (it's as big as GHC) - all the documentation - possibly: all the GHCi libraries (HS*.o). I think GHCi will use the .a libraries if it can't find the .o versions, but you might need 7.2.1 for this to work, I don't remember Cheers, Simon
participants (4)
-
Iavor Diatchki
-
Joachim Breitner
-
Ryan Newton
-
Simon Marlow