Skip to content

micro_ros_agent package failed #303

Closed

Description

@shic15

Steps to reproduce the issue

After installing ROS2 I followed the "First application Linux" tutorials as it is and the package failure occurred while building micro ros agent.

Expected behavior

The agent should build successfully

Actual behavior

Starting >>> micro_ros_agent
stderr: micro_ros_agent                                     
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `fmt::v6::internal::basic_data<void>::signs'
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `spdlog::logger::log_it_(spdlog::details::log_msg const&, bool, bool)'
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `int fmt::v6::internal::snprintf_float<double>(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > fmt::v6::internal::grouping_impl<char>(fmt::v6::internal::locale_ref)'
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `int fmt::v6::internal::format_float<long double>(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `int fmt::v6::internal::snprintf_float<long double>(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/usr/bin/ld: /home/shic/microros_ws/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.2.0.0: undefined reference to `int fmt::v6::internal::format_float<double>(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/micro_ros_agent.dir/build.make:173: micro_ros_agent] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/micro_ros_agent.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Failed   <<< micro_ros_agent [24.5s, exited with code 2]

Summary: 5 packages finished [5min 28s]
  1 package failed: micro_ros_agent
  2 packages had stderr output: micro_ros_agent microxrcedds_agent

Additional information

I could not find any similar issue, although I tried to pull the eProsima/Micro-XRCE-DDS-Agent repo and building the workspace again using colcon build still the same issue.

I'm relatively new to ROS and do not have much knowledge regarding it, pardon me if I had missed something,
Thanks in advance.

Activity

  1. pablogs9 commented on Apr 5, 2021

    @pablogs9
    Member
  2. pablogs9 commented on Apr 5, 2021

    @pablogs9
    Member

    Which compiler are you using gcc or clang?

  3. shic15 commented on Apr 5, 2021

    @shic15
    Author

    Default ROS2 compiler, gcc.

  4. pablogs9 commented on Apr 5, 2021

    @pablogs9
    Member

    I have followed the tutorial instructions and it builds seamlessly:

    https://asciinema.org/a/cHjRD383IpX5EJxx1H8rsJmFx

  5. shic15 commented on Apr 5, 2021

    @shic15
    Author

    That's weird, even I tried installing micro ros thrice after completely deleting the workspace.

    Could the results be different cause you're using docker? or is the problem somehow related with ROS2 installation?

  6. pablogs9 commented on Apr 5, 2021

    @pablogs9
    Member

    Could you share the files inside log folder for micro xrce dds agent and micro ros agent?

  7. shic15 commented on Apr 5, 2021

    @shic15
    Author

    Sure, I've attached the zip file of the latest build in the log folder.

    uros_log.zip

  8. pablogs9 commented on Apr 6, 2021

    @pablogs9
    Member

    Please, delete the folders build install and log and rebuild the micro-ROS agent and then attach here the log folder.

  9. shic15 commented on Apr 6, 2021

    @shic15
    Author

    I rebuild everything from scratch as I was getting some errors. This is a fresh install and build.
    log.zip

  10. pablogs9 commented on Apr 6, 2021

    @pablogs9
    Member

    I have seen that you have a custom installation of ROS 2 Foxy in /home/shic/ros2_foxy/ros2-linux.

    Does this problem happen with a ROS 2 installation from binaries with apt?

    Do you have installed sudo apt-get install -y libfmt-dev?

  11. shic15 commented on Apr 6, 2021

    @shic15
    Author

    I didn't make any customizations while installing, directly installed ROS2 from here, and don't think I got a similar error there.
    Are the instructions appropriate for learning purposes? There is another page for installation here, should I uninstall and proceed with that?

    The fmt library is already installed.

  12. shic15 commented on Apr 7, 2021

    @shic15
    Author

    I did try reinstalling ros2 but still no help. The same error occurs.

    I have attached the log folder again if that helps to figure out the issue.
    log.zip

  13. pablogs9 commented on Apr 8, 2021

    @pablogs9
    Member

    Well, since this is not a reproducible issue, do you have any inconvenience in using any of the other options:

  14. shic15 commented on Apr 8, 2021

    @shic15
    Author

    Not really, I'm ready to use whatever works. Just that I'm a newbie to this so approached the solution which had simple documentation.

    To use the snap package I need to follow the tutorials till building the firmware

    ros2 run micro_ros_setup build_firmware.sh
    source install/local_setup.bash
    

    , then use snap package commands for creating and building the agent, right?

  15. pablogs9 commented on Apr 8, 2021

    @pablogs9
    Member

    I prefer the docker version, but the snap package should work, just follow the instructions in the snap webpage

  16. shic15 commented on Apr 8, 2021

    @shic15
    Author

    Finally got lucky with the dockerized micro_ros_agent. Also TIL about docker and it is pretty crazy what you can do with it, zero environment setup efforts full plug and play. Thanks for the help.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions