gerardcanal / rddl_parser

RDDL Parser extracted from PROST's webpage
https://bitbucket.org/tkeller/prost/overview
0 stars 1 forks source link

GCC 9 Compability #1

Closed MeFisto94 closed 3 years ago

MeFisto94 commented 3 years ago

When trying to build ROSPlan for noetic, the compilation fails, because GCC9 deprecated implicit copies, see:

/build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.cc: In member function ‘void TaskAnalyzer::analyzeTask(int, int)’:
/build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.cc:29:43: error: implicitly-declared ‘State& State::operator=(const State&)’ is deprecated [-Werror=deprecated-copy]
   29 |             currentState = State(nextState);
      |                                           ^
In file included from /build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.h:4,
                 from /build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.cc:1:
/build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/states.h:22:5: note: because ‘State’ has user-provided ‘State::State(const State&)’
   22 |     State(State const& other) : state(other.state) {}
      |     ^~~~~
/build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.cc:31:44: error: implicitly-declared ‘State& State::operator=(const State&)’ is deprecated [-Werror=deprecated-copy]
   31 |             currentState = State(task->CPFs);
      |                                            ^
In file included from /build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.h:4,
                 from /build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/task_analyzer.cc:1:
/build/turtlebot/src/ROSPlan/rosplan_dependencies/rddl_parser/states.h:22:5: note: because ‘State’ has user-provided ‘State::State(const State&)’
   22 |     State(State const& other) : state(other.state) {}
      |     ^~~~~
cc1plus: all warnings being treated as errors

also see e.g. https://github.com/tsduck/tsduck/issues/205 for the background and a workaround.

gerardcanal commented 3 years ago

Hi @MeFisto94, A ROSPlan port to noetic is currently being developed, but it's not yet supported. This was solved by setting a flag on ROSPlan dependencies: https://github.com/KCL-Planning/ROSPlan/pull/268/files

You can try to pull that branch or modify the CMakeLists.txt locally in the meantime (some people reported this worked for them). I have to update the RDDL parser (which comes from the PROST planner) but I have not had the chance yet (and I am not sure if they have upgraded it to handle GCC9).