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
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
Hi,
creating Makefile
[...]
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
[...]
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
···
On Sun, May 07, 2006 at 07:34:08PM +0900, Kerry Buckley wrote:
--
Mauricio Fernandez - http://eigenclass.org - singular Ruby
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.
···
On May 7, 2006, at 9:08 PM, Sam Roberts wrote:
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
Just installed ruby 1.8.4 using darwinports, and now all is well. Thanks to everyone who replied!
Kerry
···
On 8 May 2006, at 2:32 am, Logan Capaldo wrote:
On May 7, 2006, at 9:08 PM, Sam Roberts wrote:
I'm not sure that the stock OS X ruby contains the headers and libraries
required to build C extensions.
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.