Linux deployment requirements for GHC-produced binaries

Brandon Allbery allbery.b
Thu Oct 3 13:40:30 UTC 2013


On Thu, Oct 3, 2013 at 7:22 AM, Yitzchak Gale <gale at sefer.org> wrote:

> Do GHC-compiled binaries have a dynamic dependence on libgmp?
> If so, what are the exact requirements we need to communicate
> to our customers? Does this limit what versions of Linux
> we can claim that our product supports?
>
> Are there similar requirements and limitations regarding
> GNU Readline?
>

GHC uses static libraries for Haskell libraries, but the default (usually
dynamic) system libraries for everything else (gmp, glibc, readline, zlib,
etc.) unless you force static linking for everything. But on Linux, static
linking means an exact glibc version dependency for anything involving
plugins: mostly name service lookups (gethostbyname, user/group lookup,
etc.). And even bundling glibc and its plugins to avoid this can run into
conflicts with kernel APIs (often revealed as the program crashing
immediately with a itimer error).

glibc should almost always be dynamic. Ideally you would use `ldd` on
binaries to determine other dynamic dependencies that must be communicated
or provided; if necessary, you can arrange for only static versions of
those libraries to be available at link time, but if the library uses
plugins it will have the same issues that static linking glibc does.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20131003/55c49501/attachment.html>



More information about the Glasgow-haskell-users mailing list