Skip to content

Instantly share code, notes, and snippets.

@tbuehlmann
Created November 17, 2025 17:21
Show Gist options
  • Select an option

  • Save tbuehlmann/cf790238e623af5a07c3caa724df252d to your computer and use it in GitHub Desktop.

Select an option

Save tbuehlmann/cf790238e623af5a07c3caa724df252d to your computer and use it in GitHub Desktop.
docker run --rm ruby:3.4.7 bash -c '
cat << EOF > Gemfile
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rice", "4.7.1" # fails
# gem "rice", "4.7.0" # fails
# gem "rice", "4.6.1" # works
# gem "rice", "4.6.0" # works
# gem "rice", "4.5.0" # works
gem "or-tools", github: "tbuehlmann/or-tools-ruby", branch: "debian-13"
EOF
MAKE="make --jobs 8" bundle install
'
Fetching https://github.com/tbuehlmann/or-tools-ruby.git
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Fetching rice 4.7.1
Installing rice 4.7.1
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/ext/or-tools
/usr/local/bin/ruby extconf.rb
checking for rice/rice.hpp in /usr/local/bundle/gems/rice-4.7.1/include... yes
checking for -lstdc++fs... yes
Downloading
https://github.com/google/or-tools/releases/download/v9.14/or-tools_amd64_debian-12_cpp_v9.14.6206.tar.gz...
....................................................................
checking for -lortools... yes
creating Makefile
current directory:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/ext/or-tools
make --jobs 8 DESTDIR\= sitearchdir\=./.gem.20251117-1-s4q87k
sitelibdir\=./.gem.20251117-1-s4q87k clean
current directory:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/ext/or-tools
make --jobs 8 DESTDIR\= sitearchdir\=./.gem.20251117-1-s4q87k
sitelibdir\=./.gem.20251117-1-s4q87k
compiling assignment.cpp
compiling bin_packing.cpp
compiling constraint.cpp
compiling ext.cpp
compiling linear.cpp
compiling math_opt.cpp
compiling network_flows.cpp
compiling routing.cpp
In file included from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/graph.h:181,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/max_flow.h:23,
from network_flows.cpp:3:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/iterators.h:128:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
128 | : public std::iterator<std::input_iterator_tag, IntegerType>
| ^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65,
from /usr/include/c++/14/vector:62,
from network_flows.cpp:1:
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/iterators.h:247:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
247 | : public std::iterator<std::input_iterator_tag, IndexT>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/graph.h:319:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
319 | : public std::iterator<std::input_iterator_tag, PropertyT>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
In file included from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/key_types.h:49,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/variable_and_expressions.h:108,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/constraints/util/model_util.h:22,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/constraints/indicator/indicator_constraint.h:24,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/model.h:34,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/math_opt.h:19,
from math_opt.cpp:6:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:180:31:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<std::unique_ptr<operations_research::math_opt::ModelStorage>
>’ is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
180 | static absl::StatusOr<absl::Nonnull<std::unique_ptr<ModelStorage> > >
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/nullability.h:187,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/log/internal/check_op.h:37,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/log/internal/check_impl.h:19,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/log/check.h:37,
from math_opt.cpp:3:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:196:65:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<std::unique_ptr<operations_research::math_opt::ModelStorage>
>’ is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
196 | std::optional<absl::string_view> new_name = std::nullopt) const;
| ^~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1314:31:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<operations_research::math_opt::ModelStorage*>’
is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
1314 | using ModelStoragePtr = absl::Nonnull<ModelStorage*>;
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1314:53:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<operations_research::math_opt::ModelStorage*>’
is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
1314 | using ModelStoragePtr = absl::Nonnull<ModelStorage*>;
| ^
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1315:39:
warning: ‘using absl::lts_20250512::Nullable =
absl::lts_20250512::nullability_internal::NullableImpl<operations_research::math_opt::ModelStorage*>’
is deprecated: Use `absl_nullable`. [-Wdeprecated-declarations]
1315 | using NullableModelStoragePtr = absl::Nullable<ModelStorage*>;
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:90:7:
note: declared here
90 | using Nullable [[deprecated("Use `absl_nullable`.")]] =
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1315:62:
warning: ‘using absl::lts_20250512::Nullable =
absl::lts_20250512::nullability_internal::NullableImpl<operations_research::math_opt::ModelStorage*>’
is deprecated: Use `absl_nullable`. [-Wdeprecated-declarations]
1315 | using NullableModelStoragePtr = absl::Nullable<ModelStorage*>;
| ^
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:90:7:
note: declared here
90 | using Nullable [[deprecated("Use `absl_nullable`.")]] =
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1316:32:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<const
operations_research::math_opt::ModelStorage*>’ is deprecated: Use
`absl_nonnull`. [-Wdeprecated-declarations]
1316 | using ModelStorageCPtr = absl::Nonnull<const ModelStorage*>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1316:60:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<const
operations_research::math_opt::ModelStorage*>’ is deprecated: Use
`absl_nonnull`. [-Wdeprecated-declarations]
1316 | using ModelStorageCPtr = absl::Nonnull<const ModelStorage*>;
| ^
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1317:40:
warning: ‘using absl::lts_20250512::Nullable =
absl::lts_20250512::nullability_internal::NullableImpl<const
operations_research::math_opt::ModelStorage*>’ is deprecated: Use
`absl_nullable`. [-Wdeprecated-declarations]
1317 | using NullableModelStorageCPtr = absl::Nullable<const ModelStorage*>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:90:7:
note: declared here
90 | using Nullable [[deprecated("Use `absl_nullable`.")]] =
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/storage/model_storage.h:1317:69:
warning: ‘using absl::lts_20250512::Nullable =
absl::lts_20250512::nullability_internal::NullableImpl<const
operations_research::math_opt::ModelStorage*>’ is deprecated: Use
`absl_nullable`. [-Wdeprecated-declarations]
1317 | using NullableModelStorageCPtr = absl::Nullable<const ModelStorage*>;
| ^
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:90:7:
note: declared here
90 | using Nullable [[deprecated("Use `absl_nullable`.")]] =
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/model.h:140:70:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<std::unique_ptr<operations_research::math_opt::ModelStorage>
>’ is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
140 | explicit Model(absl::Nonnull<std::unique_ptr<ModelStorage>> storage);
| ^
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/model.h:163:65:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<std::unique_ptr<operations_research::math_opt::Model>
>’ is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
163 | std::optional<absl::string_view> new_name = std::nullopt) const;
| ^~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/math_opt/cpp/model.h:928:54:
warning: ‘using absl::lts_20250512::Nonnull =
absl::lts_20250512::nullability_internal::NonnullImpl<std::shared_ptr<operations_research::math_opt::ModelStorage>
>’ is deprecated: Use `absl_nonnull`. [-Wdeprecated-declarations]
928 | const absl::Nonnull<std::shared_ptr<ModelStorage>> storage_;
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/absl/base/internal/nullability_deprecated.h:80:7:
note: declared here
80 | using Nonnull [[deprecated("Use `absl_nonnull`.")]] =
| ^~~~~~~
In file included from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/graph.h:181,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/constraint_solver/routing.h:191,
from routing.cpp:4:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/iterators.h:128:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
128 | : public std::iterator<std::input_iterator_tag, IntegerType>
| ^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66,
from /usr/include/c++/14/string:47,
from routing.cpp:1:
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/iterators.h:247:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
247 | : public std::iterator<std::input_iterator_tag, IndexT>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/graph.h:319:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
319 | : public std::iterator<std::input_iterator_tag, PropertyT>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
In file included from bin_packing.cpp:5:
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp: In instantiation of
‘Rice::detail::Parameter<T>::Parameter(Rice::Arg*) [with T =
operations_research::KnapsackSolver::SolverType]’:
/usr/include/c++/14/bits/unique_ptr.h:1077:30: required from
‘std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp =
Rice::detail::Parameter<operations_research::KnapsackSolver::SolverType>; _Args
= {Rice::Arg*}; __detail::__unique_ptr_t<_Tp> =
__detail::__unique_ptr_t<Rice::detail::Parameter<operations_research::KnapsackSolver::SolverType>
>]’
1077 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9660:104: required
from ‘static void
Rice::detail::Native::create_parameters_impl(std::vector<std::unique_ptr<Rice::detail::ParameterAbstract>
>&, Rice::MethodInfo*, std::index_sequence<I ...>) [with Tuple_T =
std::tuple<operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
>; long unsigned int ...Indices = {0, 1}; std::index_sequence<I ...> =
std::integer_sequence<long unsigned int, 0, 1>]’
9660 |
(parameters.push_back(std::move(std::make_unique<Parameter<std::tuple_element_t<Indices,
Tuple_T>>>(methodInfo->arg(Indices)))), ...);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9668:44: required from
‘static std::vector<std::unique_ptr<Rice::detail::ParameterAbstract> >
Rice::detail::Native::create_parameters(Rice::MethodInfo*) [with Tuple_T =
std::tuple<operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
>]’
9668 | Native::create_parameters_impl<Tuple_T>(result, methodInfo,
indices);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10660:47: required
from ‘Rice::detail::NativeMethod<Class_T, Method_T>::NativeMethod(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::KnapsackSolver; Method_T = void (*)(long unsigned int,
operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char>); VALUE = long unsigned int; std::string =
std::__cxx11::basic_string<char>]’
10660 | : Native(Native::create_parameters<Arg_Ts>(methodInfo)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10653:36: required
from ‘static void Rice::detail::NativeMethod<Class_T, Method_T>::define(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::KnapsackSolver; Method_T = void (*)(long unsigned int,
operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char>); VALUE = long unsigned int; std::string =
std::__cxx11::basic_string<char>]’
10653 | NativeMethod_T* NativeMethod = new NativeMethod_T(klass,
method_name, std::forward<Method_T>(method), methodInfo);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:12816:52: required
from ‘void Rice::Module::wrap_native_method(VALUE, std::string, Method_T&&,
Rice::MethodInfo*) [with Class_T = operations_research::KnapsackSolver; Method_T
= void (*)(long unsigned int, operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char>); VALUE = long unsigned int; std::string =
std::__cxx11::basic_string<char>]’
12816 | detail::NativeMethod<Class_T, Method_T>::define(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:13890:44: required
from ‘void Rice::Data_Type<T>::wrap_native_method(VALUE, std::string,
Method_T&&, Rice::MethodInfo*) [with Method_T = void (*)(long unsigned int,
operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char>); T = operations_research::KnapsackSolver;
VALUE = long unsigned int; std::string = std::__cxx11::basic_string<char>]’
13890 | Module::wrap_native_method<T, Method_T>(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3037:27: required from
‘auto& Rice::Data_Type<T>::define_method(std::string, Method_T&&, const Arg_Ts&
...) [with Method_T = void (*)(long unsigned int,
operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char>); Arg_Ts = {}; T =
operations_research::KnapsackSolver; std::string =
std::__cxx11::basic_string<char>]’
3037 | this->wrap_native_method(this->value(), name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:13673:26: required
from ‘Rice::Data_Type<T>& Rice::Data_Type<T>::define_constructor(Constructor_T,
const Rice_Arg_Ts& ...) [with Constructor_T =
Rice::Constructor<operations_research::KnapsackSolver,
operations_research::KnapsackSolver::SolverType,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
>; Rice_Arg_Ts = {}; T = operations_research::KnapsackSolver]’
13673 | this->define_method("initialize", &Constructor_T::initialize,
args...);
|
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bin_packing.cpp:38:24: required from here
37 | Rice::define_class_under<KnapsackSolver>(m, "KnapsackSolver")
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38 | .define_constructor(Rice::Constructor<KnapsackSolver,
KnapsackSolver::SolverType, std::string>())
|
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3801:70: error: no
matching function for call to
‘Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>::From_Ruby(Rice::Arg*&)’
3801 | inline Parameter<T>::Parameter(Arg* arg) : ParameterAbstract(arg),
fromRuby_(arg)
|
^~~~~~~~~~~~~~
bin_packing.cpp:21:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>::From_Ruby()’
21 | class From_Ruby<KnapsackSolver::SolverType> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bin_packing.cpp:21:9: note: candidate expects 0 arguments, 1 provided
bin_packing.cpp:21:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>::From_Ruby(const
Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>&)’
bin_packing.cpp:21:9: note: no known conversion for argument 1 from
‘Rice::Arg*’ to ‘const
Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>&’
bin_packing.cpp:21:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>::From_Ruby(Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>&&)’
bin_packing.cpp:21:9: note: no known conversion for argument 1 from
‘Rice::Arg*’ to
‘Rice::detail::From_Ruby<operations_research::KnapsackSolver::SolverType>&&’
In file included from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/lp_data/sparse.h:40,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/glop/variables_info.h:18,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/linear_constraint_manager.h:27,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/pseudo_costs.h:27,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/integer_search.h:41,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/work_assignment.h:41,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/cp_model_solver_helpers.h:31,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/init/init.h:23,
from ext.cpp:2:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/iterators.h:128:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
128 | : public std::iterator<std::input_iterator_tag, IntegerType>
| ^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66,
from /usr/include/c++/14/string:47,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/base/version.h:17,
from ext.cpp:1:
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/iterators.h:247:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
247 | : public std::iterator<std::input_iterator_tag, IndexT>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
In file included from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/precedences.h:29,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/linear_propagation.h:35,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/integer_expr.h:31,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/linear_programming_constraint.h:41,
from
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/sat/pseudo_costs.h:28:
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c/tmp/or-tools/include/ortools/graph/graph.h:319:19:
warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator’ is deprecated
[-Wdeprecated-declarations]
319 | : public std::iterator<std::input_iterator_tag, PropertyT>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
In file included from linear.cpp:5:
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp: In instantiation of
‘Rice::detail::Parameter<T>::Parameter(Rice::Arg*) [with T =
operations_research::MPSolver::OptimizationProblemType]’:
/usr/include/c++/14/bits/unique_ptr.h:1077:30: required from
‘std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp =
Rice::detail::Parameter<operations_research::MPSolver::OptimizationProblemType>;
_Args = {Rice::Arg*}; __detail::__unique_ptr_t<_Tp> =
__detail::__unique_ptr_t<Rice::detail::Parameter<operations_research::MPSolver::OptimizationProblemType>
>]’
1077 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9660:104: required
from ‘static void
Rice::detail::Native::create_parameters_impl(std::vector<std::unique_ptr<Rice::detail::ParameterAbstract>
>&, Rice::MethodInfo*, std::index_sequence<I ...>) [with Tuple_T =
std::tuple<const std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >&,
operations_research::MPSolver::OptimizationProblemType>; long unsigned int
...Indices = {0, 1}; std::index_sequence<I ...> = std::integer_sequence<long
unsigned int, 0, 1>]’
9660 |
(parameters.push_back(std::move(std::make_unique<Parameter<std::tuple_element_t<Indices,
Tuple_T>>>(methodInfo->arg(Indices)))), ...);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9668:44: required from
‘static std::vector<std::unique_ptr<Rice::detail::ParameterAbstract> >
Rice::detail::Native::create_parameters(Rice::MethodInfo*) [with Tuple_T =
std::tuple<const std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >&,
operations_research::MPSolver::OptimizationProblemType>]’
9668 | Native::create_parameters_impl<Tuple_T>(result, methodInfo,
indices);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10145:47: required
from ‘Rice::detail::NativeFunction<Function_T>::NativeFunction(VALUE,
std::string, Function_T, Rice::MethodInfo*) [with Function_T =
init_linear(Rice::Module&)::<lambda(const std::string&,
operations_research::MPSolver::OptimizationProblemType)>; VALUE = long unsigned
int; std::string = std::__cxx11::basic_string<char>]’
10145 | : Native(Native::create_parameters<Arg_Ts>(methodInfo)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10138:40: required
from ‘static void Rice::detail::NativeFunction<Function_T>::define(VALUE,
std::string, Function_T, Rice::MethodInfo*) [with Function_T =
init_linear(Rice::Module&)::<lambda(const std::string&,
operations_research::MPSolver::OptimizationProblemType)>; VALUE = long unsigned
int; std::string = std::__cxx11::basic_string<char>]’
10138 | NativeFunction_T* nativeFunction = new NativeFunction_T(klass,
method_name, std::forward<Function_T>(function), methodInfo);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:12810:47: required
from ‘void Rice::Module::wrap_native_function(VALUE, std::string, Function_T&&,
Rice::MethodInfo*) [with Function_T = init_linear(Rice::Module&)::<lambda(const
std::string&, operations_research::MPSolver::OptimizationProblemType)>; VALUE =
long unsigned int; std::string = std::__cxx11::basic_string<char>]’
12810 | detail::NativeFunction<Function_T>::define(klass, name,
std::forward<Function_T>(function), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3098:29: required from
‘auto& Rice::Data_Type<T>::define_singleton_function(std::string, Function_T&&,
const Arg_Ts& ...) [with Function_T = init_linear(Rice::Module&)::<lambda(const
std::string&, operations_research::MPSolver::OptimizationProblemType)>; Arg_Ts =
{}; T = operations_research::MPSolver; std::string =
std::__cxx11::basic_string<char>]’
3098 | this->wrap_native_function(rb_singleton_class(*this), name,
std::forward<Function_T>(func), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linear.cpp:165:31: required from here
164 | Rice::define_class_under<MPSolver>(m, "Solver")
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 | .define_singleton_function(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^
166 | "_new",
| ~~~~~~~
167 | [](const std::string& name, MPSolver::OptimizationProblemType
problem_type) {
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 | std::unique_ptr<MPSolver> solver(new MPSolver(name,
problem_type));
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169 | if (!solver) {
| ~~~~~~~~~~~~~~
170 | throw std::runtime_error("Unrecognized solver type");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171 | }
| ~
172 | return solver;
| ~~~~~~~~~~~~~~
173 | })
| ~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3801:70: error: no
matching function for call to
‘Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>::From_Ruby(Rice::Arg*&)’
3801 | inline Parameter<T>::Parameter(Arg* arg) : ParameterAbstract(arg),
fromRuby_(arg)
|
^~~~~~~~~~~~~~
linear.cpp:28:10: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>::From_Ruby()’
28 | struct From_Ruby<MPSolver::OptimizationProblemType> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linear.cpp:28:10: note: candidate expects 0 arguments, 1 provided
linear.cpp:28:10: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>::From_Ruby(const
Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>&)’
linear.cpp:28:10: note: no known conversion for argument 1 from ‘Rice::Arg*’
to ‘const
Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>&’
linear.cpp:28:10: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>::From_Ruby(Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>&&)’
linear.cpp:28:10: note: no known conversion for argument 1 from ‘Rice::Arg*’
to
‘Rice::detail::From_Ruby<operations_research::MPSolver::OptimizationProblemType>&&’
In file included from constraint.cpp:6:
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp: In instantiation of
‘Rice::detail::Parameter<T>::Parameter(Rice::Arg*) [with T =
operations_research::sat::LinearExpr]’:
/usr/include/c++/14/bits/unique_ptr.h:1077:30: required from
‘std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp =
Rice::detail::Parameter<operations_research::sat::LinearExpr>; _Args =
{Rice::Arg*}; __detail::__unique_ptr_t<_Tp> =
__detail::__unique_ptr_t<Rice::detail::Parameter<operations_research::sat::LinearExpr>
>]’
1077 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9660:104: required
from ‘static void
Rice::detail::Native::create_parameters_impl(std::vector<std::unique_ptr<Rice::detail::ParameterAbstract>
>&, Rice::MethodInfo*, std::index_sequence<I ...>) [with Tuple_T =
std::tuple<operations_research::sat::LinearExpr,
operations_research::sat::LinearExpr>; long unsigned int ...Indices = {0, 1};
std::index_sequence<I ...> = std::integer_sequence<long unsigned int, 0, 1>]’
9660 |
(parameters.push_back(std::move(std::make_unique<Parameter<std::tuple_element_t<Indices,
Tuple_T>>>(methodInfo->arg(Indices)))), ...);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9668:44: required from
‘static std::vector<std::unique_ptr<Rice::detail::ParameterAbstract> >
Rice::detail::Native::create_parameters(Rice::MethodInfo*) [with Tuple_T =
std::tuple<operations_research::sat::LinearExpr,
operations_research::sat::LinearExpr>]’
9668 | Native::create_parameters_impl<Tuple_T>(result, methodInfo,
indices);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10660:47: required
from ‘Rice::detail::NativeMethod<Class_T, Method_T>::NativeMethod(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::sat::CpModelBuilder; Method_T =
init_constraint(Rice::Module&)::<lambda(operations_research::sat::CpModelBuilder&,
operations_research::sat::LinearExpr, operations_research::sat::LinearExpr)>;
VALUE = long unsigned int; std::string = std::__cxx11::basic_string<char>]’
10660 | : Native(Native::create_parameters<Arg_Ts>(methodInfo)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10653:36: required
from ‘static void Rice::detail::NativeMethod<Class_T, Method_T>::define(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::sat::CpModelBuilder; Method_T =
init_constraint(Rice::Module&)::<lambda(operations_research::sat::CpModelBuilder&,
operations_research::sat::LinearExpr, operations_research::sat::LinearExpr)>;
VALUE = long unsigned int; std::string = std::__cxx11::basic_string<char>]’
10653 | NativeMethod_T* NativeMethod = new NativeMethod_T(klass,
method_name, std::forward<Method_T>(method), methodInfo);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:12816:52: required
from ‘void Rice::Module::wrap_native_method(VALUE, std::string, Method_T&&,
Rice::MethodInfo*) [with Class_T = operations_research::sat::CpModelBuilder;
Method_T =
init_constraint(Rice::Module&)::<lambda(operations_research::sat::CpModelBuilder&,
operations_research::sat::LinearExpr, operations_research::sat::LinearExpr)>;
VALUE = long unsigned int; std::string = std::__cxx11::basic_string<char>]’
12816 | detail::NativeMethod<Class_T, Method_T>::define(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:13890:44: required
from ‘void Rice::Data_Type<T>::wrap_native_method(VALUE, std::string,
Method_T&&, Rice::MethodInfo*) [with Method_T =
init_constraint(Rice::Module&)::<lambda(operations_research::sat::CpModelBuilder&,
operations_research::sat::LinearExpr, operations_research::sat::LinearExpr)>; T
= operations_research::sat::CpModelBuilder; VALUE = long unsigned int;
std::string = std::__cxx11::basic_string<char>]’
13890 | Module::wrap_native_method<T, Method_T>(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3037:27: required from
‘auto& Rice::Data_Type<T>::define_method(std::string, Method_T&&, const Arg_Ts&
...) [with Method_T =
init_constraint(Rice::Module&)::<lambda(operations_research::sat::CpModelBuilder&,
operations_research::sat::LinearExpr, operations_research::sat::LinearExpr)>;
Arg_Ts = {}; T = operations_research::sat::CpModelBuilder; std::string =
std::__cxx11::basic_string<char>]’
3037 | this->wrap_native_method(this->value(), name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
constraint.cpp:217:19: required from here
159 | Rice::define_class_under<CpModelBuilder>(m, "CpModel")
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160 | .define_constructor(Rice::Constructor<CpModelBuilder>())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161 | .define_method(
| ~~~~~~~~~~~~~~~
162 | "new_int_var",
| ~~~~~~~~~~~~~~
163 | [](CpModelBuilder& self, int64_t start, int64_t end, const
std::string& name) {
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164 | const operations_research::Domain domain(start, end);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 | return self.NewIntVar(domain).WithName(name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166 | })
| ~~
167 | .define_method(
| ~~~~~~~~~~~~~~~
168 | "new_bool_var",
| ~~~~~~~~~~~~~~~
169 | [](CpModelBuilder& self, const std::string& name) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170 | return self.NewBoolVar().WithName(name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171 | })
| ~~
172 | .define_method(
| ~~~~~~~~~~~~~~~
173 | "new_constant",
| ~~~~~~~~~~~~~~~
174 | [](CpModelBuilder& self, int64_t value) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175 | return self.NewConstant(value);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176 | })
| ~~
177 | .define_method(
| ~~~~~~~~~~~~~~~
178 | "true_var",
| ~~~~~~~~~~~
179 | [](CpModelBuilder& self) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
180 | return self.TrueVar();
| ~~~~~~~~~~~~~~~~~~~~~~
181 | })
| ~~
182 | .define_method(
| ~~~~~~~~~~~~~~~
183 | "false_var",
| ~~~~~~~~~~~~
184 | [](CpModelBuilder& self) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
185 | return self.FalseVar();
| ~~~~~~~~~~~~~~~~~~~~~~~
186 | })
| ~~
187 | .define_method(
| ~~~~~~~~~~~~~~~
188 | "new_interval_var",
| ~~~~~~~~~~~~~~~~~~~
189 | [](CpModelBuilder& self, IntVar start, IntVar size, IntVar end,
const std::string& name) {
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 | return self.NewIntervalVar(start, size, end).WithName(name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191 | })
| ~~
192 | .define_method(
| ~~~~~~~~~~~~~~~
193 | "new_optional_interval_var",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194 | [](CpModelBuilder& self, IntVar start, IntVar size, IntVar end,
BoolVar presence, const std::string& name) {
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195 | return self.NewOptionalIntervalVar(start, size, end,
presence).WithName(name);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196 | })
| ~~
197 | .define_method(
| ~~~~~~~~~~~~~~~
198 | "add_bool_or",
| ~~~~~~~~~~~~~~
199 | [](CpModelBuilder& self, std::vector<BoolVar> literals) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200 | return self.AddBoolOr(literals);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201 | })
| ~~
202 | .define_method(
| ~~~~~~~~~~~~~~~
203 | "add_bool_and",
| ~~~~~~~~~~~~~~~
204 | [](CpModelBuilder& self, std::vector<BoolVar> literals) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205 | return self.AddBoolAnd(literals);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206 | })
| ~~
207 | .define_method(
| ~~~~~~~~~~~~~~~
208 | "add_bool_xor",
| ~~~~~~~~~~~~~~~
209 | [](CpModelBuilder& self, std::vector<BoolVar> literals) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210 | return self.AddBoolXor(literals);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211 | })
| ~~
212 | .define_method(
| ~~~~~~~~~~~~~~~
213 | "add_implication",
| ~~~~~~~~~~~~~~~~~~
214 | [](CpModelBuilder& self, BoolVar a, BoolVar b) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215 | return self.AddImplication(a, b);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216 | })
| ~~
217 | .define_method(
| ~~~~~~~~~~~~~~^
218 | "add_equality",
| ~~~~~~~~~~~~~~~
219 | [](CpModelBuilder& self, LinearExpr x, LinearExpr y) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220 | return self.AddEquality(x, y);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221 | })
| ~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3801:70: error: no
matching function for call to
‘Rice::detail::From_Ruby<operations_research::sat::LinearExpr>::From_Ruby(Rice::Arg*&)’
3801 | inline Parameter<T>::Parameter(Arg* arg) : ParameterAbstract(arg),
fromRuby_(arg)
|
^~~~~~~~~~~~~~
constraint.cpp:41:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::sat::LinearExpr>::From_Ruby()’
41 | class From_Ruby<LinearExpr> {
| ^~~~~~~~~~~~~~~~~~~~~
constraint.cpp:41:9: note: candidate expects 0 arguments, 1 provided
constraint.cpp:41:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::sat::LinearExpr>::From_Ruby(const
Rice::detail::From_Ruby<operations_research::sat::LinearExpr>&)’
constraint.cpp:41:9: note: no known conversion for argument 1 from
‘Rice::Arg*’ to ‘const
Rice::detail::From_Ruby<operations_research::sat::LinearExpr>&’
constraint.cpp:41:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::sat::LinearExpr>::From_Ruby(Rice::detail::From_Ruby<operations_research::sat::LinearExpr>&&)’
constraint.cpp:41:9: note: no known conversion for argument 1 from
‘Rice::Arg*’ to
‘Rice::detail::From_Ruby<operations_research::sat::LinearExpr>&&’
In file included from routing.cpp:6:
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp: In instantiation of
‘Rice::detail::NativeMethod<Class_T, Method_T>::NativeMethod(VALUE, std::string,
Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::RoutingIndexManager; Method_T =
gtl::IntType<operations_research::RoutingNodeIndex_tag_, int>
(operations_research::RoutingIndexManager::*)(long int) const; VALUE = long
unsigned int; std::string = std::__cxx11::basic_string<char>]’:
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10653:36: required
from ‘static void Rice::detail::NativeMethod<Class_T, Method_T>::define(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::RoutingIndexManager; Method_T =
gtl::IntType<operations_research::RoutingNodeIndex_tag_, int>
(operations_research::RoutingIndexManager::*)(long int) const; VALUE = long
unsigned int; std::string = std::__cxx11::basic_string<char>]’
10653 | NativeMethod_T* NativeMethod = new NativeMethod_T(klass,
method_name, std::forward<Method_T>(method), methodInfo);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:12816:52: required
from ‘void Rice::Module::wrap_native_method(VALUE, std::string, Method_T&&,
Rice::MethodInfo*) [with Class_T = operations_research::RoutingIndexManager;
Method_T = gtl::IntType<operations_research::RoutingNodeIndex_tag_, int>
(operations_research::RoutingIndexManager::*)(long int) const; VALUE = long
unsigned int; std::string = std::__cxx11::basic_string<char>]’
12816 | detail::NativeMethod<Class_T, Method_T>::define(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:13890:44: required
from ‘void Rice::Data_Type<T>::wrap_native_method(VALUE, std::string,
Method_T&&, Rice::MethodInfo*) [with Method_T =
gtl::IntType<operations_research::RoutingNodeIndex_tag_, int>
(operations_research::RoutingIndexManager::*)(long int) const; T =
operations_research::RoutingIndexManager; VALUE = long unsigned int; std::string
= std::__cxx11::basic_string<char>]’
13890 | Module::wrap_native_method<T, Method_T>(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3037:27: required from
‘auto& Rice::Data_Type<T>::define_method(std::string, Method_T&&, const Arg_Ts&
...) [with Method_T = gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> (operations_research::RoutingIndexManager::*)(long int) const; Arg_Ts = {};
T = operations_research::RoutingIndexManager; std::string =
std::__cxx11::basic_string<char>]’
3037 | this->wrap_native_method(this->value(), name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
routing.cpp:155:19: required from here
144 | Rice::define_class_under<RoutingIndexManager>(m,
"RoutingIndexManager")
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145 | .define_singleton_function(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | "_new_depot",
| ~~~~~~~~~~~~~
147 | [](int num_nodes, int num_vehicles, RoutingNodeIndex depot) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148 | return RoutingIndexManager(num_nodes, num_vehicles, depot);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149 | })
| ~~
150 | .define_singleton_function(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 | "_new_starts_ends",
| ~~~~~~~~~~~~~~~~~~~
152 | [](int num_nodes, int num_vehicles, std::vector<RoutingNodeIndex>
starts, std::vector<RoutingNodeIndex> ends) {
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153 | return RoutingIndexManager(num_nodes, num_vehicles, starts,
ends);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154 | })
| ~~
155 | .define_method("index_to_node", &RoutingIndexManager::IndexToNode)
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10662:7: error: no
matching function for call to
‘Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >::To_Ruby(Rice::Return*)’
10662 | toRuby_(methodInfo->returnInfo())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
routing.cpp:48:9: note: candidate: ‘constexpr
Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >::To_Ruby()’
48 | class To_Ruby<RoutingNodeIndex> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
routing.cpp:48:9: note: candidate expects 0 arguments, 1 provided
routing.cpp:48:9: note: candidate: ‘constexpr
Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >::To_Ruby(const
Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&)’
routing.cpp:48:9: note: no known conversion for argument 1 from
‘Rice::Return*’ to ‘const
Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&’
routing.cpp:48:9: note: candidate: ‘constexpr
Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int>
>::To_Ruby(Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&&)’
routing.cpp:48:9: note: no known conversion for argument 1 from
‘Rice::Return*’ to
‘Rice::detail::To_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&&’
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:243: bin_packing.o] Error 1
make: *** Waiting for unfinished jobs....
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp: In instantiation of
‘Rice::detail::Parameter<T>::Parameter(Rice::Arg*) [with T =
gtl::IntType<operations_research::RoutingNodeIndex_tag_, int>]’:
/usr/include/c++/14/bits/unique_ptr.h:1077:30: required from
‘std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp =
Rice::detail::Parameter<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >; _Args = {Rice::Arg*}; __detail::__unique_ptr_t<_Tp> =
__detail::__unique_ptr_t<Rice::detail::Parameter<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> > >]’
1077 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9660:104: required
from ‘static void
Rice::detail::Native::create_parameters_impl(std::vector<std::unique_ptr<Rice::detail::ParameterAbstract>
>&, Rice::MethodInfo*, std::index_sequence<I ...>) [with Tuple_T =
std::tuple<int, int, gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >; long unsigned int ...Indices = {0, 1, 2}; std::index_sequence<I ...> =
std::integer_sequence<long unsigned int, 0, 1, 2>]’
9660 |
(parameters.push_back(std::move(std::make_unique<Parameter<std::tuple_element_t<Indices,
Tuple_T>>>(methodInfo->arg(Indices)))), ...);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9668:44: required from
‘static std::vector<std::unique_ptr<Rice::detail::ParameterAbstract> >
Rice::detail::Native::create_parameters(Rice::MethodInfo*) [with Tuple_T =
std::tuple<int, int, gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >]’
9668 | Native::create_parameters_impl<Tuple_T>(result, methodInfo,
indices);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10145:47: required
from ‘Rice::detail::NativeFunction<Function_T>::NativeFunction(VALUE,
std::string, Function_T, Rice::MethodInfo*) [with Function_T =
init_routing(Rice::Module&)::<lambda(int, int,
operations_research::RoutingNodeIndex)>; VALUE = long unsigned int; std::string
= std::__cxx11::basic_string<char>]’
10145 | : Native(Native::create_parameters<Arg_Ts>(methodInfo)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10138:40: required
from ‘static void Rice::detail::NativeFunction<Function_T>::define(VALUE,
std::string, Function_T, Rice::MethodInfo*) [with Function_T =
init_routing(Rice::Module&)::<lambda(int, int,
operations_research::RoutingNodeIndex)>; VALUE = long unsigned int; std::string
= std::__cxx11::basic_string<char>]’
10138 | NativeFunction_T* nativeFunction = new NativeFunction_T(klass,
method_name, std::forward<Function_T>(function), methodInfo);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:12810:47: required
from ‘void Rice::Module::wrap_native_function(VALUE, std::string, Function_T&&,
Rice::MethodInfo*) [with Function_T = init_routing(Rice::Module&)::<lambda(int,
int, operations_research::RoutingNodeIndex)>; VALUE = long unsigned int;
std::string = std::__cxx11::basic_string<char>]’
12810 | detail::NativeFunction<Function_T>::define(klass, name,
std::forward<Function_T>(function), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3098:29: required from
‘auto& Rice::Data_Type<T>::define_singleton_function(std::string, Function_T&&,
const Arg_Ts& ...) [with Function_T = init_routing(Rice::Module&)::<lambda(int,
int, operations_research::RoutingNodeIndex)>; Arg_Ts = {}; T =
operations_research::RoutingIndexManager; std::string =
std::__cxx11::basic_string<char>]’
3098 | this->wrap_native_function(rb_singleton_class(*this), name,
std::forward<Function_T>(func), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
routing.cpp:145:31: required from here
144 | Rice::define_class_under<RoutingIndexManager>(m,
"RoutingIndexManager")
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145 | .define_singleton_function(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^
146 | "_new_depot",
| ~~~~~~~~~~~~~
147 | [](int num_nodes, int num_vehicles, RoutingNodeIndex depot) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148 | return RoutingIndexManager(num_nodes, num_vehicles, depot);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149 | })
| ~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3801:70: error: no
matching function for call to
‘Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >::From_Ruby(Rice::Arg*&)’
3801 | inline Parameter<T>::Parameter(Arg* arg) : ParameterAbstract(arg),
fromRuby_(arg)
|
^~~~~~~~~~~~~~
routing.cpp:37:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >::From_Ruby()’
37 | class From_Ruby<RoutingNodeIndex> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
routing.cpp:37:9: note: candidate expects 0 arguments, 1 provided
routing.cpp:37:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >::From_Ruby(const
Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&)’
routing.cpp:37:9: note: no known conversion for argument 1 from ‘Rice::Arg*’
to ‘const
Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&’
routing.cpp:37:9: note: candidate: ‘constexpr
Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int>
>::From_Ruby(Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&&)’
routing.cpp:37:9: note: no known conversion for argument 1 from ‘Rice::Arg*’
to
‘Rice::detail::From_Ruby<gtl::IntType<operations_research::RoutingNodeIndex_tag_,
int> >&&’
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:243: linear.o] Error 1
In file included from math_opt.cpp:7:
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp: In instantiation of
‘Rice::detail::Parameter<T>::Parameter(Rice::Arg*) [with T =
operations_research::math_opt::SolverType]’:
/usr/include/c++/14/bits/unique_ptr.h:1077:30: required from
‘std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp =
Rice::detail::Parameter<operations_research::math_opt::SolverType>; _Args =
{Rice::Arg*}; __detail::__unique_ptr_t<_Tp> =
__detail::__unique_ptr_t<Rice::detail::Parameter<operations_research::math_opt::SolverType>
>]’
1077 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9660:104: required
from ‘static void
Rice::detail::Native::create_parameters_impl(std::vector<std::unique_ptr<Rice::detail::ParameterAbstract>
>&, Rice::MethodInfo*, std::index_sequence<__indices ...>) [with Tuple_T =
std::tuple<operations_research::math_opt::SolverType>; long unsigned int
...Indices = {0}; std::index_sequence<__indices ...> =
std::integer_sequence<long unsigned int, 0>]’
9660 |
(parameters.push_back(std::move(std::make_unique<Parameter<std::tuple_element_t<Indices,
Tuple_T>>>(methodInfo->arg(Indices)))), ...);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:9668:44: required from
‘static std::vector<std::unique_ptr<Rice::detail::ParameterAbstract> >
Rice::detail::Native::create_parameters(Rice::MethodInfo*) [with Tuple_T =
std::tuple<operations_research::math_opt::SolverType>]’
9668 | Native::create_parameters_impl<Tuple_T>(result, methodInfo,
indices);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10660:47: required
from ‘Rice::detail::NativeMethod<Class_T, Method_T>::NativeMethod(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::math_opt::Model; Method_T =
init_math_opt(Rice::Module&)::<lambda(operations_research::math_opt::Model&,
operations_research::math_opt::SolverType)>; VALUE = long unsigned int;
std::string = std::__cxx11::basic_string<char>]’
10660 | : Native(Native::create_parameters<Arg_Ts>(methodInfo)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:10653:36: required
from ‘static void Rice::detail::NativeMethod<Class_T, Method_T>::define(VALUE,
std::string, Method_T, Rice::MethodInfo*) [with Class_T =
operations_research::math_opt::Model; Method_T =
init_math_opt(Rice::Module&)::<lambda(operations_research::math_opt::Model&,
operations_research::math_opt::SolverType)>; VALUE = long unsigned int;
std::string = std::__cxx11::basic_string<char>]’
10653 | NativeMethod_T* NativeMethod = new NativeMethod_T(klass,
method_name, std::forward<Method_T>(method), methodInfo);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:12816:52: required
from ‘void Rice::Module::wrap_native_method(VALUE, std::string, Method_T&&,
Rice::MethodInfo*) [with Class_T = operations_research::math_opt::Model;
Method_T =
init_math_opt(Rice::Module&)::<lambda(operations_research::math_opt::Model&,
operations_research::math_opt::SolverType)>; VALUE = long unsigned int;
std::string = std::__cxx11::basic_string<char>]’
12816 | detail::NativeMethod<Class_T, Method_T>::define(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:13890:44: required
from ‘void Rice::Data_Type<T>::wrap_native_method(VALUE, std::string,
Method_T&&, Rice::MethodInfo*) [with Method_T =
init_math_opt(Rice::Module&)::<lambda(operations_research::math_opt::Model&,
operations_research::math_opt::SolverType)>; T =
operations_research::math_opt::Model; VALUE = long unsigned int; std::string =
std::__cxx11::basic_string<char>]’
13890 | Module::wrap_native_method<T, Method_T>(klass, name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3037:27: required from
‘auto& Rice::Data_Type<T>::define_method(std::string, Method_T&&, const Arg_Ts&
...) [with Method_T =
init_math_opt(Rice::Module&)::<lambda(operations_research::math_opt::Model&,
operations_research::math_opt::SolverType)>; Arg_Ts = {}; T =
operations_research::math_opt::Model; std::string =
std::__cxx11::basic_string<char>]’
3037 | this->wrap_native_method(this->value(), name,
std::forward<Method_T>(method), methodInfo);
|
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
math_opt.cpp:165:19: required from here
123 | Rice::define_class_under<Model>(mathopt, "Model")
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 | .define_constructor(Rice::Constructor<Model, std::string>())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125 | .define_method("add_variable", &Model::AddContinuousVariable)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126 | .define_method("add_integer_variable", &Model::AddIntegerVariable)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127 | .define_method("add_binary_variable", &Model::AddBinaryVariable)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128 | .define_method(
| ~~~~~~~~~~~~~~~
129 | "_add_linear_constraint",
| ~~~~~~~~~~~~~~~~~~~~~~~~~
130 | [](Model& self) {
| ~~~~~~~~~~~~~~~~~
131 | return self.AddLinearConstraint();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 | })
| ~~
133 | .define_method(
| ~~~~~~~~~~~~~~~
134 | "_set_upper_bound",
| ~~~~~~~~~~~~~~~~~~~
135 | [](Model& self, LinearConstraint constraint, double upper_bound) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136 | self.set_upper_bound(constraint, upper_bound);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137 | })
| ~~
138 | .define_method(
| ~~~~~~~~~~~~~~~
139 | "_set_lower_bound",
| ~~~~~~~~~~~~~~~~~~~
140 | [](Model& self, LinearConstraint constraint, double upper_bound) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141 | self.set_lower_bound(constraint, upper_bound);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142 | })
| ~~
143 | .define_method("_set_coefficient", &Model::set_coefficient)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144 | .define_method(
| ~~~~~~~~~~~~~~~
145 | "_set_objective_coefficient",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | [](Model& self, Variable variable, double value) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147 | self.set_objective_coefficient(variable, value);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148 | })
| ~~
149 | .define_method("_clear_objective", &Model::clear_objective)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 | .define_method(
| ~~~~~~~~~~~~~~~
151 | "_set_objective_offset",
| ~~~~~~~~~~~~~~~~~~~~~~~~
152 | [](Model& self, double value) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153 | self.set_objective_offset(value);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154 | })
| ~~
155 | .define_method(
| ~~~~~~~~~~~~~~~
156 | "_set_maximize",
| ~~~~~~~~~~~~~~~~
157 | [](Model& self) {
| ~~~~~~~~~~~~~~~~~
158 | self.set_maximize();
| ~~~~~~~~~~~~~~~~~~~~
159 | })
| ~~
160 | .define_method(
| ~~~~~~~~~~~~~~~
161 | "_set_minimize",
| ~~~~~~~~~~~~~~~~
162 | [](Model& self) {
| ~~~~~~~~~~~~~~~~~
163 | self.set_minimize();
| ~~~~~~~~~~~~~~~~~~~~
164 | })
| ~~
165 | .define_method(
| ~~~~~~~~~~~~~~^
166 | "_solve",
| ~~~~~~~~~
167 | [](Model& self, SolverType solver_type) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 | SolveArguments args;
| ~~~~~~~~~~~~~~~~~~~~
169 | auto result = Solve(self, solver_type, args);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170 |
|
171 | if (!result.ok()) {
| ~~~~~~~~~~~~~~~~~~~
172 | throw
std::invalid_argument(std::string{result.status().message()});
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173 | }
| ~
174 |
|
175 | return *result;
| ~~~~~~~~~~~~~~~
176 | });
| ~~
/usr/local/bundle/gems/rice-4.7.1/include/rice/rice.hpp:3801:70: error: no
matching function for call to
‘Rice::detail::From_Ruby<operations_research::math_opt::SolverType>::From_Ruby(Rice::Arg*&)’
3801 | inline Parameter<T>::Parameter(Arg* arg) : ParameterAbstract(arg),
fromRuby_(arg)
|
^~~~~~~~~~~~~~
math_opt.cpp:27:10: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::math_opt::SolverType>::From_Ruby()’
27 | struct From_Ruby<SolverType> {
| ^~~~~~~~~~~~~~~~~~~~~
math_opt.cpp:27:10: note: candidate expects 0 arguments, 1 provided
math_opt.cpp:27:10: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::math_opt::SolverType>::From_Ruby(const
Rice::detail::From_Ruby<operations_research::math_opt::SolverType>&)’
math_opt.cpp:27:10: note: no known conversion for argument 1 from ‘Rice::Arg*’
to ‘const Rice::detail::From_Ruby<operations_research::math_opt::SolverType>&’
math_opt.cpp:27:10: note: candidate: ‘constexpr
Rice::detail::From_Ruby<operations_research::math_opt::SolverType>::From_Ruby(Rice::detail::From_Ruby<operations_research::math_opt::SolverType>&&)’
math_opt.cpp:27:10: note: no known conversion for argument 1 from ‘Rice::Arg*’
to ‘Rice::detail::From_Ruby<operations_research::math_opt::SolverType>&&’
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:243: math_opt.o] Error 1
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:242: constraint.o] Error 1
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:242: routing.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/bundle/bundler/gems/or-tools-ruby-d933cfd5ea9c for inspection.
Results logged to
/usr/local/bundle/bundler/gems/extensions/x86_64-linux/3.4.0/or-tools-ruby-d933cfd5ea9c/gem_make.out
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:125:in
'Gem::Ext::Builder.run'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:51:in 'block in
Gem::Ext::Builder.make'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:43:in 'Array#each'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:43:in
'Gem::Ext::Builder.make'
/usr/local/lib/ruby/3.4.0/rubygems/ext/ext_conf_builder.rb:44:in
'Gem::Ext::ExtConfBuilder.build'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:206:in
'Gem::Ext::Builder#build_extension'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:240:in 'block in
Gem::Ext::Builder#build_extensions'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:237:in 'Array#each'
/usr/local/lib/ruby/3.4.0/rubygems/ext/builder.rb:237:in
'Gem::Ext::Builder#build_extensions'
/usr/local/lib/ruby/3.4.0/rubygems/installer.rb:844:in
'Gem::Installer#build_extensions'
/usr/local/lib/ruby/3.4.0/bundler/rubygems_gem_installer.rb:111:in
'Bundler::RubyGemsGemInstaller#build_extensions'
/usr/local/lib/ruby/3.4.0/bundler/source/path/installer.rb:28:in
'Bundler::Source::Path::Installer#post_install'
/usr/local/lib/ruby/3.4.0/bundler/source/path.rb:234:in
'Bundler::Source::Path#generate_bin'
/usr/local/lib/ruby/3.4.0/bundler/source/git.rb:212:in
'Bundler::Source::Git#install'
/usr/local/lib/ruby/3.4.0/bundler/installer/gem_installer.rb:55:in
'Bundler::GemInstaller#install'
/usr/local/lib/ruby/3.4.0/bundler/installer/gem_installer.rb:17:in
'Bundler::GemInstaller#install_from_spec'
/usr/local/lib/ruby/3.4.0/bundler/installer/parallel_installer.rb:133:in
'Bundler::ParallelInstaller#do_install'
/usr/local/lib/ruby/3.4.0/bundler/installer/parallel_installer.rb:124:in
'block in Bundler::ParallelInstaller#worker_pool'
/usr/local/lib/ruby/3.4.0/bundler/worker.rb:62:in 'Bundler::Worker#apply_func'
/usr/local/lib/ruby/3.4.0/bundler/worker.rb:57:in 'block in
Bundler::Worker#process_queue'
<internal:kernel>:168:in 'Kernel#loop'
/usr/local/lib/ruby/3.4.0/bundler/worker.rb:54:in
'Bundler::Worker#process_queue'
/usr/local/lib/ruby/3.4.0/bundler/worker.rb:90:in 'block (2 levels) in
Bundler::Worker#create_threads'
An error occurred while installing or-tools (0.16.0), and Bundler cannot
continue.
In Gemfile:
or-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment