Installation problem on Solaris 2.8 SPARC 64 bit

I am trying to install Ruby 1.8.5-p12 in a non-root user account on a
Solaris 2.8 SPARC 64 bit machine using a gcc 3.4.2. The only configure
option I used was prefix=/pkg/<some_path>.

When I run make I get an error message I can’t make head or tails of
(see end of the text below). Any hints would be much appreciated.


.
.
.
compiling syck
compiling syslog
compiling tk
compiling tk/tkutil
compiling win32ole
compiling zlib
gcc -shared -L’…/…’ -o …/…/.ext/sparc-solaris2.8/zlib.so zlib.o
-lz -ldl -lcrypt -lm -lc
Text relocation remains referenced
against symbol offset in file
0x1d1c
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/…/…/…/libz.a(inflate.o)
0x1d20
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/…/…/…/libz.a(inflate.o)
0x1d24
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/…/…/…/libz.a(inflate.o)
0x1d28
.
.
.
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/…/…/…/libz.a(inflate.o)
.udiv 0x174c
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/…/…/…/libz.a(deflate.o)
malloc 0x40
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/…/…/…/libz.a(zutil.o)
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target
../../.ext/sparc-solaris2.8/zlib.so' Current working directory /tmp/csage/ruby-1.8.5-p12/ext/zlib *** Error code 1 make: Fatal error: Command failed for targetall’
$