ankane / or-tools-ruby

Operations research tools for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot deploy to Ubuntu 18 with latest OR-Tools and 0.6.3 gem

braindeaf opened this issue · comments

Our latest deploy appears to have blown up.

gcc 8
OR-Tools 0.9.3
or-tools-ruby 0.6.3

Can you give us any hints? Many thanks :)

make "DESTDIR="
compiling assignment.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid
for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid
for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but
not for C++
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1plus: warning: unrecognized command line option
‘-Wno-constant-logical-operand’
compiling bin_packing.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid
for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid
for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but
not for C++
In file included from ext.h:3,
                 from bin_packing.cpp:3:
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/rice-4.0.3/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]’:
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/rice-4.0.3/include/rice/rice.hpp:3564:46:
warning: function may return address of local variable [-Wreturn-local-addr]
       return From_Ruby<Self_T>().convert(self);
                                              ^
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/rice-4.0.3/include/rice/rice.hpp:3564:14:
note: declared here
       return From_Ruby<Self_T>().convert(self);
              ^~~~~~~~~~~~~~~~~~~
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/rice-4.0.3/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]’:
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/rice-4.0.3/include/rice/rice.hpp:3564:46:
warning: function may return address of local variable [-Wreturn-local-addr]
       return From_Ruby<Self_T>().convert(self);
                                              ^
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/rice-4.0.3/include/rice/rice.hpp:3564:14:
note: declared here
       return From_Ruby<Self_T>().convert(self);
              ^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1plus: warning: unrecognized command line option
‘-Wno-constant-logical-operand’
compiling constraint.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid
for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid
for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but
not for C++
constraint.cpp: In member function ‘operations_research::sat::LinearExpr
Rice::detail::From_Ruby<operations_research::sat::LinearExpr>::convert(VALUE)’:
constraint.cpp:60:18: error: ‘class operations_research::sat::LinearExpr’ has no
member named ‘AddTerm’; did you mean ‘Term’?
             expr.AddTerm(From_Ruby<BoolVar>().convert(var.value()), coeff);
                  ^~~~~~~
                  Term
constraint.cpp:62:18: error: ‘class operations_research::sat::LinearExpr’ has no
member named ‘AddConstant’; did you mean ‘IsConstant’?
expr.AddConstant(From_Ruby<int64_t>().convert(var.value()) *
coeff);
                  ^~~~~~~~~~~
                  IsConstant
constraint.cpp:64:18: error: ‘class operations_research::sat::LinearExpr’ has no
member named ‘AddTerm’; did you mean ‘Term’?
             expr.AddTerm(From_Ruby<IntVar>().convert(var.value()), coeff);
                  ^~~~~~~
                  Term
constraint.cpp: In lambda function:
constraint.cpp:262:21: error: ‘class operations_research::sat::CpModelBuilder’
has no member named ‘AddLinMinEquality’; did you mean ‘AddMinEquality’?
         return self.AddLinMinEquality(target, exprs);
                     ^~~~~~~~~~~~~~~~~
                     AddMinEquality
constraint.cpp: In lambda function:
constraint.cpp:272:21: error: ‘class operations_research::sat::CpModelBuilder’
has no member named ‘AddLinMaxEquality’; did you mean ‘AddMaxEquality’?
         return self.AddLinMaxEquality(target, exprs);
                     ^~~~~~~~~~~~~~~~~
                     AddMaxEquality
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1plus: warning: unrecognized command line option
‘-Wno-constant-logical-operand’
Makefile:236: recipe for target 'constraint.o' failed
make: *** [constraint.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/deploy/rostering/shared/bundle/ruby/2.6.0/gems/or-tools-0.6.3 for
inspection.
Results logged to
/home/deploy/rostering/shared/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/or-tools-0.6.3/gem_make.out

/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:51:in
`block in make'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`each'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`make'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:62:in
`block in build'
  /home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/source/rubygems.rb:204:in
`install'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/installer/gem_installer.rb:54:in
`install'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/worker.rb:62:in
`apply_func'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/worker.rb:57:in
`block in process_queue'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/worker.rb:54:in
`loop'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/worker.rb:54:in
`process_queue'
/home/deploy/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.3.8/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing or-tools (0.6.3), and Bundler cannot

Hey @braindeaf, are you building with an external OR-Tools (--with-or-tools-dir)? The errors look like it's being built with OR-Tools 9.3 (which requires 0.7.0 of the gem) instead of 9.2.

Hey @braindeaf, are you building with an external OR-Tools (--with-or-tools-dir)? The errors look like it's being built with OR-Tools 9.3 (which requires 0.7.0 of the gem) instead of 9.2.

We are using the Ubuntu source with ---with-or-tools-dir. So by that reckoning I could try using 9.2 and give it another whirl in the morning.

Thank you @ankane that was the issue indeed. We're now resolved on our end.