ankane / or-tools-ruby

Operations research tools for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't build on M1 Mac

ollym opened this issue · comments

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

    current directory: /Users/ollym/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/or-tools-0.7.0/ext/or-tools
/Users/ollym/.rbenv/versions/3.1.0/bin/ruby -I /Users/ollym/.rbenv/versions/3.1.0/lib/ruby/site_ruby/3.1.0 -r
./siteconf20220525-14153-650tu6.rb extconf.rb
checking for rice/rice.hpp in /Users/ollym/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include... yes
checking for -lc++... yes
*** 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/ollym/.rbenv/versions/3.1.0/bin/$(RUBY_BASE_NAME)
	--with-c++-dir
	--without-c++-dir
	--with-c++-include
	--without-c++-include=${c++-dir}/include
	--with-c++-lib
	--without-c++-lib=${c++-dir}/lib
	--with-c++lib
	--without-c++lib
	--with-or-tools-dir
	--without-or-tools-dir
	--with-or-tools-include
	--without-or-tools-include=${or-tools-dir}/include
	--with-or-tools-lib
	--without-or-tools-lib=${or-tools-dir}/lib
/Users/ollym/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/or-tools-0.7.0/ext/or-tools/vendor.rb:11:in `<top (required)>': Binary
installation not available for this platform: Mac ARM (RuntimeError)

Run:
brew install or-tools
bundle config build.or-tools --with-or-tools-dir=/opt/homebrew

	from extconf.rb:15:in `require_relative'
	from extconf.rb:15:in `<main>'

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

  /Users/ollym/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/or-tools-0.7.0/mkmf.log

extconf failed, exit code 1

Hey @ollym, the error message gives instructions on what to do.