[Samba] Cross compiling - size of binaries is large

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Oct 11 14:27:50 MDT 2009

On Sat, Oct 10, 2009 at 07:22:19PM +0200, theHog wrote:
> I have cross compiled samba 3.3.8 for arm, which succeeded.
> However, the size of the resulting binaries is large (few MB's per binary) so
> the total installation of samba sums to over 50 megabytes, after stripping the
> binaries.
> For example, with samba 2.0.10, the size of smbd was 281 KB. With samba 3.3.8
> that is 5.2 MB. Same goes for the other binaries. It looks as if there is a
> chunk of code included in every binary instead of using shared libs.
> How can I get the size of the binaries down? I included the configure options
> that I used below and some statistics.

Right now you can't. I've spent a good share of my weekend
trying to trim that down. In particular the (much better and
much more complete) auto-generated RPC marshalling hurts. It
adds 3-4 MB to many binaries, which could be put into shared
libs. It requires some heavy Makefile re-shuffling though,
and this is always tedious work.

Sorry for that, this problem is known but not exactly
trivial to fix the way our code is structured right now.

My current idea is to have .so's per RPC interface for the
marshalling and the client/server stubs. This way you would
be able to drop in new RPC interfaces without recompiling
smbd. It would also be much simpler to add new RPC client
routines as a .so. But as I always have to fight with our
build system a bit, this is an effort of some (few) days.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20091011/17e12f26/attachment.pgp>

More information about the samba mailing list