From pymilter at lists.wgwh.ch Mon Feb 9 06:40:32 2009 From: pymilter at lists.wgwh.ch (Oli Schacher) Date: Mon, 09 Feb 2009 12:40:32 +0100 Subject: [Pymilter] Install problem on 64bit CentOS Message-ID: <49901630.1060001@lists.wgwh.ch> Hi List On i386 Centos 5 machines I could just do 'yum install sendmail-devel' and 'python setup.py install' to get pymilter running. However, on our 64 bit servers there is a compilation error. [root@ pymilter-0.9.1]# python setup.py install running install running build running build_py running build_ext building 'milter' extension gcc -pthread -shared build/temp.linux-x86_64-2.4/miltermodule.o -L/usr/lib/libmilter -lmilter -o build/lib.linux-x86_64-2.4/milter.so /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmilter.a(listener.o): relocation R_X86_64_PC32 against `mi_opensocket' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Any hint how I could fix this? Thanks a lot Oli From stuart at bmsi.com Mon Feb 9 10:51:35 2009 From: stuart at bmsi.com (Stuart D. Gathman) Date: Mon, 9 Feb 2009 10:51:35 -0500 (EST) Subject: [Pymilter] Install problem on 64bit CentOS In-Reply-To: <49901630.1060001@lists.wgwh.ch> References: <49901630.1060001@lists.wgwh.ch> Message-ID: On Mon, 9 Feb 2009, Oli Schacher wrote: > On i386 Centos 5 machines I could just do 'yum install sendmail-devel' > and 'python setup.py install' to get pymilter running. > > However, on our 64 bit servers there is a compilation error. > > relocation R_X86_64_PC32 against `mi_opensocket' can not be used when > making a shared object; recompile with -fPIC > > Any hint how I could fix this? This is a problem with the sendmail package on x86_64. It is fixed in Fedora, however for Centos-5, you will have to get the sendmail SRPM and fix it to compile libmilter with -fPIC. On Fedora, they went all the way and made libmilter a shared library. However, just adding -fPIC when compiling libmilter.a does the trick. While you're in the SRPM, update it to sendmail-8.14.3. I'll try to get to that for x86_64, but don't wait up for me. I've posted an SRPM for sendmail-8.14.3 for EL4 - that will give examples of how the patch files need to be modified when updating. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.