cyrus-imapd: static binaries are huge + choose binaries to install

Bron Gondwana brong at
Fri Jun 24 13:02:16 EDT 2011

On Fri, Jun 24, 2011 at 06:27:22PM +0200, Luca Ceresoli wrote:
> The cyrus-imapd build system apparently does not currently allow to
> build shared executables. This results in needlessly large files.
> In a basic build for x86 (./configure && make), most of the
> executables in imap/ have a size between 2.2 and 2.5 MB, and the sum
> is 62.8 MB.

Yeah, I've noticed that too - it gets pretty large.

> This may not be a problem on a classic mail server, but storage
> space can be a precious resource on embedded systems.
> Clearly, using  shared libraries would reduce the overall space required.

Doesn't bother us at all for sure - we have 48Gb RAM on our new
IMAP servers.  A few statically linked binaries disappear into
the noise.  Which is why I haven't bothered with it :)

> It looks like I'm not the first to think about this. In
> a patch was proposed and rejected. Unfortunately I could not apply
> it, possibly because it's based on an old code base (2008).

Yeah, the Makefiles have changed a fair bit in that time.

> Would it be feasible to add shared build support in the cyrus-imapd
> build system?

I don't see any problem with this.  I'd love for someone to do
it.  I have a pile of tasks that would be higher priority for
me, but I'm happy to review changes.

> For the same motivation (saving precious storage space), it would be
> extremely useful to disable the compilation and installation of
> selected executables.


> The standard distribution installed as many as 30 executables in
> /usr/cyrus/bin/, which cross-compiled for ARM and stripped take 32
> MB. Those that I really need take <7 MB and I wish I could get rid
> of them by passing --disable-pop3proxyd or similar to ./configure.

Yeah, absolutely.  Of course they'd be a lot smaller with shared
libraries anyway.  The other option is to just not install those
executables.  Nothing says you can't clean up your "install" after
building it.  I assume your build machine has space.

> AFAIK this is not currently possible in cyrus-imapd. Is this correct?
> Do the Cyrus developers have anything similar in mind for the future
> of cyrus-imapd? Is this feasible?

I have no objection to it, but I can't prioritise it over my other
responsibilities, so someone else will have to do the work!



More information about the Cyrus-devel mailing list