Question - help

Hello,
I have an existing ruby application and we are currently working to
integrate it into a java runtime.
We have thought of jruby.

I currently have to big issues :

1.no fork - I have went around this by using FFI :
module Exec
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :my_exec, :execl, [:string, :string, :varargs], :int
attach_function :fork, [], :int
attach_function :getpid, [ ], :int
attach_function :kill,[:int,:int],:int
end

Is there a better solution for the Process.fork in ruby ?

  1. issue number 2 :
    we have an old evironement and we can’t update it. also code has to be
    run on solaris / intel 32 /64 bits architecture.
    the current jruby we have and need is :

jgem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.9
  • RUBY VERSION: 1.8.7 (2011-10-25 patchlevel 330) [java]
  • INSTALLATION DIRECTORY: /home/local/jruby-1.6.5/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /local/jruby-1.6.5/bin/jruby
  • EXECUTABLE DIRECTORY: /local/jruby-1.6.5/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.6
  • GEM PATHS:
    • /home/local/jruby-1.6.5/lib/ruby/gems/1.8
    • /root/.gem/jruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • “install” => “–no-rdoc --no-ri --env-shebang”
    • “update” => “–no-rdoc --no-ri --env-shebang”
  • REMOTE SOURCES:

I have tried installing bitpack library however I get the following
error when trying to load the library /or any architecture related
library :
#jirb
irb(main):001:0> require
File.join(’/local/jruby-1.6.5/lib/ruby/gems/1.8/gems/’,‘bitpack-0.1/bitpack.so’)
LoadError: load error:
/local/jruby-1.6.5/lib/ruby/gems/1.8/gems/bitpack-0.1/bitpack –
java.lang.UnsatisfiedLinkError: failed to load shim library, error:
/usr/lib/libstdc++.so.6: version GLIBCXX_3.4.14' not found (required by /local/jruby-1.6.5/lib/native/i386-Linux/libjruby-cext.so) from org/jruby/RubyKernel.java:1038:inrequire’
from (irb):1:in evaluate' from org/jruby/RubyKernel.java:1088:ineval’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:158:in eval_input' from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:271:insignal_status’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:155:in eval_input' from org/jruby/RubyKernel.java:1420:inloop’
from org/jruby/RubyKernel.java:1192:in catch' from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:154:ineval_input’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:71:in start' from org/jruby/RubyKernel.java:1192:incatch’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:70:in start' from /local/jruby-1.6.5/bin/jirb:13:in(root)’

strings /usr/lib/libstdc++.so.6|grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBC_2.0
GLIBC_2.3
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

strings /local/jruby-1.6.5/lib/native/i386-Linux/libjruby-cext.so|grep
GLIBC GLIBCXX_3.4.14
GLIBCXX_3.4
GLIBC_2.2.4
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.0

Is there a way to avoid this without system update which is not an
option ?

I’ve been up against this same error when using yajl. But I haven’t
figured it out yet. I’m open to system update solutions (or downgrade,
I think my problem is that my version of glibc is too new).

LoadError: load error: yajl/yajl – java.lang.UnsatisfiedLinkError: failed to
load shim library, error: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14’ not
found (required by
/usr/local/rvm/rubies/jruby-1.6.5/lib/native/x86_64-Linux/libjruby-cext.so)
require at org/jruby/RubyKernel.java:1038
require at
/usr/local/rvm/rubies/jruby-1.6.5/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
(root) at /usr/local/rvm/gems/jruby-1.6.5/gems/yajl-ruby-1.1.0/lib/yajl.rb:1

Hi,
unfortunately for me a new GCC would mean a lot of trouble in thw hole
enviroment.
I am currently trying to compile the whole jruby with the old GCC but no
success until now
br,
George

From: Joe K. [mailto:[email protected]]
Sent: Tuesday, November 22, 2011 5:53 PM
To: [email protected]
Subject: Re: [jruby-user] question - help

I’ve been up against this same error when using yajl. But I haven’t
figured it out yet. I’m open to system update solutions (or downgrade,
I think my problem is that my version of glibc is too new).

LoadError: load error: yajl/yajl – java.lang.UnsatisfiedLinkError:
failed to load shim library, error: /usr/lib/libstdc++.so.6: version
`GLIBCXX_3.4.14’ not found (required by
/usr/local/rvm/rubies/jruby-1.6.5/lib/native/x86_64-Linux/libjruby-cext.so)
require at org/jruby/RubyKernel.java:1038
require at
/usr/local/rvm/rubies/jruby-1.6.5/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
(root) at
/usr/local/rvm/gems/jruby-1.6.5/gems/yajl-ruby-1.1.0/lib/yajl.rb:1

On Nov 21, 2011, at 9:34 AM, COMANESCU George wrote:

Hello,
I have an existing ruby application and we are currently working to
integrate it into a java runtime.
We have thought of jruby.

I currently have to big issues :

1.nohttp://1.no fork - I have went around this by using FFI :
module Exec
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :my_exec, :execl, [:string, :string, :varargs], :int
attach_function :fork, [], :int
attach_function :getpid, [ ], :int
attach_function :kill,[:int,:int],:int
end

Is there a better solution for the Process.fork in ruby ?

  1. issue number 2 :
    we have an old evironement and we can’t update it. also code has to be
    run on solaris / intel 32 /64 bits architecture.
    the current jruby we have and need is :

jgem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.9
  • RUBY VERSION: 1.8.7 (2011-10-25 patchlevel 330) [java]
  • INSTALLATION DIRECTORY: /home/local/jruby-1.6.5/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /local/jruby-1.6.5/bin/jruby
  • EXECUTABLE DIRECTORY: /local/jruby-1.6.5/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.6
  • GEM PATHS:
    • /home/local/jruby-1.6.5/lib/ruby/gems/1.8
    • /root/.gem/jruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • “install” => “–no-rdoc --no-ri --env-shebang”
    • “update” => “–no-rdoc --no-ri --env-shebang”
  • REMOTE SOURCES:

I have tried installing bitpack library however I get the following
error when trying to load the library /or any architecture related
library :
#jirb
irb(main):001:0> require
File.join(’/local/jruby-1.6.5/lib/ruby/gems/1.8/gems/’,‘bitpack-0.1/bitpack.so’)
LoadError: load error:
/local/jruby-1.6.5/lib/ruby/gems/1.8/gems/bitpack-0.1/bitpack –
java.lang.UnsatisfiedLinkError: failed to load shim library, error:
/usr/lib/libstdc++.so.6: version GLIBCXX_3.4.14' not found (required by /local/jruby-1.6.5/lib/native/i386-Linux/libjruby-cext.so) from org/jruby/RubyKernel.java:1038:inrequire’
from (irb):1:in evaluate' from org/jruby/RubyKernel.java:1088:ineval’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:158:in eval_input' from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:271:insignal_status’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:155:in eval_input' from org/jruby/RubyKernel.java:1420:inloop’
from org/jruby/RubyKernel.java:1192:in catch' from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:154:ineval_input’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:71:in start' from org/jruby/RubyKernel.java:1192:incatch’
from /local/jruby-1.6.5/lib/ruby/1.8/irb.rb:70:in start' from /local/jruby-1.6.5/bin/jirb:13:in(root)’

strings /usr/lib/libstdc++.so.6|grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBC_2.0
GLIBC_2.3
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

strings /local/jruby-1.6.5/lib/native/i386-Linux/libjruby-cext.so|grep
GLIBC GLIBCXX_3.4.14
GLIBCXX_3.4
GLIBC_2.2.4
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.0

Is there a way to avoid this without system update which is not an
option ?

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