Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby support? #10

Open
nilbus opened this issue Apr 8, 2015 · 3 comments
Open

JRuby support? #10

nilbus opened this issue Apr 8, 2015 · 3 comments

Comments

@nilbus
Copy link
Contributor

nilbus commented Apr 8, 2015

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
@SamSaffron
Copy link
Owner

Never tried it @headius how fast can you get backtraces in JRuby 9k,
anything less than say one backtrace a second for a 200 frame deep
backtrace would not be super useful.

Totally fine to make the dependency soft.

On Thu, Apr 9, 2015 at 12:06 AM, Edward Anderson [email protected]
wrote:

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


Reply to this email directly or view it on GitHub
#10.

@sudoremo
Copy link

sudoremo commented Dec 3, 2018

Reading through this, I'm still unsure whether this Gem should work with jRuby or not. @SamSaffron, you speak of a "soft dependency", so should this work without any external Gem?

If would be a tremendous help for our projects if we could get flamegraph to work. Thanks a lot for your help.

@SamSaffron
Copy link
Owner

In principal it can work fine, trouble is you can not get backtraces fast enough from the JVM for this to be useful afaik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants