Compile error on RHEL6 for ortools v9.0

79 views
Skip to first unread message

vina...@gmail.com

unread,
Oct 11, 2022, 2:46:41 AM10/11/22
to or-tools-discuss
I'm building ortools v9.0 release in cloud desktop which has RHEL6, I'm using GCC-12, make 4.3, cmake 3.24, swig 3.0. I'm able to compile third_party, but build is failing at python. Following is the error and I'm not sure what problem is - is there any missing dependencies ? - (I have not find any luck on google also by searching the error msg)
-------------------------
In file included from /local/home/user/Temp/new_workspace/build/Or-tools/Or-tools-9.0/build/private/src/dependencies/install/include/absl/base/macros.h:34,
                 from /local/home/user/Temp/new_workspace/build/Or-tools/Or-tools-9.0/build/private/src/dependencies/install/include/absl/algorithm/container.h:54,
                 from /local/home/user/Temp/new_workspace/build/Or-tools/Or-tools-9.0/build/private/src/dependencies/install/include/absl/container/flat_hash_map.h:38,
                 from ./ortools/graph/topologicalsorter.h:67,
                 from ./ortools/graph/topologicalsorter.cc:14:
/local/home/user/Temp/new_workspace/build/Or-tools/Or-tools-9.0/build/private/src/dependencies/install/include/absl/base/attributes.h:425:30: error: standard attributes in middle of decl-specifiers
  425 | #define ABSL_MUST_USE_RESULT [[nodiscard]]


Thanks,
Vinay

Laurent Perron

unread,
Oct 11, 2022, 2:47:51 AM10/11/22
to or-tools-discuss
please use 9.4 and not 9.0
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/30ed7201-dea8-4c7a-a60e-9eabcda4c314n%40googlegroups.com.

vina...@gmail.com

unread,
Oct 11, 2022, 12:32:06 PM10/11/22
to or-tools-discuss
Hi Laurent,

9.4 version is also failing with following error msg
-------------------
"
/home/user/Temp/workspace_9.4/src/Or-tools/build/private/src/ortools/pdlp/primal_dual_hybrid_gradient.cc: In function ‘operations_research::pdlp::SolverResult operations_research::pdlp::{anonymous}::{anonymous}::ErrorSolverResult(operations_research::pdlp::TerminationReason, const string&)’:
/home/user/Temp/workspace_9.4/src/Or-tools/build/private/src/ortools/pdlp/primal_dual_hybrid_gradient.cc:1561:45: sorry, unimplemented: non-trivial designated initializers not supported
   return SolverResult{.solve_log = error_log};
"

is there a way to stop compilation of pdlb solver ? 


Thanks
Vinay

Mizux Seiha

unread,
Oct 12, 2022, 2:38:12 AM10/12/22
to or-tools-discuss
1) in CMake you may try to use -DUSE_PDLP=OFF but it has not been fully tested nor we have a CI to exercise it so you may need to do some fix here and there (PR welcome) but it could be a good starting point.

2) /local/home/user/Temp/new_workspace/build/Or-tools/Or-tools-9.0/build/private/src/dependencies/install/include/absl/base/attributes.h:425:30: error: standard attributes in middle of decl-specifiers
  425 | #define ABSL_MUST_USE_RESULT [[nodiscard]] : I'm pretty sure it has been fixed on v9.4
EDIT: you can try to cherry pick/apply https://github.com/google/or-tools/commit/672303cc2f2396c4bd5fbed8430208308815bd54

3) "sorry, unimplemented: non-trivial designated initializers not supported." This one is strange I need to investigate it, (IIRC I got it once when using an old gcc compiler in a cross toolchain).
note: Currently we are targeting C++17 BUT in reality our code use some designated initializers so you may try to bump requirement to C++20 (since it is an old C 99 feature it seems to have been silently integrated in clang/gcc when targeting C++17)
Try to change here https://github.com/google/or-tools/blob/c0e5ca1cd107de803e358528e8023e2626fa15a8/CMakeLists.txt#L28-L32 and there https://github.com/google/or-tools/blob/c0e5ca1cd107de803e358528e8023e2626fa15a8/cmake/cpp.cmake#L119-L126
ref: https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers
ref: https://en.cppreference.com/w/c/language/struct_initialization
Reply all
Reply to author
Forward
0 new messages