Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbol lookup error on ROS2 jazzy #170

Closed
Tacha-S opened this issue Sep 12, 2024 · 8 comments
Closed

symbol lookup error on ROS2 jazzy #170

Tacha-S opened this issue Sep 12, 2024 · 8 comments
Assignees
Labels

Comments

@Tacha-S
Copy link

Tacha-S commented Sep 12, 2024

When I run a package installed with apt, the following error occurs.

[calibrate-1] /opt/ros/jazzy/lib/robot_calibration/calibrate: symbol lookup error: /opt/ros/jazzy/lib/librobot_calibration_feature_finders.so: undefined symbol: _ZN3tf212getTimestampIN13geometry_msgs3msg13PointStamped_ISaIvEEEEENSt6chrono10time_pointINS6_3_V212system_clockENS6_8durationIlSt5ratioILl1ELl1000000000EEEEEERKT_
@mikeferguson
Copy link
Owner

mikeferguson commented Sep 12, 2024

Interesting - I haven't run into this. Which feature finders are you using?

std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > tf2::getTimestamp<geometry_msgs::msg::PointStamped_<std::allocator<void> > >(geometry_msgs::msg::PointStamped_<std::allocator<void> > const&)

@Tacha-S
Copy link
Author

Tacha-S commented Sep 13, 2024

I am using robot_calibration::PlaneFinder and robot_calibration::ScanFinder. When I installed them via apt, I encountered a symbol lookup error, but the error did not occur when I built them from source. There might be an issue with the apt package's binary.

@mikeferguson
Copy link
Owner

Ok, so returning to looking at this:

  • getTimestamp() is inlined (and templated)
  • internally it calls tf2_ros::fromMsg - which is also inlined and templated
  • nm/ldd don't seem to show any issues with calibrate, librobot_calibration, or librobot_calibration_feature_finders on my AMD64 install of most recent jazzy binaries.

Are you on some different platform? Something other than AMD64 on Ubuntu 24.04?

@Tacha-S
Copy link
Author

Tacha-S commented Sep 27, 2024

I'm executing on AMD64 with Ubuntu 24.04, just like you.

@mikeferguson
Copy link
Owner

I put a new release out for Jazzy+Rolling yesterday which includes the fixes I need to be able to run calibration on my robot - as soon as those get built I'll try out the debs and try to figure out what is going on

@mikeferguson mikeferguson self-assigned this Nov 7, 2024
@mikeferguson
Copy link
Owner

Have reproduced this locally:

  • Jazzy deb is missing the symbol
  • Totally up-to-date 24.04 source build has the symbol
  • Iron deb is also missing the symbol
  • Humble deb is also missing the symbol

Building with -DCMAKE_BUILD_TYPE=None (as debs are), still generates the symbols...

But building with -DCMAKE_BUILD_TYPE=RelWithDebInfo gets the missing symbols (and harks back to a similar issue I had here: mikeferguson/graceful_controller#52)

This missing (inline) function is being used in tf2_buffer_->transform(), so we can go find where that was included (include/feature_finder.hpp) and move the geometry_msgs import ahead of that - and voila, our RelWithDebInfo build no longer has the undefined symbol (in fact, symbol is entirely gone - which is what i would expect since it is inline).

@mikeferguson
Copy link
Owner

mikeferguson commented Nov 8, 2024

Iron/Jazzy/Rolling fix should be: #182 (and a new release)

Humble backport: #183

@mikeferguson
Copy link
Owner

I just grabbed the latest Debian build of 0.9.2 for Iron from the ros2-testing - the missing symbol issue is resolved. This problem will go away fully once the next sync happens for Humble, Iron, Jazzy and Rolling distributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants