0 Replies Latest reply: Mar 20, 2012 4:45 PM by 598942 RSS

    Compiling command line utilities for Linux with static libc

    598942
      Hi,

      The following command used to compile and link BerkeleyDB with both static libdb and static libc:

      make clean
      env LDFLAGS=-static ../dist/configure --disable-shared
      make

      Now the command only statically links libdb and not libc.

      [root@fedora8 ~]# ldd /usr/local/BerkeleyDB.5.3/bin/db_dump
      linux-gate.so.1 => (0x00110000)
      libpthread.so.0 => /lib/libpthread.so.0 (0x00c15000)
      libc.so.6 => /lib/libc.so.6 (0x00a88000)
      /lib/ld-linux.so.2 (0x00a69000)
      [root@fedora8 ~]#

      It appears that the link of the command line utilities has now been moved into "make install".

      Can anyone suggest how to also force a static link of libc?