Skip to content

fix compile with local octomap#267

Open
mosfet80 wants to merge 1 commit into
moveit:ros2from
mosfet80:fixCompile
Open

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

Conversation

@mosfet80
Copy link
Copy Markdown
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 '

Comment thread CMakeLists.txt
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
Copy Markdown
Contributor

@rhaschke rhaschke Jan 22, 2026

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?
Better add them in line 109.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You didn't comment on that yet or changed the config.

@mosfet80 mosfet80 force-pushed the fixCompile branch 2 times, most recently from d17a8f6 to 990c180 Compare January 27, 2026 14:36
@codecov
Copy link
Copy Markdown

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 (6066b45).

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
Copy Markdown
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.

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 `'
Comment thread CMakeLists.txt
# 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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do you restrict the version even further?

Comment thread CMakeLists.txt
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You didn't comment on that yet or changed the config.

@nbbrooks
Copy link
Copy Markdown
Contributor

@mosfet80 could you try to repro the issue you identified here now that #269 is merged?

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.

3 participants