1. OpenSourceRoboticsFoundation
  2. Simulation
  3. gazebo
  4. Issues
Issue #277 closed

Linker errors when linking ros libraries because of missing link_directores

Lorenz Mösenlechner
created an issue

When compiling gazebo (current tip as of Dec. 5) I ran into a bunch of linker errors because the build could not find the urdfdom and console_bridge libraries. The problem seems to be that with my cmake version (, targets get added before /opt/ros/groovy/lib is added with link_directories. Adding ${urdfdom_LIBRARY_DIRS} and friends in gazebo, plugins and tests before processing all subdirectories solves the issue. Patch attached.

Comments (7)

  1. Lorenz Mösenlechner reporter

    I'm not sure. I don't think the evaluation order of subdirectories is defined in CMake anywhere so I don't think it's a bug in CMake. My guess what happens on your system is that the subdirectory gazebo/sdf/interface is expanded first while it is expanded later on my system. I think cmake is just not deterministic there. Btw. I get the same issue with CMake 2.8.7, too. I've seen it on at least three different computers.

  2. Lorenz Mösenlechner reporter

    John, is maybe urdfdom and console_bridge not installed on your system? In that case you wouldn't run into the error since libgazebo_sdf_interface would not link against them. I have ros groovy installed which provides the two libraries.

  3. Log in to comment