Re: Linking completely statically

"Herrmann, Andreas" <[email protected]>
Newsgroups gmane.comp.lang.haskell.glasgow.user
Message-ID <CAHXf2PAZXW_Aa52My2kw4ss=OBvgVeNZia-0y9=aKN_qn9wHiQ@mail.gmail.com>
Hi Volker,


> Is it possible to link the remaining libraries statically too?
>

Yes, it is possible to generate fully statically linked Haskell binaries.
Though it requires a bit of setup. For example the GNU C library glibc is
not really intended for fully static linking, but you can use musl as an
alternative libc instead.

Probably the easiest way is to use static-haskell-nix [1]. Usage
instructions are available in the project README. See [2] if you're not
familiar with Nix.

Recently, the Haskell extension to Bazel, rules_haskell, also gained the
ability to generate fully statically linked binaries building on top of
Nix, see [3].

Best, Andreas

[1]: https://github.com/nh2/static-haskell-nix
[2]: https://nixos.org/
[3]:
https://rules-haskell.readthedocs.io/en/latest/haskell-use-cases.html#building-fully-statically-linked-binaries

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.