Skip to content

FFI not working on Java 9 MacOS  #4824

@fgoepel

Description

@fgoepel

It looks like it's expecting "darwin-x86_64", but now somehow getting "x86_64-darwin".

$ name -a
Darwin imac 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64
$ java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
$ jruby -v -w -rffi -e 'p FFI::Platform::ARCH'
jruby 9.1.13.0 (2.3.3) 2017-09-06 8e1c115 Java HotSpot(TM) 64-Bit Server VM 9.0.1+11 on 9.0.1+11 +jit [darwin-x86_64]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
LoadError: Unsupported platform: x86_64-darwin
  require at org/jruby/RubyKernel.java:955
  require at /usr/local/Cellar/jruby/9.1.13.0/libexec/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
   <main> at /usr/local/Cellar/jruby/9.1.13.0/libexec/lib/ruby/stdlib/ffi/ffi.rb:69
  require at org/jruby/RubyKernel.java:955
   (root) at /usr/local/Cellar/jruby/9.1.13.0/libexec/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
   <main> at /usr/local/Cellar/jruby/9.1.13.0/libexec/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
  require at org/jruby/RubyKernel.java:955
   (root) at /usr/local/Cellar/jruby/9.1.13.0/libexec/lib/ruby/stdlib/ffi.rb:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions