Compiling Cyrus IMAPD on AMD Opteron
Henrique de Moraes Holschuh
hmh at debian.org
Fri Jun 13 10:05:00 EDT 2003
On Fri, 13 Jun 2003, curtis at oushi.org wrote:
> Compiling with the -fPIC fixes the problem. I had to do this for the
> following: imclient.c imparse.c xmalloc.c imapurl.c iptostring.c assert.c
> util.c libisieve.c prot.c
> Why does -fPIC fix this problem?
Because of either:
1. AMD64 is unforgiving of non-PIC code mixed with PIC code where it
shouldn't be (libraries)
2. Compiler bugs.
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.
I don't think the Cyrus build uses --shared, but I didn't check.
> >>../../lib/libcyrus.a(imclient.o): relocation R_X86_64_32 can not be used
> >>when making a shared object; recompile with -fPIC
Yep. Arch dislikes mixing PIC and non-PIC code inside a relocatable object.
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
More information about the Info-cyrus