[sclug] Staticly link smbclient

pieter claassen pieter at claassen.co.uk
Tue May 6 22:23:12 UTC 2008


Hi Will,

This is what configure help says:

:~/dev/samba-3.0.24/source$ ./configure --help |grep static
   --enable-static=PKGS    build static libraries default=no
   --with-static-modules=MODULES  Comma-seperated list of names of  
modules to statically link in


If these are the libraries it links again, what is PKGS and I assume  
mdoules to be libcrypt,libresolv,libnsl,libdl,libc,linux-gate

I tried which didn't work (results in the second block ldd. The first  
block is if I just compile it with --enable-static=static)

r at etch:~/dev/samba-3.0.24/source/bin$ ./configure --with-static- 
modules=libcrypt,libresolv,libnsl,libdl,linux-gate --enable- 
static=static

This also didn't work

:~/dev/samba-3.0.24/source/bin$ ./configure --with-static- 
modules=libcrypt,libresolv,libnsl,libdl,linux-gate --enable- 
static=libcryp,libresolv,libnsl,libdl

Cheers,
Pieter

0.24/source/bin$ file smbclient
smbclient: ELF 32-bit LSB shared object, Intel 80386, version 1  
(SYSV), for GNU/Linux 2.4.1, not stripped

h:~/dev/samba-3.0.24/source/bin$ ldd smbclient
         linux-gate.so.1 =>  (0xffffe000)
         libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7ec4000)
         libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2  
(0xb7eb1000)
         libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7e9a000)
         libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e9600

pieter at etch:~/dev/samba-3.0.24/source/bin$ ldd smbclient
         linux-gate.so.1 =>  (0xffffe000)
         libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7edf000)
         libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2  
(0xb7ecc000)
         libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7eb5000)
         libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7eb1000)
         libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d80000)
         /lib/ld-linux.so.2 (0xb7f18000)



On May 6, 2008, at 10:09 PM, Will Dickson wrote:

> pieter claassen wrote:
>> Good try but the same problem still exists.
>> BTW> other than apt-get install libsmbclient-dev, how does this  
>> help me to compiled smbclient statically? it seems this package  
>> contains mostly sample code for writing your own smb stuff.
>> I tried using ./configure --enable-static=yes and make LDFLAGS="- 
>> static"
>
> Did you try --enable-static=static without the additional make hack?
>

pieter claassen
pieter at claassen.co.uk






More information about the Sclug mailing list