Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const operations_research::sat::CpSolverResponse') #3976

Closed
yurivict opened this issue Nov 7, 2023 · 5 comments
Assignees
Labels
Bug Lang: C++ Native implementation issue OS: FreeBSD FreeBSD OS
Milestone

Comments

@yurivict
Copy link

yurivict commented Nov 7, 2023

What version of OR-Tools and what language are you using?
Version: 9.7

What operating system (Linux, Windows, ...) and version?
FreeBSD 13.2
clang-16

In file included from /usr/ports/math/or-tools/work/or-tools-9.7/ortools/constraint_solver/routing_constraints.cc:14:
In file included from /usr/ports/math/or-tools/work/or-tools-9.7/ortools/constraint_solver/routing_constraints.h:20:
In file included from /usr/ports/math/or-tools/work/or-tools-9.7/ortools/constraint_solver/constraint_solver.h:93:
In file included from /usr/ports/math/or-tools/work/or-tools-9.7/ortools/base/logging.h:23:
In file included from /usr/local/include/absl/log/check.h:37:
In file included from /usr/local/include/absl/log/internal/check_impl.h:19:
In file included from /usr/local/include/absl/log/internal/check_op.h:37:
In file included from /usr/local/include/absl/log/internal/strip.h:24:
/usr/local/include/absl/log/internal/log_message.h:289:17: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const operations_research::sat::CpSolverResponse')
  view.stream() << log_internal::NullGuard<T>().Guard(v);
  ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/math/or-tools/work/or-tools-9.7/ortools/constraint_solver/routing_lp_scheduling.h:592:13: note: in instantiation of function template specialization 'absl::log_internal::LogMessage::operator<<<operations_research::sat::CpSolverResponse, 0>' requested here
    VLOG(2) << response_;
            ^                       
/usr/include/c++/v1/cstddef:125:3: note: candidate function template not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'byte' for 1st argument
  operator<< (byte  __lhs, _Integer __shift) noexcept
  ^
/usr/include/c++/v1/__random/bernoulli_distribution.h:114:1: note: candidate function template not viable: no known conversion from 'const operations_research::sat::CpSolverResponse' to 'const bernoulli_distribution' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x)
^
/usr/include/c++/v1/ostream:792:1: note: candidate function template not viable: no known conversion from 'const operations_research::sat::CpSolverResponse' to 'char' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/usr/include/c++/v1/ostream:825:1: note: candidate function template not viable: no known conversion from 'const operations_research::sat::CpSolverResponse' to 'char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/usr/include/c++/v1/ostream:832:1: note: candidate function template not viable: no known conversion from 'const operations_research::sat::CpSolverResponse' to 'signed char' for 2nd argument
@lperron
Copy link
Collaborator

lperron commented Nov 7, 2023

Strange. Still compiling in c++ 17 mode?

@yurivict
Copy link
Author

yurivict commented Nov 7, 2023

Yes, in c++17 mode.

@lperron
Copy link
Collaborator

lperron commented Nov 7, 2023

can you check protobuf is the latest version (24.4. I believe)

@lperron
Copy link
Collaborator

lperron commented Nov 7, 2023

same for abseil. Everything need to be in lockstep

@Mizux Mizux self-assigned this Nov 8, 2023
@Mizux Mizux added this to the v9.9 milestone Nov 8, 2023
@Mizux Mizux added Bug Lang: C++ Native implementation issue OS: FreeBSD FreeBSD OS labels Nov 8, 2023
@Mizux
Copy link
Collaborator

Mizux commented Nov 8, 2023

For v9.7 we use:

Protobuf=v23.3
abseil-cpp=20230125.3

Re2=2023-07-01

While on main/v9.8 we use:

Protobuf=v24.4
abseil-cpp=20230802.0

Re2=2023-09-01

Could be related to issues in conda-forge/or-tools-feedstock#47
note: beware this PR was facing several issue due to re2, protobuf, abseil-cpp version mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Lang: C++ Native implementation issue OS: FreeBSD FreeBSD OS
Projects
None yet
Development

No branches or pull requests

3 participants