Repository navigation
build_agent.sh fails while trying to go through tutorial #50
Copy link
Copy link
Closed
Description
Describe the bug
I'm trying to go through the "first application linux" tutorial, but am getting a build error that is preventing the micro_ros_agent from finishing its build.
To Reproduce
- System Description:
-Ubuntu 20 running in a VirtualBox with windows 10 host
-Installed ROS2 Foxy using standard install procedure, confirmed working with pub/sub example - Followed all steps here: https://micro-ros.github.io/docs/tutorials/core/first_application_linux/ (Not using the docer method)
- On running this step: --> $ros2 run micro_ros_setup build_agent.sh
Output:
Building micro-ROS Agent
Starting >>> microcdr
Finished <<< microcdr [0.30s]
Starting >>> microxrcedds_agent
Finished <<< microxrcedds_agent [0.64s]
Starting >>> rosidl_typesupport_microxrcedds_c
Finished <<< rosidl_typesupport_microxrcedds_c [0.38s]
Starting >>> micro_ros_msgs
Finished <<< micro_ros_msgs [1.54s]
Starting >>> micro_ros_agent
--- stderr: micro_ros_agent
/usr/bin/ld: warning: libfastrtps.so.2, needed by /home/andrewgillies/ros2_foxy/ros2-linux/lib/librmw_fastrtps_shared_cpp.so, may conflict with libfastrtps.so.2.0.2
/usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference tofmt::v6::internal::basic_data<void>::signs' /usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference tospdlog::logger::log_it_(spdlog::details::log_msg const&, bool, bool)'
/usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference toint fmt::v6::internal::snprintf_float<double>(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)' /usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator > fmt::v6::internal::grouping_impl(fmt::v6::internal::locale_ref)'
/usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference toint fmt::v6::internal::format_float<long double>(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)' /usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference toint fmt::v6::internal::snprintf_float(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer&)'
/usr/bin/ld: /home/andrewgillies/uagent/install/microxrcedds_agent/lib/libmicroxrcedds_agent.so.1.4.2: undefined reference to `int fmt::v6::internal::format_float(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/micro_ros_agent.dir/build.make:172: 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 [0.65s, exited with code 2]
Summary: 4 packages finished [3.80s]
1 package failed: micro_ros_agent
1 package had stderr output: micro_ros_agent
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jamoralp commentedon Feb 1, 2021
Good morning,
I'm afraid we would need more details about which specific Ubuntu image you mounted using VirtualBox and double check if you missed some of the commands in the tutorial. For me, it is working as expected, running on a Ubuntu 20.04 Focal Docker container.
That being said, this error seems to be related to some
fmtlibrary missing on your system. Did you try:, then recompiling the agent with the steps provided? The only thing in the agent that is using some headers related to this library is the logger, to display information about the agent's status in the screen.
shic15 commentedon Apr 3, 2021
Hey,
Even I'm facing the exact same error. I just saw the issue here(after posting it myself here) and tried the solution you suggested, to download fmt lib. But still, the error persists. It'll be really helpful if you can look into it, and please let me know if you need something else.
reubenstr commentedon Jul 17, 2021
Same error for me on Ubuntu 20.04.2 LTS even after executing the suggested commands to install fmt.
reubenstr commentedon Jul 19, 2021
I am now able to build and execute the agent (not using the docker container).
There are several ROS2 official install tutorials and they appear to install/source ROS2 differently thus breaking the micro-ros-agent build process.
My process:
Install Ubunutu 20.04.
Install ROS2 via Debian packages (I installed the desktop version): https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
Install rosdep2: sudo apt install python3-rosdep2
Install colcon: sudo apt install python3-colcon-common-extensions
Install micro-ros: https://micro.ros.org/docs/tutorials/core/first_application_linux/
I am really excited to get micro-ros working with my project, thanks for the hard work!
irsyadtc commentedon Sep 3, 2021
Machine: Jetson Nano
OS: Ubuntu 18
Running Docker image: dustynv/ros:foxy-ros-base-l4t-r32.6.1
As I'm going through the steps in https://micro.ros.org/docs/tutorials/core/first_application_linux/, until build step of "Creating the micro-ROS agent"
ros2 run micro_ros_setup build_agent.sh, I've a similar error:I tried the suggestion by @jamoralp and it says
libfmt-dev is already the newest version (4.0.0+ds-2). 0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.Can someone help me?
Acuadros95 commentedon Jan 28, 2022
We just added a flag to use the system version of
spdlog: eProsima/Micro-XRCE-DDS-Agent#303 and #118Agent build should succeed with this flag enabled:
colcon build --cmake-args -DUAGENT_USE_SYSTEM_LOGGER=ONcyizhuo commentedon May 25, 2024
I solved this on my horizon rdk x3 arm board, by compile a 6.x version fmt. I'm using
ubuntu 20, and I compiledfmt-6.1.2.I compiled and installed fmt just before
ros2 run micro_ros_setup build_agent.shby the way.