[Pkg-samba-maint] Bug#474543: smbclient install size nearly doubled

Larry Doolittle ldoolitt at recycle.lbl.gov
Mon Jul 21 23:28:42 UTC 2008


Steve -

On Mon, Jul 21, 2008 at 11:36:03AM -0700, Steve Langasek wrote:
> On Mon, Jul 21, 2008 at 09:38:43AM -0700, Larry Doolittle wrote:
> > smbclient            12704            25628
> 
> > My hope is that there is some systematic cause that can
> > be fixed, and that there is not just general bloat and
> > scope creep in the code between 3.0 and 3.2 branches.
> 
> I'm afraid that it is probably a question of code bloat.  The samba codebase
> has never had a very rigorous division between client and server code, for
> instance, so there's probably a fair amount of code duplicated in the
> executables that isn't actually needed there.
> 
> I've already ruled out the possibility that a failure to strip the
> executables was to blame here, which is the only systematic cause I can
> think of.

The bulk of smbclient's installed size comes from five binaries:
  rpcclient
  smbcacls
  smbclient
  smbcquotas
  smbget
Each one was 1.4 to 2.4 MBytes in smbclient-3.0.31, and are 4.3 to 4.7 MBytes
in smbclient-3.2.0.

I tried the following quick experiment:
 1. Download samba 3.2.0
 2. cd source && ./configure
 3. Delete the stoopid "@" in the Makefile rule for bin/smbclient
 4. make bin/smbclient && strip bin/smbclient
 5. ls -l bin/smbclient
-rwxr-xr-x 1 ldoolitt ldoolitt 3935560 2008-07-21 16:01 bin/smbclient
 6. ar r foo.a [massive cut-and-paste of all the .o files listed in step 4]
 7. gcc ... [cut-and paste from step 4, substituting "foo.a" for the .o files]
 8. strip bin/smbclient
 9. ls -l bin/smbclient
-rwxr-xr-x 1 ldoolitt ldoolitt 3086272 2008-07-21 16:08 bin/smbclient

Hmmm.  That was an easy megabyte (almost) to trim.  But the resulting smbclient
binary is still over twice the size of the 3.0.31 version.  

    - Larry





More information about the Pkg-samba-maint mailing list