socketry / nio4r

Cross-platform asynchronous I/O primitives for scalable network clients and servers.
Other
970 stars 86 forks source link

nio4r 2.7.2 broken on JRuby #315

Closed jsvd closed 6 months ago

jsvd commented 6 months ago

hi @ioquatix I believe the latest changes to the gem structure have broken the jruby gem. For example the gem doesn't include the gemspec any more:

❯ for gem in nio4r-2.7.1-java.gem nio4r-2.7.2-java.gem ; do gem unpack $gem;done
Unpacked gem: '/private/tmp/nio4r/nio4r-2.7.1-java'
Unpacked gem: '/private/tmp/nio4r/nio4r-2.7.2-java'

❯ find . -name "*gemspec"                                                       
./nio4r-2.7.1-java/nio4r.gemspec

And fails to install as it tries to install the C extensions:

❯ gem install nio4r -v 2.7.2
Building native extensions. This could take a while...
ERROR:  Error installing nio4r:
    ERROR: Failed to build gem native extension.

    current directory: /Users/joaoduarte/.rvm/gems/jruby-9.4.6.0/gems/nio4r-2.7.2-java/ext/nio4r
/Users/joaoduarte/.rvm/rubies/jruby-9.4.6.0/bin/jruby -I /Users/joaoduarte/.rvm/rubies/jruby-9.4.6.0/lib/ruby/stdlib extconf.rb
checking for unistd.h... *** extconf.rb failed ***
chadlwilson commented 6 months ago

Oops, duplicated with a commit comment at https://github.com/socketry/nio4r/commit/769c298c6118d89cf3466ff69ffe93041bcd0e25#r141766031 which seems to me to be the relevant change - it's now trying to build native extensions which it did not used to do?

ioquatix commented 6 months ago

Apologies, I'll sort this out today.

ioquatix commented 6 months ago

This should be fixed in 2.7.3 but can you please test it and let me know - thanks!

chadlwilson commented 6 months ago

2.7.3 seems fine, thanks a lot @ioquatix !

👋 @ 🥝 :)