field_test: Unable to install gem due to "Could not find rice/rice.hpp header"
Hello!! am having the following issue when i try bundle install, it’s related to rice
dependency, for some reason am unable to install the gem, what i saw trying to debug the problem it’s related to clang compiler but i really don’t understand what i need to update or install in my computer to succeed a installation:
Ty for your help.
rice-4.0.2/lib/mkmf-rice.rb:120:in
<top (required)>': Could not find rice/rice.hpp header`
MacBook Pro (Retina, 13-inch, Early 2015) MacOS Mojave version 10.14.6 (18G9323)
Ruby and Rails versions
ruby "2.6.8"
gem "rails", "~> 6.0.4.1"
Clang Version
clang --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
llvm-g++ --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Error trace
current directory: /Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/gems/field_test-0.5.1/ext/field_test
/Users/edgarLH/.rbenv/versions/2.6.8/bin/ruby -I /Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0 -r ./siteconf20211004-75138-1l4lrqy.rb extconf.rb
/Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/gems/rice-4.0.2/lib/mkmf-rice.rb:16: warning: already initialized constant
MakeMakefile::CONFTEST_C
/Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0/mkmf.rb:259: warning: previous definition of CONFTEST_C was here
checking for rice/rice.hpp in /Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/gems/rice-4.0.2/include... no
*** 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/edgarLH/.rbenv/versions/2.6.8/bin/$(RUBY_BASE_NAME)
/Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/gems/rice-4.0.2/lib/mkmf-rice.rb:120:in `<top (required)>': Could not find rice/rice.hpp header
(RuntimeError)
from /Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
from /Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from /Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from extconf.rb:1:in `<main>'
/Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- mkmf-rice (LoadError)
from /Users/edgarLH/.rbenv/versions/2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from extconf.rb:1:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/extensions/x86_64-darwin-18/2.6.0/field_test-0.5.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/gems/field_test-0.5.1 for inspection.
Results logged to /Users/edgarLH/.rbenv/versions/2.6.8/gemsets/rails_6_new/extensions/x86_64-darwin-18/2.6.0/field_test-0.5.1/gem_make.out
An error occurred while installing field_test (0.5.1), and Bundler cannot continue.
Make sure that `gem install field_test -v '0.5.1' --source 'http://rubygems.org/'` succeeds before bundling.
mkmf.log file mkmf.log
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
@ankane Hope you’re doing well. Mate, Thank you so much for your help.
Yeah, I think it may only be an issue on macOS 10.14 / Apple Clang 11, so you may just want to use field_test version 0.4.1 (which doesn’t use Rice). I’m not sure it’s worth more effort to try and fix this.