A recent update breaks compilation.

asked 2021-11-01 08:15:47 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi,

I've recently done a sudo apt-get update && upgrade on my machine and it seems that the update broke the compilation of my project. In particular, any package dependent on ros gazebo packages no longer finds the ignition-math library. The full error message is:

CMake Error at CMakeLists.txt:48 (add_library): Target "XXX" links to target "ignition-math6::requested" but the
target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

As far as I could tell, the offending update was something related to a recent gazebo and gazebo pkgs update. I run a ubuntu 20.04 focal fossa machine with ros2 foxy and gazebo11; I installed the ros-foxy-gazebo-ros-pkgs via apt. Funnily enough, if I link other packages to ignition-math6 directly, this compiles and links fine. However, all the plugins that use the gazebo_ros as dependency fail with the above error. Has anyone had a similar experience or knows how to set the ignition-math path to compile correctly?

edit retag flag offensive close merge delete