Errors building RMagick on Linux

Here are the sequence of commands that I’ve done running CentOS 4.3.
When I do the very last command ‘make’, I get the errors below. Any
ideas? thanks! chirag

cd /usr/local/src
wget http://image_magick.veidrodis.com/image_magick/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-X.Y.Z
./configure --disable-static --with-modules --without-perl
–without-magick-plus-plus --with-quantum-depth=8
make
make install

wget
http://files.rubyforge.mmmultiworks.com/rmagick/RMagick-1.15.11.tar.gz
tar zxvf RMagick-1.15.11.tar.gz
cd RMagick-1.15.4
./configure
export LD_LIBRARY_PATH=/usr/local/lib
echo $LD_LIBRARY_PATH
make


gcc -shared -L/usr/local/lib -L’/usr/local/lib’ -Wl,-R’/usr/local/
lib’ -o RMagick.so rmutil.o rmilist.o rmdraw.o rmimage.o rmfill.o
rmmain.o rminfo.o -lMagick -ljpeg -lpng -lz -lm -lpthread -lWand -
lMagick -ldl -lcrypt -lm -lc
/usr/bin/ld: /usr/local/lib/libMagick.a(magick_libMagick_la-
animate.o): relocation R_X86_64_32 against a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libMagick.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [RMagick.so] Error 1 make[1]: Leaving directory /usr/local/src/RMagick-1.15.11/ext/
RMagick’
setup.rb:655:in command': system("make") failed (RuntimeError) from setup.rb:664:in make’
from setup.rb:1258:in setup_dir_ext' from setup.rb:1532:in send
from setup.rb:1532:in traverse' from setup.rb:1549:in dive_into’
from setup.rb:1530:in traverse' from setup.rb:1534:in traverse’
from setup.rb:1533:in each' ... 8 levels... from setup.rb:826:in send
from setup.rb:826:in invoke' from setup.rb:772:in invoke’
from setup.rb:1578
make: *** [all] Error 1