Zenprofile (event_hook?) on Ruby 1.9 woes

I’m trying to profile my Ruby 1.9 code with zenprofile, but a simple
‘gem install zenprofile’ and a subsequent profiling attempt breaks:

[email protected]:~/PhD/art-decomp$ time zenprofile bin/inputs kiss/s510
/home/shot/.ruby_inline/Inline_EventHook_58b9.c:4:18: error: node.h: No
such file or directory
/home/shot/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/event_hook-1.0.1/lib/event_hook.rb:66:
error: expected ‘)’ before ‘event’
/home/shot/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/event_hook-1.0.1/lib/event_hook.rb:
In function ‘add_event_hook’:
/home/shot/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/event_hook-1.0.1/lib/event_hook.rb:98:
error: ‘event_hook’ undeclared (first use in this function)
…

I tried to side-step the first error by quickly
patching event_hook-1.0.1/lib/event_hook.rb with
builder.add_compile_flags
‘-I/home/shot/opt/ruby-1.9.1-p243/include/ruby-1.9.1/ruby-1.9.1-p243/’
but it doesn’t help at with the rest:

[email protected]:~/PhD/art-decomp$ time zenprofile bin/inputs kiss/s510
/home/shot/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/event_hook-1.0.1/lib/event_hook.rb:68:
error: expected ‘)’ before ‘event’
/home/shot/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/event_hook-1.0.1/lib/event_hook.rb:
In function ‘add_event_hook’:
/home/shot/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/event_hook-1.0.1/lib/event_hook.rb:100:
error: ‘event_hook’ undeclared (first use in this function)
…

I get the same problem with a simple file containing just

p rand

— Shot

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs