All -

Using the spamassassin.spec file that is included in the Mail-
SpamAssassin-3.0.0.tar.bz2 file, I run 

rpmbuild -ba spamassassin.spec

It runs along fine for a while, then it ends with:



+ /usr/bin/make spamc/libspamc.so
/usr/bin/make -f spamc/Makefile spamc/libspamc.so
make[1]: Entering directory `/usr/src/redhat/BUILD/Mail-
SpamAssassin-3.0.0'
gcc -rdynamic -Wl,-rpath,/usr/lib64/perl5/5.8.3/x86_64-linux-thread-
multi/CORE spamc/libspamc.c spamc/utils.c \
        -o spamc/libspamc.so -shared -ldl 
/usr/bin/ld: /tmp/ccuUCmK7.o: relocation R_X86_64_32S can not be used
when making a shared object; recompile with -fPIC
/tmp/ccuUCmK7.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [spamc/libspamc.so] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/Mail-
SpamAssassin-3.0.0'
make: *** [spamc/libspamc.so] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.27157 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.27157 (%build)


I am not a developer so I am not sure what to do next.  I *think* that I
need to pass -fPIC to gcc, and I *think* I can do that by modifying the
following line in the spec file:

CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS

so that it reads

CFLAGS=" -O2 -g -fPIC"; export CFLAGS

Can anyone give me a clue if I'm heading in the right direction?

-- 
A: Because people read from top to bottom.
Q: Why is top-posting bad?

Thomas Cameron, RHCE, CNE, MCSE, MCT

Reply via email to