# Rcov installation failure on Mac OS X

**URL:** <https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839>\
**Category:** Ruby\
**Created:** [May 7, 2006, 12:36pm UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839 "2006-05-07T12:36:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kerry\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@Kerry\_B](https://www.ruby-forum.com/u/Kerry_B)\
**Post date:** [May 7, 2006, 12:36pm UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839/1 "2006-05-07T12:36:13Z")

</div>

Hi,

I’m obviously missing something fairly obvious, but I can’t seem to  
get rcov 0.3.0 to install (I had the same problem with the previous  
version, but never got round to investigating), and I can’t find  
anything similar in the archives or via Google. I’m running ruby  
1.8.2 (2004-12-25) [powerpc-darwin8.0] under Mac OS X 10.4.6 on a G5  
Mac.

This is what happens:

Kerrys-G5:~/Downloads/rcov-0.3.0 kerry$ sudo ruby setup.rb  
Password:  
—\> bin  
\<— bin  
—\> ext  
—\> ext/rcovrt  
/usr/bin/ruby /Users/kerry/Downloads/rcov-0.3.0/ext/rcovrt/extconf.rb  
creating Makefile  
\<— ext/rcovrt  
\<— ext  
—\> bin  
\<— bin  
—\> ext  
—\> ext/rcovrt  
make  
gcc -fno-common -g -Os -pipe -fno-common -pipe -fno-common -pipe -  
fno-common -I. -I/usr/lib/ruby/1.8/powerpc-darwin8.0 -I/usr/lib/ruby/  
1.8/powerpc-darwin8.0 -I/Users/kerry/Downloads/rcov-0.3.0/ext/  
rcovrt -c rcov.c  
rcov.c:27: error: parse error before ‘event’  
rcov.c: In function ‘coverage\_event\_hook’:  
rcov.c:33: error: ‘event’ undeclared (first use in this function)  
rcov.c:33: error: (Each undeclared identifier is reported only once  
rcov.c:33: error: for each function it appears in.)  
rcov.c:33: error: ‘RUBY\_EVENT\_C\_CALL’ undeclared (first use in this  
function)  
rcov.c:33: error: ‘RUBY\_EVENT\_C\_RETURN’ undeclared (first use in this  
function)  
rcov.c:33: error: ‘RUBY\_EVENT\_CLASS’ undeclared (first use in this  
function)  
rcov.c:36: error: ‘node’ undeclared (first use in this function)  
rcov.c: In function ‘cov\_install\_hook’:  
rcov.c:75: error: ‘RUBY\_EVENT\_ALL’ undeclared (first use in this  
function)  
rcov.c:75: error: ‘RUBY\_EVENT\_C\_CALL’ undeclared (first use in this  
function)  
rcov.c:76: error: ‘RUBY\_EVENT\_C\_RETURN’ undeclared (first use in this  
function)  
rcov.c:76: error: ‘RUBY\_EVENT\_CLASS’ undeclared (first use in this  
function)  
make: \*\*\* [rcov.o] Error 1  
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:1530:in`dive\_into’  
from setup.rb:1530:in `traverse' from setup.rb:1534:in`traverse’  
from setup.rb:1533:in `each' ... 7 levels... from setup.rb:996:in`exec\_setup’  
from setup.rb:813:in `invoke' from setup.rb:773:in`invoke’  
from setup.rb:1578

Thanks in advance to anyone who can point me in the right direction.

Kerry

---

<div class="post-metadata">

**Author:** ![Kerry\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@Kerry\_B](https://www.ruby-forum.com/u/Kerry_B)\
**Post date:** [May 8, 2006, 3:09am UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839/2 "2006-05-08T03:09:59Z")

</div>

Quoting removed\_email\_address@domain.invalid, on Sun, May 07, 2006 at 07:34:08PM +0900:

> I’m obviously missing something fairly obvious, but I can’t seem to  
> get rcov 0.3.0 to install (I had the same problem with the previous  
> version, but never got round to investigating), and I can’t find  
> anything similar in the archives or via Google. I’m running ruby  
> 1.8.2 (2004-12-25) [powerpc-darwin8.0] under Mac OS X 10.4.6 on a G5  
> Mac.

…

> rcov.c:33: error: ‘RUBY\_EVENT\_C\_CALL’ undeclared (first use in this  
> function)

I’m not sure that the stock OS X ruby contains the headers and libraries  
required to build C extensions.

I would look for ruby.h. If you don’t have it, you can’t build the  
extension.

Cheers,  
Sam

---

<div class="post-metadata">

**Author:** ![Kerry\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@Kerry\_B](https://www.ruby-forum.com/u/Kerry_B)\
**Post date:** [May 8, 2006, 3:34am UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839/3 "2006-05-08T03:34:10Z")

</div>

On May 7, 2006, at 9:08 PM, Sam R. wrote:

> Cheers,  
> Sam

It does, but they are in “unfortunate” locations.  
/usr/lib/ruby/1.8/universal-darwin8.0

is where some of the header files live.

Others and the bundles are in the right locations. You can make  
symlinks or you can install ruby from source.

---

<div class="post-metadata">

**Author:** ![Kerry\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@Kerry\_B](https://www.ruby-forum.com/u/Kerry_B)\
**Post date:** [May 8, 2006, 10:50pm UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839/4 "2006-05-08T22:50:31Z")

</div>

On 8 May 2006, at 2:32 am, Logan C. wrote:

> Others and the bundles are in the right locations. You can make  
> symlinks or you can install ruby from source.

Just installed ruby 1.8.4 using darwinports, and now all is well.  
Thanks to everyone who replied!

Kerry

---

<div class="post-metadata">

**Author:** ![Kerry\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@Kerry\_B](https://www.ruby-forum.com/u/Kerry_B)\
**Post date:** [May 8, 2006, 1:44pm UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839/5 "2006-05-08T13:44:07Z")

</div>

Hi,

On Sun, May 07, 2006 at 07:34:08PM +0900, Kerry B. wrote:

> creating Makefile  
> […]  
> rcov.c:33: error: ‘RUBY\_EVENT\_C\_CALL’ undeclared (first use in this  
> […]  
> Thanks in advance to anyone who can point me in the right direction.

The rcovrt extension uses the event\_hook subsystem which was added in  
Ruby  
1.8.3, so you can either install rcov without the extension (it will be  
much  
slower though), with  
sudo ruby setup.rb all --without-ext  
or upgrade Ruby to 1.8.4, or better yet to a stable snapshot[1],  
which fixes amongst other bugs the symbol/object collision that happened  
quite often on OSX.

I will update the documentation to reflect this.

HTH

[1] ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz
