micro-ROS / micro-ROS-Agent

ROS 2 package using Micro XRCE-DDS Agent.
Apache License 2.0
101 stars 58 forks source link

Micro-ros-agent does not seem to compile with fmt v9 #186

Closed PetitPrince6 closed 1 year ago

PetitPrince6 commented 1 year ago

On Ubuntu 22.04 LTS clean install Repo clone in a ros2 workspace. Building through colcon build.

The compilation fails, lots of errors related to fmt and inability to format. It seems that something is not backward compatible with fmt. If I force the fmt version 8, it compiles. Unfortunately, the v8 is no available in apt packages, requiring a specific install just for micro ros agent.

EDIT: Ubuntu 22.04 is still in fmt v8 but it is fmt 8.32 which already fails compiling. v8.1.0 works.

pablogs9 commented 1 year ago

Not able to reproduce on a clean ROS 2 Humble Ubuntu 22.04 docker: https://asciinema.org/a/ScEwg9hddtPFHyc3Pb9FtAL4S

Could you provide more details?

PetitPrince6 commented 1 year ago

Ok, sorry, I found out, I did it on two different machines but I had the installation of a custom library messing with fmt in the installation process including the micro-ros-agent. It was intalling the fmt v9 version with which the micro-ros-agent doesn't compile. So not micro-ros-agent issue. Sorry for that. Maybe enforcing the fmt v8 would be a nice thing to do.

Acuadros95 commented 1 year ago

You can force the Agent to use the installed version of the spdlog and fmt, check this comment: https://github.com/micro-ROS/micro_ros_setup/issues/455#issuecomment-1042635375

PetitPrince6 commented 1 year ago

The option -DUAGENT_USE_SYSTEM_LOGGER=ON didn't work for me, but maybe I was not using it properly, I got lost at a certain point ^^. Anyway, I found two alternative solutions: a) switch to the snap version. b) Compile the agent before installing my custom library. :)

Thank you all for the help