Haskell executables dynamic vs static linking

Jens Petersen petersen at redhat.com
Thu Mar 13 04:31:45 UTC 2014


[sorry Sébastien, this was my original reply to your mail
 which I thought I had already posted but seems not!]

> The general packaging guidelines forbid static linking. Now that ghc
> supports dynamic linking, shouldn't we just follow those guidelines?

We do already, as far as possible.

I am not sure yet if Fedora secondary archs will also get
shared libs or not with ghc-7.8.

> Is there an issue specific to Haskell that makes it harder than with other
> languages?

Well I tried to explain the issues in my original posting.
I guess I could go into more detail.

But perhaps you're right in that there are other solutions/workarounds:

- a copr repo with statically linked cabal-install for example
  (I already did one for pandoc for EPEL http://petersen.fedorapeople.org/pandoc-standalone/)
  I planning to do one or more big Haskell copr repos anyway,
  since koji + package reviews are hardwork/slow anyway.

- adding static subpackages: I think ghc could pull in hscolour-static
  and use /usr/bin/hscolour.static when bootstrapping say
  - then people could install cabal-install-static instead of cabal-install
    when testing a newer ghc snapshot etc

So perhaps we could propose updating the Haskell Guidelines to allow
both dynamic and static executables wrt to Haskell libs.

So maybe the problems are not so insurmountable. :)
I would rather avoid using alternatives (like emacs does) if possible...

Jens


More information about the haskell mailing list