ruby / bigdecimal

Arbitrary-precision decimal floating-point number library for Ruby
Other
112 stars 65 forks source link

bigdecimal install error #297

Open xsmyqf opened 5 days ago

xsmyqf commented 5 days ago

I have installed ruby-dev,but still have error: ` gem install bigdecimal Building native extensions. This could take a while... ERROR: Error installing bigdecimal: ERROR: Failed to build gem native extension.

current directory: /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bigdecimal-3.1.8/ext/bigdecimal

/opt/bitnami/ruby/bin/ruby 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=/opt/bitnami/ruby/bin/$(RUBY_BASE_NAME) /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:490:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:616:inblock in try_compile' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:565:in with_werror' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:616:intry_compile' from extconf.rb:6:in block in have_builtin_func' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:989:inblock in checking_for' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:354:in block (2 levels) in postpone' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:324:inopen' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:354:in block in postpone' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:324:inopen' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:350:in postpone' from /opt/bitnami/ruby/lib/ruby/3.1.0/mkmf.rb:988:inchecking_for' from extconf.rb:5:in have_builtin_func' from extconf.rb:18:in

'

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

/opt/bitnami/ruby/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0-static/bigdecimal-3.1.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bigdecimal-3.1.8 for inspection. Results logged to /opt/bitnami/ruby/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0-static/bigdecimal-3.1.8/gem_make.out `

wayneeseguin commented 5 days ago

I am also encountering this same error. Are there any system C headers / library dependencies that we need to install first?

thatsnotright commented 2 hours ago

You may need libz-dev on ubuntu