ankane / or-tools-ruby

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

Fails to compile on Ubuntu 20.04 #36

Closed tdegrunt closed 1 year ago

tdegrunt commented 1 year ago

ruby-or-tools v. 0.8.1 Ubuntu 20.04

Based on https://github.com/ankane/or-tools-ruby/blob/master/ext/or-tools/vendor.rb#L31 I took it that a binary distribution for Ubuntu 20.04 was available and that this would be downloaded.

The output from install is (for me) not very clear - not sure what the problem is:

# gem install or-tools
Building native extensions. This could take a while...
ERROR:  Error installing or-tools:
    ERROR: Failed to build gem native extension.

    current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1/ext/or-tools
/root/.rbenv/versions/3.1.2/bin/ruby -I /root/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20220829-20055-lxg97w.rb extconf.rb
checking for rice/rice.hpp in /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include... yes
checking for -lstdc++... yes
checking for -lortools... yes
creating Makefile

current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1/ext/or-tools
make DESTDIR\= clean

current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1/ext/or-tools
make DESTDIR\=
compiling assignment.cpp
compiling bin_packing.cpp
In file included from ext.h:3,
                 from bin_packing.cpp:3:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<long int, std::allocator<long int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<long int, std::allocator<long int> >]::<lambda(std::vector<long int, std::allocator<long int> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
compiling constraint.cpp
In file included from ext.h:3,
                 from constraint.cpp:4:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::IntVar>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::IntVar>]::<lambda(std::vector<operations_research::sat::IntVar>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::LinearExpr>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::LinearExpr>]::<lambda(std::vector<operations_research::sat::LinearExpr>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::IntervalVar>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::IntervalVar>]::<lambda(std::vector<operations_research::sat::IntervalVar>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::BoolVar>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::BoolVar>]::<lambda(std::vector<operations_research::sat::BoolVar>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
compiling ext.cpp
compiling linear.cpp
compiling network_flows.cpp
compiling routing.cpp
In file included from ext.h:3,
                 from routing.cpp:4:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<gtl::IntType<operations_research::RoutingNodeIndex_tag_, int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<gtl::IntType<operations_research::RoutingNodeIndex_tag_, int> >]::<lambda(std::vector<gtl::IntType<operations_research::RoutingNodeIndex_tag_, int> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<long int>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<std::vector<long int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<int>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<std::__cxx11::basic_string<char> >]::<lambda(std::vector<std::__cxx11::basic_string<char> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<std::__cxx11::basic_string<char> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<gtl::IntType<operations_research::RoutingDisjunctionIndex_tag_, int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<gtl::IntType<operations_research::RoutingDisjunctionIndex_tag_, int> >]::<lambda(std::vector<gtl::IntType<operations_research::RoutingDisjunctionIndex_tag_, int> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [Makefile:238: routing.o] Error 1

make failed, exit code 2

Gem files will remain installed in /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1 for inspection.
Results logged to /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/or-tools-0.8.1/gem_make.out
s01om01# cat /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/or-tools-0.8.1/gem_make.out
current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1/ext/or-tools
/root/.rbenv/versions/3.1.2/bin/ruby -I /root/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20220829-20055-lxg97w.rb extconf.rb
checking for rice/rice.hpp in /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include... yes
checking for -lstdc++... yes
checking for -lortools... yes
creating Makefile

current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1/ext/or-tools
make DESTDIR\= clean

current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/or-tools-0.8.1/ext/or-tools
make DESTDIR\=
compiling assignment.cpp
compiling bin_packing.cpp
In file included from ext.h:3,
                 from bin_packing.cpp:3:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<long int, std::allocator<long int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<long int, std::allocator<long int> >]::<lambda(std::vector<long int, std::allocator<long int> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
compiling constraint.cpp
In file included from ext.h:3,
                 from constraint.cpp:4:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::IntVar>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::IntVar>]::<lambda(std::vector<operations_research::sat::IntVar>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::LinearExpr>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::LinearExpr>]::<lambda(std::vector<operations_research::sat::LinearExpr>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::IntervalVar>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::IntervalVar>]::<lambda(std::vector<operations_research::sat::IntervalVar>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<operations_research::sat::BoolVar>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<operations_research::sat::BoolVar>]::<lambda(std::vector<operations_research::sat::BoolVar>&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
compiling ext.cpp
compiling linear.cpp
compiling network_flows.cpp
compiling routing.cpp
In file included from ext.h:3,
                 from routing.cpp:4:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<gtl::IntType<operations_research::RoutingNodeIndex_tag_, int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<gtl::IntType<operations_research::RoutingNodeIndex_tag_, int> >]::<lambda(std::vector<gtl::IntType<operations_research::RoutingNodeIndex_tag_, int> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<long int>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<std::vector<long int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<int>::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<std::__cxx11::basic_string<char> >]::<lambda(std::vector<std::__cxx11::basic_string<char> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<std::__cxx11::basic_string<char> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = void (std::vector<gtl::IntType<operations_research::RoutingDisjunctionIndex_tag_, int> >::*)(long unsigned int); bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp: In function ‘Rice::detail::NativeFunction<Function_T, IsMethod>::Self_T Rice::detail::NativeFunction<Function_T, IsMethod>::getSelf(VALUE) [with Function_T = Rice::stl::VectorHelper<T>::define_copyable_methods() [with T = std::vector<gtl::IntType<operations_research::RoutingDisjunctionIndex_tag_, int> >]::<lambda(std::vector<gtl::IntType<operations_research::RoutingDisjunctionIndex_tag_, int> >&)>; bool IsMethod = true]’:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:46: warning: function may return address of local variable [-Wreturn-local-addr]
 3565 |       return From_Ruby<Self_T>().convert(self);
      |                                              ^
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice/rice.hpp:3565:14: note: declared here
 3565 |       return From_Ruby<Self_T>().convert(self);
      |              ^~~~~~~~~~~~~~~~~~~
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [Makefile:238: routing.o] Error 1
ankane commented 1 year ago

Hey @tdegrunt, based on g++: fatal error: Killed signal terminated program cc1plus, it's likely the machine ran out of memory.

tdegrunt commented 1 year ago

Ugh, sometimes it's the simplest things. Thanks you very much! Sorry for the trouble.

🦆

ankane commented 1 year ago

No worries