[sclug] Staticly link smbclient

J.Mann jon at spinis-associates.co.uk
Wed May 7 07:38:12 UTC 2008


On Tue, May 06, 2008 at 11:37:09PM +0200, pieter claassen wrote:
> Yes, I am trying to build as static as possible version of the  
> smbclient (linking against glibc though should be ok, the main concern  
> is with the other dependencies).

Are you sure you want to abandon the benefits of dynamic linking?

  http://people.redhat.com/drepper/no_static_linking.html

If you can provide glibc on "the device", can you not provide the other
libraries?

If you still want a static smbclient executable:

  $ apt-get source samba

  $ tar zxf samba_3.0.24.orig.tar.gz

  $ cd samba-3.0.24/source

  $ ./configure --disable-pie CFLAGS=-static
  ...

  $ make
  ...

  $ ldd bin/smbclient
  not a dynamic executable

  $ bin/smbclient
  ...

Regards,
Jon Mann.





More information about the Sclug mailing list