Skip to content

Support JRuby? #53

@postmodern

Description

@postmodern

I would like to use the async gems under JRuby, but the io-event gem contains C extensions.

$ gem install async
Fetching timers-4.3.5.gem
Fetching async-2.0.0.gem
Fetching io-event-1.0.9.gem
Fetching fiber-local-1.0.0.gem
Fetching console-1.16.2.gem
Successfully installed timers-4.3.5
Building native extensions. This could take a while...
ERROR:  Error installing async:
	ERROR: Failed to build gem native extension.

    current directory: /home/postmodern/.gem/jruby/3.1.0/gems/io-event-1.0.9/ext
/opt/rubies/jruby-9.4.0.0/bin/jruby -I /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib extconf.rb
checking for rb_ext_ractor_safe()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/opt/rubies/jruby-9.4.0.0/bin/jruby
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

        try_do at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:456
     try_link0 at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:541
      try_link at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:556
      try_func at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:765
     have_func at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:1051
  checking_for at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:942
      postpone at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:350
          open at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:350
          open at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:346
  checking_for at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:941
     have_func at /opt/rubies/jruby-9.4.0.0/lib/ruby/stdlib/mkmf.rb:1050
        <main> at extconf.rb:36
... 15 levels...

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/postmodern/.gem/jruby/3.1.0/extensions/universal-java-17/3.1.0/io-event-1.0.9/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/postmodern/.gem/jruby/3.1.0/gems/io-event-1.0.9 for inspection.
Results logged to /home/postmodern/.gem/jruby/3.1.0/extensions/universal-java-17/3.1.0/io-event-1.0.9/gem_make.out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions