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

Java version of 1.5.5 is missing #54

Closed
joshcooper opened this issue May 24, 2023 · 2 comments
Closed

Java version of 1.5.5 is missing #54

joshcooper opened this issue May 24, 2023 · 2 comments

Comments

@joshcooper
Copy link

Hi, could you publish a java version of 1.5.5 as was done for prior 1.5.x releases? As of now, trying to install jaro_winkler (or rubocop due to runtime dependency on jaro_winkler) under JRuby 9.3 or 9.4 fails when trying to compile native extensions:

❯ cat jarotest.rb
gemfile do
  source 'https://rubygems.org'
  gem 'jaro_winkler', '= 1.5.5'
end

puts 'Gems installed'

❯ ruby --version
jruby 9.4.2.0 (3.1.0) 2023-03-08 90d2913fda OpenJDK 64-Bit Server VM 11.0.19+7-post-Ubuntu-0ubuntu120.04.1 on 11.0.19+7-post-Ubuntu-0ubuntu120.04.1 +jit [x86_64-linux]

❯ ruby jarotest.rb 
Bundler::InstallError: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/jaro_winkler-1.5.5/ext/jaro_winkler
/home/josh/.rbenv/versions/jruby-9.4.2.0/bin/jruby -I /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib extconf.rb
creating Makefile

current directory: /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/jaro_winkler-1.5.5/ext/jaro_winkler
make DESTDIR\= sitearchdir\=./.gem.20230523-405981-zgf841 sitelibdir\=./.gem.20230523-405981-zgf841 clean

current directory: /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/jaro_winkler-1.5.5/ext/jaro_winkler
make DESTDIR\= sitearchdir\=./.gem.20230523-405981-zgf841 sitelibdir\=./.gem.20230523-405981-zgf841
make: *** No rule to make target '/home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/include/ruby/ruby.h', needed by 'adj_matrix.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/jaro_winkler-1.5.5 for inspection.
Results logged to /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/extensions/universal-java-11/3.1.0/jaro_winkler-1.5.5/gem_make.out

  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:102:in `run'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:51:in `block in make'
  org/jruby/RubyArray.java:1987:in `each'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:43:in `make'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:171:in `build_extension'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:205:in `block in build_extensions'
  org/jruby/RubyArray.java:1987:in `each'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:202:in `build_extensions'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/stdlib/rubygems/installer.rb:843:in `build_extensions'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/source/rubygems.rb:200:in `install'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/gem_installer.rb:54:in `install'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/parallel_installer.rb:156:in `do_install'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/parallel_installer.rb:147:in `block in worker_pool'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/worker.rb:62:in `apply_func'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/worker.rb:57:in `block in process_queue'
  org/jruby/RubyKernel.java:1586:in `loop'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/worker.rb:54:in `process_queue'
  /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/worker.rb:90:in `block in create_threads'

An error occurred while installing jaro_winkler (1.5.5), and Bundler cannot continue.

In Gemfile:
  jaro_winkler

         handle_error at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/parallel_installer.rb:190
                 call at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/parallel_installer.rb:96
                 call at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer/parallel_installer.rb:67
  install_in_parallel at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer.rb:244
              install at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer.rb:201
                  run at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer.rb:89
                 lock at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/process_lock.rb:12
                 open at org/jruby/RubyIO.java:1176
                 lock at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/process_lock.rb:9
                  run at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer.rb:71
              install at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/installer.rb:23
              gemfile at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/inline.rb:58
            temporary at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/settings.rb:131
              gemfile at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/inline.rb:57
            temporary at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/settings.rb:131
              gemfile at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/inline.rb:51
   with_unbundled_env at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler.rb:419
             with_env at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler.rb:665
   with_unbundled_env at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler.rb:419
              gemfile at /home/josh/.rbenv/versions/jruby-9.4.2.0/lib/ruby/gems/shared/gems/bundler-2.4.10/lib/bundler/inline.rb:42
               <main> at jarotest.rb:3

Pinning back to 1.5.4 works as expected:

❯ cat jarotest.rb 
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'jaro_winkler', '= 1.5.4'
end

puts 'Gems installed'

❯ ruby jarotest.rb                                                        
Gems installed
joshcooper added a commit to joshcooper/facter that referenced this issue May 24, 2023
1.5.5 is missing a java version and native C extensions aren't supported
in JRuby, so pin back to 1.5.4.

When tonytonyjan/jaro_winkler#54 is resolved,
this can be reverted.
@tonytonyjan
Copy link
Owner

Hi @joshcooper, thanks for reporting. I just released v1.5.5 for Java platform.

Can you verify if it will fix your issue?

λ gem info -r jaro_winkler

*** REMOTE GEMS ***

jaro_winkler (1.5.5, 1.5.1)
    Platforms:
        1.5.1: universal-java-10, x86_64-darwin-17
        1.5.5: java, ruby
    Author: Jian Weihang
    Homepage: https://github.com/tonytonyjan/jaro_winkler

    An implementation of Jaro-Winkler distance algorithm written \ in C
    extension which supports any kind of string encoding.

@joshcooper
Copy link
Author

Awesome, thank you!

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

2 participants