melodic安装Cartographer时编译报错
-
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:289:49: error: ISO C++ forbids declaration of ‘EXCLUSIVE_LOCKS_REQUIRED’ with no type [-fpermissive]
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:289:9: error: ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’ cannot be overloaded
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:281:9: error: with ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:290:71: error: expected ‘;’ at end of member declaration
void SetTrajectoryState(int trajectory_id, TrajectoryState state) override
^~~~~~~~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:34: error: ‘parent_’ has not been declared
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^~~~~~~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:41: error: expected ‘,’ or ‘...’ before ‘->’ token
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:49: error: ISO C++ forbids declaration of ‘EXCLUSIVE_LOCKS_REQUIRED’ with no type [-fpermissive]
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:9: error: ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’ cannot be overloaded
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:281:9: error: with ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’
EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d_test.cc:24:0:
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h: In member function ‘virtual std::__cxx11::string cartographer::common::DummyFileResolver::GetFileContentOrDie(const string&)’:
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h:42:3: error: control reaches end of non-void function [-Werror=return-type]
}
^
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h: In member function ‘virtual std::__cxx11::string cartographer::common::DummyFileResolver::GetFullPathOrDie(const string&)’:
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h:46:3: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.
<== Failed to process package 'cartographer':
Command '['ninja', '-j20', '-l20']' returned non-zero exit status 1Reproduce this error by running:
==> cd /home/fu/cartographer_ws/build_isolated/cartographer && ninja -j20 -l20一直在报这种语法错误,上面是部分报错信息,由于都是这种语法报错所以就截取部分报错信息。求大佬答疑解惑,这到底是什么问题?困扰我好几天了。