[sclug] Staticly link smbclient

pieter claassen pieter at claassen.co.uk
Tue May 6 21:37:09 UTC 2008


The gory details......

I want to write a module that makes use of smbclient but doesn't place  
any dependencies on the device it will run on.

I was looking at some perl to do this, but the useful stuff that I am  
interested in (perl auth module) basically just wraps smbclient.

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).

r 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 (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 (0xb7e96000)
         libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d65000)
         /lib/ld-linux.so.2 (0xb7efd000)


Cheers,
Pieter


On May 6, 2008, at 11:25 PM, J.Mann wrote:

>
>> 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.
>
> It sounds like you are trying to build a static version of the  
> smbclient
> executable?  (As opposed to a static version of the libsmbclient  
> library,
> for linking purposes.)
>
> That is quite unusual - what do you want it for?
>
> Why does your target environment not supply the libraries which
> the smbclient executable depends on?
>
> Regards,
> Jon Mann.
>
>

pieter claassen
pieter at claassen.co.uk






More information about the Sclug mailing list