Jul
30
2010
build static packages with statifier

A nice (but not perfect) tool to create a static package is: statifier

Here is a simple but useful mini how to:


(as root)

# echo -n 0 > /proc/sys/kernel/randomize_va_space

# ldd /usr/bin/pacman
    linux-gate.so.1 =>  (0xb7fe1000)
    libalpm.so.5 => /usr/lib/libalpm.so.5 (0xb7fa8000)
    libc.so.6 => /lib/libc.so.6 (0xb7e5d000)
    libfetch.so => /usr/lib/libfetch.so (0xb7e4f000)
    libarchive.so.2 => /usr/lib/libarchive.so.2 (0xb7e0f000)
    /lib/ld-linux.so.2 (0xb7fe2000)
    libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0xb7dbd000)
    libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0xb7c43000)
    libacl.so.1 => /lib/libacl.so.1 (0xb7c3c000)
    libattr.so.1 => /lib/libattr.so.1 (0xb7c37000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7c11000)
    liblzma.so.0 => /usr/lib/liblzma.so.0 (0xb7bef000)
    libbz2.so.1.0 => /lib/libbz2.so.1.0 (0xb7bde000)
    libz.so.1 => /usr/lib/libz.so.1 (0xb7bc9000)
    libdl.so.2 => /lib/libdl.so.2 (0xb7bc5000)
    libpthread.so.0 => /lib/libpthread.so.0 (0xb7bab000)

# statifier /usr/bin/pacman /tmp/pacman.static-3.4.0

# ldd /tmp/pacman.static-3.4.0
    not a dynamic executable

# ls -l /usr/bin/pacman /tmp/pacman.static-3.4.0
-rwxr-xr-x 1 root root 4530176 2010-07-30 20:47 /tmp/pacman.static-3.4.0
-rwxr-xr-x 1 root root   70708 2010-06-21 15:54 /usr/bin/pacman

  1. Avatar di valery valery

    Monday, August 9, 2010 - 19:37:57

    Another option to built static executable is Ermine (http://magicErmine.com) Unlike statifier it’s proprietary, but able to deal with memory randomization and have a number of another nice features

  2. Avatar di ebal ebal

    Tuesday, August 10, 2010 - 07:53:06

    Thanks for your post & suggestion.

    I’ve already seen Ermine, and yes it is a better program than statifier (i’ve done my tests).

    The reasons that i dont use Ermine are two:
    a. It isnt opensource
    b. I dont agree with the licence.

  3. Avatar di enrisseda enrisseda

    Friday, January 7, 2011 - 06:14:56

    Yes, probably so it is