Skip to content

Instantly share code, notes, and snippets.

@edubkendo
Last active December 16, 2015 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edubkendo/5460430 to your computer and use it in GitHub Desktop.
Save edubkendo/5460430 to your computer and use it in GitHub Desktop.
latest attempts to get jruby working with latest jdk8 EA build

I got a bit frustrated with this, so it's been a couple weeks since trying to get it working, but I'm still seeing errors here. I installed rbenv, and then installed jruby-master via it, just to eliminate the possibility I was screwing something up when building from source. But, it continues to fail to properly load the correct native library. It looks like rbenv automatically installs jruby-launcher, btw. Anyways, attempts to run irb, or run a script result in the following error:

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/eric/.rbenv/versions/jruby-1.7.4-dev/lib/native/i386-Linux/libjffi-1.2.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

As you can see, there is no longer the big SIGSEGV error, and it's now loading i386-Linux instead of arm, but it needs to load x86_64. Because the error is no longer fatal, it doe not immediately die anymore, so I'm unsure in what ways this is effecting jruby, however I do notice that multiple gems I use normally, gems which work when I run with an earlier version of the JDK, are failing with various errors. I dont know enough about what jffi does to say.

Further, I have also tried simply downloading the tarball that rbenv/ruby-build installs: http://ci.jruby.org/snapshots/master/jruby-bin-1.7.4.dev.tar.gz and using it directly, without jruby-launcher.

Steps:

This error IS the original arm-Linux error, but again, it only displays the error now, it doesnt immediately fail with SIGSEGV.

So, recap, jruby-1.7.4.dev installed via rbenv/ruby-build, which appears to automatically install jruby-launcher, produces a similar error, only this time loading the i386 version. JRuby-1.7.4.dev installed directly, executed without installing jruby-launcher, gives error with arm version.

Interestingly jruby -e "puts 'Hello'" returns: Hello However, execute that with a missing closing quote on "Hello", jruby -e "puts 'Hello" #note missing closing quote and we get:

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/eric/.rbenv/versions/jruby-1.7.4-dev/lib/native/i386-Linux/libjffi-1.2.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
SyntaxError: -e:2: unterminated string meets end of file

So, I dunno if any of this is a helpful clue or not, but please let me know if there is anything else I can try, or any more information I can provide. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment