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

Installation Error of BigDecimal 3.1.5 in JRuby #279

Closed
koic opened this issue Dec 13, 2023 · 3 comments
Closed

Installation Error of BigDecimal 3.1.5 in JRuby #279

koic opened this issue Dec 13, 2023 · 3 comments

Comments

@koic
Copy link
Contributor

koic commented Dec 13, 2023

I encountered this error in the following development:
https://github.com/rubocop/rubocop-rails/actions/runs/7192052922/job/19587776909

When installing bigdecimal 3.1.5 on JRuby, the following error occurs:

$ ruby -v
jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f Java HotSpot(TM) 64-Bit Server VM 25.271-b09 on 1.8.0_271-b09 +jit [x86_64-darwin]
$ gem i bigdecimal:3.1.5
Building native extensions. This could take a while...
ERROR:  Error installing bigdecimal:
        ERROR: Failed to build gem native extension.

    current directory: /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/gems/shared/gems/bigdecimal-3.1.5/ext/bigdecimal
/Users/koic/.rbenv/versions/jruby-9.4.5.0/bin/jruby -I /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib extconf.rb
checking for __builtin_clz()... *** 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=/Users/koic/.rbenv/versions/jruby-9.4.5.0/bin/jruby
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

             try_do at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:456
        try_compile at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:571
        with_werror at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:524
        try_compile at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:571
  have_builtin_func at extconf.rb:6
       checking_for at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:942
           postpone at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:350
               open at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:320
           postpone at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:350
               open at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:320
           postpone at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:346
       checking_for at /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/stdlib/mkmf.rb:941
  have_builtin_func at extconf.rb:5
             <main> at extconf.rb:18

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

  /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/gems/shared/extensions/universal-java-1.8/3.1.0/bigdecimal-3.1.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/koic/.rbenv/versions/jruby-9.4.5.0/lib/ruby/gems/shared/gems/bigdecimal-3.1.5 for inspection.

No error occurs with bigdecimal 3.1.4.

$ ruby -v
jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f Java HotSpot(TM) 64-Bit Server VM 25.271-b09 on 1.8.0_271-b09 +jit [x86_64-darwin]
$ gem i bigdecimal:3.1.4
Successfully installed bigdecimal-3.1.4-java
1 gem installed

It seems likely that a release similar to bigdecimal-3.1.4-java is needed as bigdecimal-3.1.5-java:
https://rubygems.org/gems/bigdecimal/versions/3.1.4-java

@koic koic changed the title Installation Error with JRuby Installation Error of BigDecimal 3.1.5 in JRuby Dec 13, 2023
@jsvd
Copy link

jsvd commented Dec 13, 2023

Seems like the last time this was solved by publishing a -java stub #169 (comment), but maybe this process is not automatic and we may have these issues any time there's a new bigdecimal release.

@hsbt
Copy link
Member

hsbt commented Dec 13, 2023

done https://rubygems.org/gems/bigdecimal/versions/3.1.5-java

@hsbt hsbt closed this as completed Dec 13, 2023
@koic
Copy link
Contributor Author

koic commented Dec 13, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants