Bug 5995 - The size of the installed samba could be cut a lot by using shared objects
Summary: The size of the installed samba could be cut a lot by using shared objects
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.14a
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
Depends on:
Reported: 2008-12-25 11:33 UTC by Diego Pettenò
Modified: 2019-06-11 21:24 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pettenò 2008-12-25 11:33:44 UTC
Right now the same objects are duplicated in many targets, causing huge duplication of code, causing symbols collision, and requiring a huge time to bind the libraries at runtime.

For instance, my collision detection script [1] outputs this:

Symbol pdb_default_getgrgid@@ (32-bit UNIX System V ABI Intel 80386) present 20 times

It means that there are 20 copies of the RPC objects. There are many, many more objects that have the same problem. It's especially bad for the Python extensions, but it's just as bad for the rest.

Having a single libsambacore.so library where all these symbols would be defined would reduce a lot the memory used (since it could then be shared among, say, the desktop system as a client and the smbd daemon as server), and would reduce the startup time of all the utilities.

[1] http://blog.flameeyes.eu/2008/12/24/library-on-a-collision-course-on-the-screen
Comment 1 Björn Jacke 2009-06-10 18:29:22 UTC
weird, most of the krb5 tests fail and can't find the kerberos libs. What says "ldd /usr/lib/libkrb5.so" ?
Comment 2 Michael Meeks 2009-06-12 03:53:25 UTC
I suffer from this too, when trying to make small netbook images containing samba-client which at 53Mb on disk is larger than the kernel ;-)

Indeed seven out of the largest 15 binaries in /usr/bin on my system are smb-client - which, given the relatively trivial nature of some of those tools (at least AFAICS), is quite amazing :-)
Comment 3 Andrew Bartlett 2019-06-11 21:11:57 UTC
Waf is the, new build system in Samba 4.0 and later, uses shared objects extensively. 

In a remarkable coincidence, samba is larger than ever.

Regardless, closing.