Compiling Cyrus IMAPD on AMD Opteron

Stephen L. Ulmer ulmer at
Fri Jun 13 12:28:46 EDT 2003

On 13 Jun 2003, Rob Siemborski said:

> 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.

Isn't that what libtool is for?  For the Perl stuff explicitly:

    root at spcws1en1:46$ perl -V:cccdlflags
    root at spcws1en1:47$ 

Stephen L. Ulmer                              ulmer at
Senior Systems Programmer               
Northeast Regional Data Center                      VOX: (352) 392-2061
University of Florida                               FAX: (352) 392-9440

More information about the Info-cyrus mailing list