[Haskell-beginners] Large binary overhead?
Christopher Howard
christopher.howard at frigidcode.com
Thu May 26 07:04:58 CEST 2011
On 05/25/2011 08:02 PM, Erik de Castro Lopo wrote:
> Christopher Howard wrote:
>
>> I'm still going through the GHC tutorial, so be patient with me: But why
>> is it that my GHC-produced executables are always so large? Even my one
>> line Hello World program ends up being over 500KB. I thought maybe it
>> was because all of the functionality was statically compiled in, but I
>> used ldd and saw that my hello world binary links dynamically to 10
>> different C libraries.
>
> Its that size because the Haskell libraries are statically linked
> into your program.
>
> See this SO question/answer:
>
> http://stackoverflow.com/questions/6115459/small-haskell-program-compiled-with-ghc-into-huge-binary
>
> Erik
Thanks! Great link! I only wish I had known about that sooner... It
looks like I'll need to reinstall at least a few dozen modules with
--enabled-shared. I'm surprised that cabal-install doesn't enable that
by default.
--
frigidcode.com
theologia.indicium.us
More information about the Beginners
mailing list