Compiling Cyrus IMAPD on AMD Opteron

Rob Siemborski rjs3 at andrew.cmu.edu
Fri Jun 13 11:11:41 EDT 2003


On Fri, 13 Jun 2003, Igor Brezac wrote:

> > Anything that goes inside a lib should be -fPIC. Really. I have done this in
> > the Debian build (which runs OK in S/390, IA64, Alpha, MIPS, MIPS-EL...)
> > ages ago. I don't know if these changes are in CMU Cyrus.
>
> This in true only for shared libs unless you are trying to link an
> archive into a shared lib (which can be the case with perl modules).
>
> Position independent code adds some overhead.  I think CMU folks like to
> build things static as much as possible for performance reasons.

Actually, we prefer shared libraries for maintainability reasons.

However, the number of shared libraries our IMAPd links (once SASL is all
done loading etc) is something up near 25-30.  Since each of these shared
libraries costs you a per-process jump table, this gets expensive in terms
of memory usage really fast.  So, we try to link staticly in this case.

> > Yep. Arch dislikes mixing PIC and non-PIC code inside a relocatable object.
>
> Correct.  On Solaris, I build lib/ and perl/sieve/lib with -fPIC just to
> build cyrus-imap perl stuff.

Hmmmm.  We've never had to do this on solaris.

I wonder if we could write a configure test to determine if this is
necessary on a given platform.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper





More information about the Info-cyrus mailing list