[Pymilter] Milter build error
Stuart D. Gathman
stuart at bmsi.com
Wed Jan 5 11:30:09 EST 2005
On Wed, 5 Jan 2005, Luciano Gualano wrote:
> gcc -pthread -shared build/temp.linux-x86_64-2.4/miltermodule.o -lmilter
> -lsmutil -o build/lib.linux-x86_64-2.4/milter.so
> /usr/bin/ld:
> /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../../lib64/libmilter.a(mai
> n.o): relocation R_X86_64_32S can not be used when making a shared object;
> recompile with -fPIC
> /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../../lib64/libmilter.a:
libmilter.a is part of sendmail. The sendmail RPM you are using doesn't
compile it with -fPIC. It needs to if the lib is going to be statically
linked with a dynamic module on x86_64. We don't want another dynamic
library cluttering up the sendmail runtime, and Python modules must be dynamic
(unless you want to get involved in adding a static module to the Python
RPM). So I recommend changing the sendmail RPM to compile libmilter.a
with -fPIC, at least on x86_64.
You could try it out first by building the RPM (for sendmail), then going to
the BUILD directory and changing the Makefile and recompiling just libmilter.a.
Replace libmilter.a with that version - or arrange for the pymilter link to
use the alternate version (e.g. cp libmilter.a /usr/lib/libmilterpic.a,
and use -lmilterpic on pymilter link command).
--
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
More information about the Pymilter
mailing list