ankane / or-tools-ruby

Operations research tools for Ruby
Apache License 2.0
171 stars 20 forks source link

install it on openSUSE tumbleweed #48

Closed vpereira closed 1 year ago

vpereira commented 1 year ago

Trying to install it on openSUSE Tumbleweed and having issues.

I have already the packages installed (see my zypper call in the end of the log) but the gem cannot find it.

kimura@linux-qouy:~/wongi/wongi-sandbox/subscriptions/or-tools-ruby> bundle exec rake compile
cd tmp/x86_64-linux/ext/3.2.2
/home/kimura/.rvm/rubies/ruby-3.2.2/bin/ruby -I. -r.rake-compiler-siteconf.rb ../../../../ext/or-tools/extconf.rb
checking for rice/rice.hpp in /home/kimura/.rvm/gems/ruby-3.2.2/gems/rice-4.1.0/include... yes
checking for -lstdc++... yes
*** ../../../../ext/or-tools/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}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=../../../../ext/or-tools
    --curdir
    --ruby=/home/kimura/.rvm/rubies/ruby-3.2.2/bin/$(RUBY_BASE_NAME)
    --with-stdc++-dir
    --without-stdc++-dir
    --with-stdc++-include
    --without-stdc++-include=${stdc++-dir}/include
    --with-stdc++-lib
    --without-stdc++-lib=${stdc++-dir}/lib64
    --with-stdc++lib
    --without-stdc++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}/lib64
/home/kimura/wongi/wongi-sandbox/subscriptions/or-tools-ruby/ext/or-tools/vendor.rb:61:in `<top (required)>': Binary installation not available for this platform: opensuse-tumbleweed 20230616 (RuntimeError)

Build the OR-Tools C++ library from source, then run:
bundle config build.or-tools --with-or-tools-dir=/path/to/or-tools

    from ../../../../ext/or-tools/extconf.rb:15:in `require_relative'
    from ../../../../ext/or-tools/extconf.rb:15:in `<main>'
rake aborted!
Command failed with status (1): [/home/kimura/.rvm/rubies/ruby-3.2.2/bin/...]
/home/kimura/.rvm/gems/ruby-3.2.2/gems/rake-compiler-1.2.3/lib/rake/extensiontask.rb:220:in `block (2 levels) in define_compile_tasks'
/home/kimura/.rvm/gems/ruby-3.2.2/gems/rake-compiler-1.2.3/lib/rake/extensiontask.rb:219:in `block in define_compile_tasks'
/home/kimura/.rvm/gems/ruby-3.2.2/bin/bundle:25:in `load'
/home/kimura/.rvm/gems/ruby-3.2.2/bin/bundle:25:in `<main>'
Tasks: TOP => compile => compile:x86_64-linux => compile:ext:x86_64-linux => copy:ext:x86_64-linux:3.2.2 => tmp/x86_64-linux/ext/3.2.2/ext.so => tmp/x86_64-linux/ext/3.2.2/Makefile
(See full trace by running task with --trace)
kimura@linux-qouy:~/wongi/wongi-sandbox/subscriptions/or-tools-ruby> zypper se or-tools
Loading repository data...
Reading installed packages...

S  | Name                      | Summary                                               | Type
---+---------------------------+-------------------------------------------------------+--------
   | eclipse-contributor-tools | Tools for Eclipse Contributors                        | package
i+ | google-or-tools           | Suite for solving combinatorial optimization problems | package
i+ | google-or-tools-devel     | Suite for solving combinatorial optimization problems | package
   | google-or-tools-minizinc  | OR-Tools minizinc solver                              | package
kimura@linux-qouy:~/wongi/wongi-sandbox/subscriptions/or-tools-ruby> 
ankane commented 1 year ago

Hi @vpereira, you can specify the path to OR-Tools with:

bundle config build.or-tools --with-or-tools-dir=/path/to/or-tools
bundle install

or

gem install or-tools -- --with-or-tools-dir=/path/to/or-tools

(no need to clone the project and run rake compile)