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

"NotImplementedError: waitpid unsupported or native support failed to load" with 9.0.0.0 during install jruby-launcher gem #3266

Closed
kumekay opened this issue Aug 19, 2015 · 5 comments

Comments

@kumekay
Copy link

kumekay commented Aug 19, 2015

It seems that issue #2974 still present in final 9.0.0.0

After run rbenv install jruby-9.0.0.0
I received:

Downloading jruby-bin-9.0.0.0.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/655665db3a1dc0462cba99d45532ab57d8416b5f168d8a0081bde9b7a93a394e
Installing jruby-9.0.0.0...

BUILD FAILED (OS X 10.10 using ruby-build 20150803)

Full log:

/var/folders/q6/zj07wtbs2wscjh0j9z1rg_dm0000gn/T/ruby-build.20150818194606.45062 ~
HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 37095913
Connection: keep-alive
Date: Tue, 18 Aug 2015 10:41:32 GMT
Last-Modified: Wed, 22 Jul 2015 17:44:43 GMT
ETag: "fe9036ea69bf23dc3b69cfc94adb5404"
Accept-Ranges: bytes
Server: AmazonS3
Age: 21875
X-Cache: Hit from cloudfront
Via: 1.1 ab6f2b90dc58e7fbe047690155b87625.cloudfront.net (CloudFront)
X-Amz-Cf-Id: PzClRX3gkoBm1r56gn8NqTiFwgznm0JhqCO-DbCG18D71aDzsxt4-w==

/var/folders/q6/zj07wtbs2wscjh0j9z1rg_dm0000gn/T/ruby-build.20150818194606.45062/jruby-9.0.0.0 /var/folders/q6/zj07wtbs2wscjh0j9z1rg_dm0000gn/T/ruby-build.20150818194606.45062 ~
NotImplementedError: waitpid unsupported or native support failed to load
                   flock at org/jruby/RubyFile.java:298
    block in read_binary at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems.rb:773
                    open at org/jruby/RubyIO.java:1126
                    open at org/jruby/RubyKernel.java:311
             read_binary at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems.rb:772
              fetch_spec at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/source.rb:145
                    spec at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/resolver/api_specification.rb:76
      add_always_install at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/resolver/installer_set.rb:77
    resolve_dependencies at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/dependency_installer.rb:473
             install_gem at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:238
   block in install_gems at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:299
                    each at org/jruby/RubyArray.java:1560
            install_gems at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:295
                 execute at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:202
  invoke_with_build_args at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/command.rb:307
            process_args at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:168
                     run at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:138
                     run at /Users/ku/.rbenv/versions/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/gem_runner.rb:54
                   <top> at /Users/ku/.rbenv/versions/jruby-9.0.0.0/bin/jgem:21
                    load at org/jruby/RubyKernel.java:958
                   <top> at gem:4

Additional info:
java -version

java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

Next I tried to run ./jgem install jruby-launcher with binaries from https://s3.amazonaws.com/jruby.org/downloads/9.0.0.0/jruby-bin-9.0.0.0.tar.gzand got same error:

NotImplementedError: waitpid unsupported or native support failed to load
                   flock at org/jruby/RubyFile.java:298
    block in read_binary at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems.rb:773
                    open at org/jruby/RubyIO.java:1126
                    open at org/jruby/RubyKernel.java:311
             read_binary at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems.rb:772
              fetch_spec at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/source.rb:145
                    spec at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/resolver/api_specification.rb:76
      add_always_install at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/resolver/installer_set.rb:77
    resolve_dependencies at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/dependency_installer.rb:473
             install_gem at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:238
   block in install_gems at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:299
                    each at org/jruby/RubyArray.java:1560
            install_gems at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:295
                 execute at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:202
  invoke_with_build_args at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/command.rb:307
            process_args at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/command_manager.rb:168
                     run at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/command_manager.rb:138
                     run at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/gem_runner.rb:54
                   <top> at ./jgem:21
@headius
Copy link
Member

headius commented Aug 19, 2015

Hmm, I can't reproduce here with a build from master. Can you try running this with JRUBY_OPTS="-Xnative.verbose=true" and provide the output from that? It looks like the native library we use for calling out to C did not load, and the failover library did not have the necessary support.

@kumekay
Copy link
Author

kumekay commented Aug 19, 2015

So, the output of JRUBY_OPTS="-Xnative.verbose=true" ./jgem install jruby-launcher

Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows.
java.lang.UnsatisfiedLinkError: dlopen(libc.dylib, 9): image not found
    at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87)
    at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70)
    at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49)
    at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59)
    at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:117)
    at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:59)
    at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43)
    at jnr.ffi.LibraryLoader.load(LibraryLoader.java:287)
    at jnr.ffi.Library.loadLibrary(Library.java:127)
    at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.<clinit>(POSIXFactory.java:279)
    at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
    at jnr.posix.BaseNativePOSIX.<init>(BaseNativePOSIX.java:36)
    at jnr.posix.MacOSPOSIX.<init>(MacOSPOSIX.java:13)
    at jnr.posix.POSIXFactory.loadMacOSPOSIX(POSIXFactory.java:147)
    at jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:118)
    at jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
    at jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:36)
    at jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
    at jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:370)
    at org.jruby.RubyGlobal.prepareStdioChannel(RubyGlobal.java:279)
    at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:193)
    at org.jruby.Ruby.init(Ruby.java:1240)
    at org.jruby.Ruby.newInstance(Ruby.java:331)
    at org.jruby.Main.internalRun(Main.java:266)
    at org.jruby.Main.run(Main.java:225)
    at org.jruby.Main.main(Main.java:197)
NotImplementedError: waitpid unsupported or native support failed to load
                   flock at org/jruby/RubyFile.java:298
    block in read_binary at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems.rb:773
                    open at org/jruby/RubyIO.java:1126
                    open at org/jruby/RubyKernel.java:311
             read_binary at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems.rb:772
              fetch_spec at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/source.rb:145
                    spec at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/resolver/api_specification.rb:76
      add_always_install at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/resolver/installer_set.rb:77
    resolve_dependencies at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/dependency_installer.rb:473
             install_gem at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:238
   block in install_gems at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:299
                    each at org/jruby/RubyArray.java:1560
            install_gems at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:295
                 execute at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/commands/install_command.rb:202
  invoke_with_build_args at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/command.rb:307
            process_args at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/command_manager.rb:168
                     run at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/command_manager.rb:138
                     run at /usr/local/Cellar/jruby/9.0.0.0/libexec/lib/ruby/stdlib/rubygems/gem_runner.rb:54
                   <top> at ./jgem:21

@kumekay
Copy link
Author

kumekay commented Aug 19, 2015

Oh, I've found the problem:
It was line export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:/Applications/Muse" in my .zshrc
I'll close issue, because it's not a jruby problem.
Thank you for help!

@kumekay kumekay closed this as completed Aug 19, 2015
@headius
Copy link
Member

headius commented Aug 20, 2015

@pinya Is that a line you added? We have seen similar reports from other people.

@kumekay
Copy link
Author

kumekay commented Aug 20, 2015

@headius No, I removed that line after I run brew doctor
and found warning:

 Setting DYLD_FALLBACK_LIBRARY_PATH can break dynamic linking.
 You should probably unset it.

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