Skip to content

fix compile with local octomap#267

Open
mosfet80 wants to merge 1 commit intomoveit:ros2from
mosfet80:fixCompile
Open

fix compile with local octomap#267
mosfet80 wants to merge 1 commit intomoveit:ros2from
mosfet80:fixCompile

Conversation

@mosfet80
Copy link
Contributor

@mosfet80 mosfet80 commented Jan 15, 2026

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 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 '

CMakeLists.txt Outdated
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})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OCTOMAP_INCLUDE_DIRS should be declared as SYSTEM includes. Do they need to be PUBLIC?

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 `'
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.04%. Comparing base (cd7a5b7) to head (990c180).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants