fix compile with local octomap#267
Conversation
| target_include_directories(${PROJECT_NAME} | ||
| PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include/${PROJECT_NAME}>) | ||
| $<INSTALL_INTERFACE:include/${PROJECT_NAME}> ${OCTOMAP_INCLUDE_DIRS}) |
There was a problem hiding this comment.
OCTOMAP_INCLUDE_DIRS should be declared as SYSTEM includes. Do they need to be PUBLIC?
Better add them in line 109.
There was a problem hiding this comment.
You didn't comment on that yet or changed the config.
d17a8f6 to
990c180
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ros2 #267 +/- ##
=======================================
Coverage 69.04% 69.04%
=======================================
Files 21 21
Lines 3368 3368
Branches 325 325
=======================================
Hits 2325 2325
Misses 932 932
Partials 111 111 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rhaschke
left a comment
There was a problem hiding this comment.
Why did you remove the includes? They are still needed, aren't they?
Does octomap provide targets as well? If so, it would be much better to use those.
fix /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::~Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::addValue(float const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::~Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::OcTreeNode()' /usr/bin/ld/usr/bin/ld: : /usr/local/lib64/libfcl.so.0.7/usr/local/lib64/libfcl.so.0.7: undefined reference to `: undefined reference to `octomap::Pointcloud::Pointcloud()octomap::Pointcloud::Pointcloud()' ' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::~OcTreeNode()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::addValue(float const&)' /usr/bin/ld/usr/bin/ld: : /usr/local/lib64/libfcl.so.0.7/usr/local/lib64/libfcl.so.0.7: undefined reference to `: undefined reference to `octomap::Pointcloud::~Pointcloud()octomap::Pointcloud::~Pointcloud()' ' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::transform(octomath::Pose6D)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::OcTreeNode()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::~Pose6D()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::~Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::addValue(float const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::OcTreeNode::addValue(float const&)' /usr/bin/ld/usr/bin/ld: : /usr/local/lib64/libfcl.so.0.7/usr/local/lib64/libfcl.so.0.7: undefined reference to `: undefined reference to `octomap::OcTreeNode::~OcTreeNode()octomap::OcTree::OcTree(double)' ' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomath::Pose6D::inv() const' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to `octomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7/usr/bin/ld/usr/bin/ld: : undefined reference to `: /usr/local/lib64/libfcl.so.0.7octomap::Pointcloud::transform(octomath::Pose6D)/usr/local/lib64/libfcl.so.0.7: undefined reference to `'
| # Enforce the system package version on Ubuntu jammy and noble which is also used by libfcl-dev | ||
| # The version is fixed to prevent ABI conflicts with ros-octomap | ||
| find_package(octomap 1.9.7...<1.10.0 REQUIRED) | ||
| find_package(octomap 1.9.10 REQUIRED) |
There was a problem hiding this comment.
Why do you restrict the version even further?
| target_include_directories(${PROJECT_NAME} | ||
| PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include/${PROJECT_NAME}>) | ||
| $<INSTALL_INTERFACE:include/${PROJECT_NAME}> ${OCTOMAP_INCLUDE_DIRS}) |
There was a problem hiding this comment.
You didn't comment on that yet or changed the config.
fix compile on linux fedora with local fcl and octomap
/usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to
octomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::Pointcloud::~Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::addValue(float const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::Pointcloud::~Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::OcTreeNode()' /usr/bin/ld/usr/bin/ld: : /usr/local/lib64/libfcl.so.0.7/usr/local/lib64/libfcl.so.0.7: undefined reference to: undefined reference tooctomap::Pointcloud::Pointcloud()octomap::Pointcloud::Pointcloud()' ' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::~OcTreeNode()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::addValue(float const&)' /usr/bin/ld/usr/bin/ld: : /usr/local/lib64/libfcl.so.0.7/usr/local/lib64/libfcl.so.0.7: undefined reference to: undefined reference tooctomap::Pointcloud::~Pointcloud()octomap::Pointcloud::~Pointcloud()' '/usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference to
octomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::Pointcloud::transform(octomath::Pose6D)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::OcTreeNode()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::~Pose6D()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::Pointcloud::~Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::addValue(float const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::OcTreeNode::addValue(float const&)' /usr/bin/ld/usr/bin/ld: : /usr/local/lib64/libfcl.so.0.7/usr/local/lib64/libfcl.so.0.7: undefined reference to: undefined reference tooctomap::OcTreeNode::~OcTreeNode()octomap::OcTree::OcTree(double)' ' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::Pose6D(octomath::Pose6D const&)' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomath::Pose6D::inv() const' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7: undefined reference tooctomap::Pointcloud::Pointcloud()' /usr/bin/ld: /usr/local/lib64/libfcl.so.0.7/usr/bin/ld/usr/bin/ld: : undefined reference to: /usr/local/lib64/libfcl.so.0.7octomap::Pointcloud::transform(octomath::Pose6D)/usr/local/lib64/libfcl.so.0.7: undefined reference to'