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 fail à cause de bigdecimal Ruby 2.6.2 #4873

Open
chaibax opened this issue Jan 5, 2021 · 1 comment
Open

Installation fail à cause de bigdecimal Ruby 2.6.2 #4873

chaibax opened this issue Jan 5, 2021 · 1 comment
Labels
bug ⚙️ OPS Ops / perf / sécu

Comments

@chaibax
Copy link
Contributor

chaibax commented Jan 5, 2021

En suivant le readme, au moment du bundle install j'ai une erreur avec bigdecimal

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/chaibpro/.gem/gems/bigdecimal-2.0.0/ext/bigdecimal
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210105-85252-5wl4ks.rb extconf.rb
checking RUBY_BIGDECIMAL_VERSION... 2.0.0
checking for labs() in stdlib.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in
`block in try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in
`mktmpdir'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in
`try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:782:in
`try_func'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1069:in
`block in have_func'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1068:in
`have_func'
        from extconf.rb:31:in `<main>'

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

/Users/chaibpro/.gem/extensions/universal-darwin-20/2.6.0/bigdecimal-2.0.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/chaibpro/.gem/gems/bigdecimal-2.0.0
for inspection.
Results logged to
/Users/chaibpro/.gem/extensions/universal-darwin-20/2.6.0/bigdecimal-2.0.0/gem_make.out

An error occurred while installing bigdecimal (2.0.0), and Bundler
cannot continue.
Make sure that `gem install bigdecimal -v '2.0.0' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  jsonlint was resolved to 0.3.0, which depends on
    oj was resolved to 3.10.12, which depends on
      bigdecimal

Le souci semble connu. Je suis passé à Ruby 2.6.4 (au lieu de 2.6.2) pour régler le problème.
Ça semble bien marcher en local. Mais étant néophyte avec Ruby, je ne sais pas s'il y a des effets de bords.

A la base j'ai mis la 2.6.2 qui était dans .ruby-version

@Morendil
Copy link
Contributor

@chaibax Ca ne devrait pas être très sensible à la version de Ruby…

@revolunet revolunet added ⚙️ OPS Ops / perf / sécu bug and removed En discussion labels Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ⚙️ OPS Ops / perf / sécu
Projects
None yet
Development

No branches or pull requests

3 participants