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

jgem fails to load gem from rubygems on Raspbian #5192

Closed
monkstone opened this Issue May 25, 2018 · 17 comments

Comments

Projects
None yet
3 participants
@monkstone
Copy link
Contributor

commented May 25, 2018

Environment

Hardware raspberrypi 3B+

  • JRuby version (jruby -v)
    jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) Client VM 25.65-b01 on 1.8.0_65-b17 +jit [linux-arm] (got same issue with jruby 9.1.17.0, and possibly earlier versions also fail)
  • Operating system and platform (e.g. uname -a)
    Linux raspberrypi 4.14.42-v7+ #1114 SMP Mon May 21 16:39:21 BST 2018 armv7l GNU/Linux
    Other relevant info you may wish to add:
  • GEM_HOME
    /home/tux/.gem/ruby/2.3.0
    *ruby version
    ruby 2.3.3p222 (2016-11-21) [arm-linux-gnueabihf]
  • java version
    java version "1.8.0_65"
    Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
    Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

mri irb (jirb also failing)
puts RbConfig::CONFIG['host_os']
linux-gnueabihf

This might be significant with jruby, RbConfig::CONFIG['host_os'] returns linux ie close to useless.

Expected Behavior

gem install toxiclibs
mri ruby installs as expected

Actual Behavior

jgem install toxiclibs
Fetching: toxiclibs-1.0.0.gem (100%)
NotImplementedError: flock unsupported or native support failed to load; see http://wiki.jruby.org/Native-Libraries
flock at org/jruby/RubyFile.java:322
block in write_binary at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems.rb:897
open at org/jruby/RubyIO.java:1179
open at org/jruby/RubyKernel.java:311
write_binary at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems.rb:895
cache_update_path at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:334
download at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:188
download at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/source.rb:215
install at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/resolver/specification.rb:91
block in install at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/request_set.rb:168
each at org/jruby/RubyArray.java:1801
install at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/request_set.rb:156
install_gem at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:205
block in install_gems at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:255
each at org/jruby/RubyArray.java:1801
install_gems at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:251
execute at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:158
invoke_with_build_args at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/command.rb:313
process_args at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:171
run at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:141
run at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/gem_runner.rb:59

at /usr/bin/jgem:21

Report

The error message is opaque to me, I'm a seasoned linux user, but very new to raspbian OS, from searches I understood that in the past same error had been reported (different OS etc) but it was unclear to me whether it had actually been resolved. I seem to remember seeing something about failure in bit detection. Raspbian is odd in being 32 bit on 64 bit processor (these days) but probably for good reason. I have been developing PiCrate on my 64 bit linux mint machine and never had this problem before (similar setup). PS: as a workaround to install the picrate gem, I used a local install with jgem without issue.

Another gem

jruby -Xnative.verbose=true -S gem install geomerative
Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows.
java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
at jnr.ffi.provider.InvalidProvider$1.loadLibrary(InvalidProvider.java:48)
at jnr.ffi.LibraryLoader.load(LibraryLoader.java:325)
at jnr.ffi.Library.loadLibrary(Library.java:127)
at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.(POSIXFactory.java:279)
at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at jnr.posix.BaseNativePOSIX.(BaseNativePOSIX.java:37)
at jnr.posix.LinuxPOSIX.(LinuxPOSIX.java:19)
at jnr.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:143)
at jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:121)
at jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
at jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:38)
at jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
at jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:398)
at org.jruby.RubyGlobal.initSTDIO(RubyGlobal.java:287)
at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:211)
at org.jruby.Ruby.init(Ruby.java:1238)
at org.jruby.Ruby.newInstance(Ruby.java:362)
at org.jruby.Main.internalRun(Main.java:273)
at org.jruby.Main.run(Main.java:234)
at org.jruby.Main.main(Main.java:206)
Caused by: java.lang.UnsatisfiedLinkError: could not get native definition for type: POINTER
at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:251)
at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
at com.kenai.jffi.Type.resolveSize(Type.java:155)
at com.kenai.jffi.Type.size(Type.java:138)
at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
at jnr.ffi.provider.AbstractRuntime.(AbstractRuntime.java:48)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:57)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:41)
at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.(NativeRuntime.java:53)
at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
at jnr.ffi.provider.jffi.Provider.(Provider.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.(FFIProvider.java:57)
at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
at jnr.ffi.Library.loadLibrary(Library.java:114)
... 17 more
Caused by: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi8383875517230482219.so: /tmp/jffi8383875517230482219.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:376)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:258)
at com.kenai.jffi.internal.StubLoader.(StubLoader.java:449)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.kenai.jffi.Init.load(Init.java:68)
at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
at com.kenai.jffi.Foreign$InstanceHolder.(Foreign.java:45)
at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
at com.kenai.jffi.Type.resolveSize(Type.java:155)
at com.kenai.jffi.Type.size(Type.java:138)
at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
at jnr.ffi.provider.AbstractRuntime.(AbstractRuntime.java:48)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:57)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:41)
at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.(NativeRuntime.java:53)
at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
at jnr.ffi.provider.jffi.Provider.(Provider.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.(FFIProvider.java:57)
at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
at jnr.ffi.Library.loadLibrary(Library.java:114)
at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.(POSIXFactory.java:279)
at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at jnr.posix.BaseNativePOSIX.(BaseNativePOSIX.java:37)
at jnr.posix.LinuxPOSIX.(LinuxPOSIX.java:19)
at jnr.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:143)
at jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:121)
at jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
at jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:38)
at jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
at jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:398)
at org.jruby.RubyGlobal.initSTDIO(RubyGlobal.java:287)
at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:211)
at org.jruby.Ruby.init(Ruby.java:1238)
at org.jruby.Ruby.newInstance(Ruby.java:362)
at org.jruby.Main.internalRun(Main.java:273)
at org.jruby.Main.run(Main.java:234)
at org.jruby.Main.main(Main.java:206)
java.lang.UnsatisfiedLinkError: /opt/jruby-9.2.0.0/lib/jni/arm-Linux/libjffi-1.2.so: /opt/jruby-9.2.0.0/lib/jni/arm-Linux/libjffi-1.2.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromBootPath(StubLoader.java:321)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:248)
at com.kenai.jffi.internal.StubLoader.(StubLoader.java:449)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.kenai.jffi.Init.load(Init.java:68)
at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
at com.kenai.jffi.Foreign$InstanceHolder.(Foreign.java:45)
at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
at com.kenai.jffi.Type.resolveSize(Type.java:155)
at com.kenai.jffi.Type.size(Type.java:138)
at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
at jnr.ffi.provider.AbstractRuntime.(AbstractRuntime.java:48)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:57)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:41)
at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.(NativeRuntime.java:53)
at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
at jnr.ffi.provider.jffi.Provider.(Provider.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.(FFIProvider.java:57)
at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
at jnr.ffi.Library.loadLibrary(Library.java:114)
at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.(POSIXFactory.java:279)
at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at jnr.posix.BaseNativePOSIX.(BaseNativePOSIX.java:37)
at jnr.posix.LinuxPOSIX.(LinuxPOSIX.java:19)
at jnr.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:143)
at jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:121)
at jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
at jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:38)
at jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
at jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:398)
at org.jruby.RubyGlobal.initSTDIO(RubyGlobal.java:287)
at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:211)
at org.jruby.Ruby.init(Ruby.java:1238)
at org.jruby.Ruby.newInstance(Ruby.java:362)
at org.jruby.Main.internalRun(Main.java:273)
at org.jruby.Main.run(Main.java:234)
at org.jruby.Main.main(Main.java:206)

at com.kenai.jffi.Foreign.newLoadError(Foreign.java:72)
at com.kenai.jffi.Foreign.access$300(Foreign.java:42)
at com.kenai.jffi.Foreign$InValidInstanceHolder.getForeign(Foreign.java:98)
at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
... 36 more

Caused by: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi8383875517230482219.so: /tmp/jffi8383875517230482219.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:376)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:258)
at com.kenai.jffi.internal.StubLoader.(StubLoader.java:449)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.kenai.jffi.Init.load(Init.java:68)
at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
at com.kenai.jffi.Foreign$InstanceHolder.(Foreign.java:45)
at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
at com.kenai.jffi.Type.resolveSize(Type.java:155)
at com.kenai.jffi.Type.size(Type.java:138)
at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
at jnr.ffi.provider.AbstractRuntime.(AbstractRuntime.java:48)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:57)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:41)
at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.(NativeRuntime.java:53)
at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
at jnr.ffi.provider.jffi.Provider.(Provider.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.(FFIProvider.java:57)
at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
at jnr.ffi.Library.loadLibrary(Library.java:114)
at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.(POSIXFactory.java:279)
at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at jnr.posix.BaseNativePOSIX.(BaseNativePOSIX.java:37)
at jnr.posix.LinuxPOSIX.(LinuxPOSIX.java:19)
at jnr.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:143)
at jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:121)
at jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
at jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:38)
at jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
at jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:398)
at org.jruby.RubyGlobal.initSTDIO(RubyGlobal.java:287)
at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:211)
at org.jruby.Ruby.init(Ruby.java:1238)
at org.jruby.Ruby.newInstance(Ruby.java:362)
at org.jruby.Main.internalRun(Main.java:273)
at org.jruby.Main.run(Main.java:234)
at org.jruby.Main.main(Main.java:206)
java.lang.UnsatisfiedLinkError: /opt/jruby-9.2.0.0/lib/jni/arm-Linux/libjffi-1.2.so: /opt/jruby-9.2.0.0/lib/jni/arm-Linux/libjffi-1.2.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromBootPath(StubLoader.java:321)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:248)
at com.kenai.jffi.internal.StubLoader.(StubLoader.java:449)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.kenai.jffi.Init.load(Init.java:68)
at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
at com.kenai.jffi.Foreign$InstanceHolder.(Foreign.java:45)
at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
at com.kenai.jffi.Type.resolveSize(Type.java:155)
at com.kenai.jffi.Type.size(Type.java:138)
at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
at jnr.ffi.provider.AbstractRuntime.(AbstractRuntime.java:48)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:57)
at jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:41)
at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.(NativeRuntime.java:53)
at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
at jnr.ffi.provider.jffi.Provider.(Provider.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.(FFIProvider.java:57)
at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
at jnr.ffi.Library.loadLibrary(Library.java:114)
at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.(POSIXFactory.java:279)
at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at jnr.posix.BaseNativePOSIX.(BaseNativePOSIX.java:37)
at jnr.posix.LinuxPOSIX.(LinuxPOSIX.java:19)
at jnr.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:143)
at jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:121)
at jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
at jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:38)
at jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
at jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:398)
at org.jruby.RubyGlobal.initSTDIO(RubyGlobal.java:287)
at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:211)
at org.jruby.Ruby.init(Ruby.java:1238)
at org.jruby.Ruby.newInstance(Ruby.java:362)
at org.jruby.Main.internalRun(Main.java:273)
at org.jruby.Main.run(Main.java:234)
at org.jruby.Main.main(Main.java:206)

at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:270)
at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:449)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.kenai.jffi.Init.load(Init.java:68)
at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45)
... 38 more

Fetching: geomerative-1.0.2-java.gem (100%)
NotImplementedError: flock unsupported or native support failed to load; see http://wiki.jruby.org/Native-Libraries
flock at org/jruby/RubyFile.java:322
block in write_binary at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems.rb:897
open at org/jruby/RubyIO.java:1179
open at org/jruby/RubyKernel.java:311
write_binary at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems.rb:895
cache_update_path at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:334
download at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:188
download at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/source.rb:215
install at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/resolver/specification.rb:91
block in install at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/request_set.rb:168
each at org/jruby/RubyArray.java:1801
install at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/request_set.rb:156
install_gem at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:205
block in install_gems at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:255
each at org/jruby/RubyArray.java:1801
install_gems at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:251
execute at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:158
invoke_with_build_args at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/command.rb:313
process_args at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:171
run at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:141
run at /opt/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/gem_runner.rb:59

at /opt/jruby-9.2.0.0/bin/jgem:21
load at org/jruby/RubyKernel.java:994
at /opt/jruby-9.2.0.0/bin/gem:4

@headius

This comment has been minimized.

Copy link
Member

commented May 25, 2018

This error appears to be coming from our native/FFI subsystem. It looks like the native library does not load. Did it work in 9.1.x?

@headius headius added this to the JRuby 9.2.1.0 milestone May 25, 2018

@monkstone

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2018

@headius No it did not work in jruby-9.1.17.0 I only got raspberry on Wednesday so I am an absolute nooby apart from knowing my way around linux.

@headius

This comment has been minimized.

Copy link
Member

commented May 25, 2018

Ok no problem. You might see if you can clone and "mvn test" https://github.com/jnr/jnr-ffi. I also have a raspi I can test on, so I'll try to see what's preventing the native bits from loading.

@monkstone

This comment has been minimized.

Copy link
Contributor Author

commented May 27, 2018

@headius I have run tests and they fail
jffi-test.zip

I have seen elsewhere (Gentoo wiki) recommended CFLAGS

# Raspberry Pi 2, or Raspberry Pi 3 running in 32 bit mode:
CFLAGS="-O2 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard"

Further note that PLATFORM from GNUmakefile (libtest) would yield armv71-linux, but it is unclear how PLATFORM is used

@headius

This comment has been minimized.

Copy link
Member

commented Oct 11, 2018

We've had updates for jffi on ARM in recent months. Perhaps this is working now? I do not have such an environment to test on.

@enebo

This comment has been minimized.

Copy link
Member

commented Oct 11, 2018

From what I recall in another issue the probably on an older raspi was that shared libraries could not be loaded from /tmp directories. Not sure how we unpack and load the shared library but maybe we ship proper shared library but the ability to load it is disabled somehow?

@monkstone

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2018

@headius mvn test still failing
surefire-reports.zip

@headius

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

@monkstone Yeah still seems like the same issue loading the shared library. Can you try setting a user-specific TMP location?

I have an ARM64 server, will see if I can reproduce there

@headius

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

@monkstone My Ubuntu ARM64 environment passed all tests ok...so I think that's good news. Try the alternate TMP dir. We may be able to have jffi/jnr-ffi figure out that the existing TMP does not allow loading executables.

@headius

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

I do have a couple raspi's at home...if I get some time tonight or this weekend I'll try to reproduce myself.

@monkstone

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2018

@headius @enebo
OK so I tried

export TEMP=/home/pi/tmp

And it still fails remember I'm running default raspbian OS (32 bit)

@headius

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

@monkstone Ok...maybe something's still messed up with our 32-bit ARM support. I'll have to try to get my raspi running again.

@headius

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

@monkstone Hey in the interim maybe you can poke around the native bits of jffi and see if the 32-bit ARM library looks right? I mean, similar size to other platforms, recognized as an ELF dynamic library, etc.

@monkstone

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2018

I also tried alterring /tmp to tmpfs still no go.

@headius

This comment has been minimized.

Copy link
Member

commented Oct 30, 2018

@monkstone I believe I have a fix in jnr/jffi#58. I have described how you can test this PR in #5362 (comment).

headius added a commit to headius/jruby that referenced this issue Oct 30, 2018

Update jffi to 1.2.18 for refreshed 32-bit ARM support.
This pulls in the latest jffi, which has a new 32-bit ARM binary
rebuilt for hard-float EABI that appears to be typical on modern
ARM Linux distributions.

Fixes jruby#5362.
Fixes jruby#5192.
@headius

This comment has been minimized.

Copy link
Member

commented Oct 30, 2018

@monkstone

This comment has been minimized.

Copy link
Contributor Author

commented Oct 30, 2018

@headius Thanks for that, I was half way through building jruby on raspberrypi (which is a bit slow).
jirb and jgem now both working for me with jruby-9.2.1.0-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.