Forum: Ruby Rcov installation failure on Mac OS X

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
06de0a44d184a590a8f446a9fa1d2d59?d=identicon&s=25 Kerry Buckley (Guest)
on 2006-05-07 12:36
(Received via mailing list)
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
0ca6e5c33d7e7ff901d75ff0b13d9e1c?d=identicon&s=25 Sam Roberts (Guest)
on 2006-05-08 03:09
(Received via mailing list)
Quoting home@kerrybuckley.com, 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
E34b5cae57e0dd170114dba444e37852?d=identicon&s=25 Logan Capaldo (Guest)
on 2006-05-08 03:34
(Received via mailing list)
On May 7, 2006, at 9:08 PM, Sam Roberts 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.
Dd76a12d66f843de5c5f8782668e7127?d=identicon&s=25 Mauricio Fernandez (Guest)
on 2006-05-08 13:44
(Received via mailing list)
Hi,

On Sun, May 07, 2006 at 07:34:08PM +0900, Kerry Buckley 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
06de0a44d184a590a8f446a9fa1d2d59?d=identicon&s=25 Kerry Buckley (Guest)
on 2006-05-08 22:50
(Received via mailing list)
On 8 May 2006, at 2:32 am, Logan Capaldo 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
This topic is locked and can not be replied to.