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

String format specifier error when building on arm32 #3002

Closed
m2-farzan opened this issue Jun 6, 2022 · 0 comments
Closed

String format specifier error when building on arm32 #3002

m2-farzan opened this issue Jun 6, 2022 · 0 comments

Comments

@m2-farzan
Copy link
Contributor

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04 on qemu+arm32
  • ROS2 Version:
    • Galactic (built from source)
  • Version or commit hash:
    • galactic
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

Build navigation2 using colcon

Expected behavior

Build successfully

Actual behavior

/root/ros2_galactic_overlay/src/navigation2/nav2_costmap_2d/plugins/inflation_layer.cpp:164:14: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘std::vector<geometry_msgs::msg::Point_<std::allocator<void> > >::size_type’ {aka ‘unsigned int’} [-Werror=format=]
  164 |     logger_, "InflationLayer::onFootprintChanged(): num footprint points: %lu,"
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  165 |     " inscribed_radius_ = %.3f, inflation_radius_ = %.3f",
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  166 |     layered_costmap_->getFootprint().size(), inscribed_radius_, inflation_radius_);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |
      |                                          std::vector<geometry_msgs::msg::Point_<std::allocator<void> > >::size_type {aka unsigned int}
/root/ros2_galactic_overlay/src/navigation2/nav2_costmap_2d/plugins/inflation_layer.cpp:164:77: note: format string is defined here
  164 |     logger_, "InflationLayer::onFootprintChanged(): num footprint points: %lu,"
      |                                                                           ~~^
      |                                                                             |
      |                                                                             long unsigned int
      |                                                                           %u
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/layers.dir/build.make:76: CMakeFiles/layers.dir/plugins/inflation_layer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:281: CMakeFiles/layers.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Additional information

I'll make a PR that fixes this.

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

No branches or pull requests

2 participants