flamegraph icon indicating copy to clipboard operation
flamegraph copied to clipboard

JRuby support?

Open nilbus opened this issue 9 years ago • 3 comments

JRuby can't compile the C extension in the fast_stack dependency. Your README seems to imply that recent versions of JRuby in 2.0 mode might work with flamegraph. Have you indeed ever had this working under JRuby?

 $ ruby -v
jruby 9.0.0.0.pre1 (2.2.0p0) 2015-01-20 d537cab OpenJDK 64-Bit Server VM 24.75-b04 on 1.7.0_75-b13 +jit [linux-amd64]

 $ gem install fast_stack
Fetching: rake-compiler-0.9.5.gem (100%)
Successfully installed rake-compiler-0.9.5
Fetching: fast_stack-0.1.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing fast_stack:
        ERROR: Failed to build gem native extension.

    /home/nilbus/.rvm/rubies/jruby-9.0.0.0.pre1/bin/jruby -r ./siteconf20150408-110294-zavcjx.rb extconf.rb
NotImplementedError: C extensions are not supported
      (root) at /home/nilbus/.rvm/rubies/jruby-9.0.0.0.pre1/lib/ruby/stdlib/mkmf.rb:1
     require at org/jruby/RubyKernel.java:954
      (root) at /home/nilbus/.rvm/rubies/jruby-9.0.0.0.pre1/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
  __script__ at extconf.rb:1

extconf failed, exit code 1

Gem files will remain installed in /home/nilbus/.rvm/gems/jruby-9.0.0.0.pre1/gems/fast_stack-0.1.0 for inspection.
Results logged to /home/nilbus/.rvm/gems/jruby-9.0.0.0.pre1/extensions/universal-java-1.7/2.2/fast_stack-0.1.0/gem_make.out
nilbus (CE-976-profile)

 $ rvm use jruby-1.7.6
Using /home/nilbus/.rvm/gems/jruby-1.7.6

 $ jruby --2.0 -v
jruby 1.7.6 (2.0.0p195) 2013-10-22 6004147 on OpenJDK 64-Bit Server VM 1.7.0_75-b13 [linux-amd64]
 $ rvm use jruby-1.7.19
Using /home/nilbus/.rvm/gems/jruby-1.7.19
nilbus (CE-976-profile)

 $ jruby --2.0 -v
jruby 1.7.19 (2.0.0p598) 2015-01-29 20786bd on OpenJDK 64-Bit Server VM 1.7.0_75-b13 +jit [linux-amd64]
nilbus (CE-976-profile)

 $ jruby --2.0 -S gem install fast_stack
Building native extensions.  This could take a while...
ERROR:  Error installing fast_stack:
        ERROR: Failed to build gem native extension.

    /home/nilbus/.rvm/rubies/jruby-1.7.19/bin/jruby -r ./siteconf20150408-112721-ejau45.rb extconf.rb
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS.

   (root) at /home/nilbus/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/mkmf.rb:8
  require at org/jruby/RubyKernel.java:1071
   (root) at /home/nilbus/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
   (root) at extconf.rb:1

extconf failed, uncaught signal 1

Gem files will remain installed in /home/nilbus/.rvm/gems/jruby-1.7.19/gems/fast_stack-0.1.0 for inspection.
Results logged to /home/nilbus/.rvm/gems/jruby-1.7.19/extensions/universal-java-1.7/1.9/fast_stack-0.1.0/gem_make.out

nilbus avatar Apr 08 '15 14:04 nilbus