Topic: Can't install rcov on OSX

I'm trying to install rcov on my mac - OSX 10.5

I'm using ruby version 1.8.6 and gems version 1.0.1

sudo gem install rcov

dies in an error:
Bulk updating Gem source index for: http://gems.rubyforge.org
Building native extensions.  This could take a while...
ERROR:  Error installing rcov:
    ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install rcov
creating Makefile

make
gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I.  -fno-common -g -O2  -fno-common -pipe -fno-common  -c callsite.c
gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I.  -fno-common -g -O2  -fno-common -pipe -fno-common  -c rcovrt.c
cc -dynamic -bundle -undefined suppress -flat_namespace  -L"/usr/local/lib" -o rcovrt.bundle callsite.o rcovrt.o  -lruby  -lpthread -ldl -lobjc 
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libobjc.dylib load command 9 unknown cmd field
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
collect2: ld returned 1 exit status
make: *** [rcovrt.bundle] Error 1


any ideas?

Re: Can't install rcov on OSX

Figured it out. I was still using Xcode 2.4. Upgrading to 3.0 did the trick.