Linux deployment requirements for GHC-produced binaries

Erik de Castro Lopo mle+hs
Thu Oct 3 19:43:53 UTC 2013


Brandon Allbery wrote:

> On Thu, Oct 3, 2013 at 1:10 PM, Yitzchak Gale <gale at sefer.org> wrote:
> 
> > ldd just says "not a dynamic executable".
> >
> 
> o.O I don't think the ghc runtime uses dlopen() to get at gmp (and I'm not
> sure that would even work in a static binary). You may need to resort to
> strace to find out what's trying to pull in libgmp.so.whatever. Unless this
> program is like xmonad and requires ghc behind the scenes to build
> something, in which case you would indeed need everything that ghc requires
> (and, of course, ghc itself).

I suspect the OP's exectuable is aleady being compiled static.

For the webapp I'm currently working on I get:

    > ldd test-webapp 
        linux-vdso.so.1 (0x00007fffcdd91000)
        libpq.so.5 => /usr/lib/libpq.so.5 (0x00007f973e0a8000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f973de90000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f973dc87000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f973da84000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f973d880000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f973d663000)
        libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f973d412000)
        liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f973d203000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f973cf8a000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f973cd82000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f973ca84000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f973c6d7000)
        libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f973c479000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f973c087000)
        libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f973bdb2000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f973bbae000)
        libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f973b96f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f973e2f9000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f973b757000)
        libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f973b53c000)
        libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007f973b27c000)
        libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007f973affc000)
        libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f973add3000)
        libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f973abc9000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f973a9c5000)
        libtasn1.so.3 => /usr/lib/x86_64-linux-gnu/libtasn1.so.3 (0x00007f973a7b3000)
        libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f973a593000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f973a38e000)

and libgmp is clearly listed in that.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Glasgow-haskell-users mailing list