<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Volker,<div><br></div><div>You may also want to check out ghc-musl project <a href="https://github.com/utdemir/ghc-musl">https://github.com/utdemir/ghc-musl</a> which provides compiled docker images to build atatic executables for various ghc versions.</div><div><br></div><div>Cheers,<br><br><div dir="ltr">--<div>aycan</div></div><div dir="ltr"><br><blockquote type="cite">On Aug 11, 2020, at 5:59 AM, Volker Wysk <post@volker-wysk.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Am Dienstag, den 11.08.2020, 10:26 +0200 schrieb Herrmann, Andreas:</span><br><blockquote type="cite"><span>Hi Volker,</span><br></blockquote><span></span><br><span>Hi!</span><br><span></span><br><blockquote type="cite"><blockquote type="cite"><span>Is it possible to link the remaining libraries statically too?</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Yes, it is possible to generate fully statically linked Haskell</span><br></blockquote><blockquote type="cite"><span>binaries. Though it requires a bit of setup. For example the GNU C</span><br></blockquote><blockquote type="cite"><span>library glibc is not really intended for fully static linking, but</span><br></blockquote><blockquote type="cite"><span>you can use musl as an alternative libc instead.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Probably the easiest way is to use static-haskell-nix [1]. Usage</span><br></blockquote><blockquote type="cite"><span>instructions are available in the project README. See [2] if you're</span><br></blockquote><blockquote type="cite"><span>not familiar with Nix.</span><br></blockquote><span></span><br><span>This looks complicated, even though it is the easiest way. I've tried</span><br><span>to build it from the git sources, as well as from the latest release,</span><br><span>but that failed. I'd have to look into nix, which is new to me.</span><br><span></span><br><span>Be it as it may, it isn't that important for me right now.</span><br><span></span><br><span>But thank you very much for your tips. Maybe I'll be going back to them</span><br><span>later.</span><br><span></span><br><span></span><br><span>Cheers,</span><br><span>Volker</span><br><span></span><br><blockquote type="cite"><span>Recently, the Haskell extension to Bazel, rules_haskell, also gained</span><br></blockquote><blockquote type="cite"><span>the ability to generate fully statically linked binaries building on</span><br></blockquote><blockquote type="cite"><span>top of Nix, see [3].</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Best, Andreas</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>[1]: https://github.com/nh2/static-haskell-nix</span><br></blockquote><blockquote type="cite"><span>[2]: https://nixos.org/</span><br></blockquote><blockquote type="cite"><span>[3]: </span><br></blockquote><blockquote type="cite"><span>https://rules-haskell.readthedocs.io/en/latest/haskell-use-cases.html#building-fully-statically-linked-binaries</span><br></blockquote><span></span><br><span></span><br><span>_______________________________________________</span><br><span>Glasgow-haskell-users mailing list</span><br><span>Glasgow-haskell-users@haskell.org</span><br><span>http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</span><br></div></blockquote></div></body></html>