Error when building TEB local planner: "Target 'tf' of type EXECUTABLE may not be linked into another target"
When building the latest version of teb_local_planner in ROS Kinect from source, I get the following error:
CMake Error at teb-local-planner/CMakeLists.txt:197 (target_link_libraries):
Target "tf" of type EXECUTABLE may not be linked into another target. One
may link only to STATIC or SHARED libraries, or to executables with the
ENABLE_EXPORTS property set.
CMake Error at teb-local-planner/CMakeLists.txt:208 (target_link_libraries):
Target "tf" of type EXECUTABLE may not be linked into another target. One
may link only to STATIC or SHARED libraries, or to executables with the
ENABLE_EXPORTS property set.
Cheking the CMakeLists.txt file, lines 197 and 208 correspond to target_link_libraries()
directives; when checking the value of ${catkin_LIBRARIES}
I do see a reference to the tf
executable.
Why is catkin
adding the tf
executable to the libraries variable?
Edit: I'm running ROS Kinetic on Ubuntu Xenial (16.04) and Intel notebook, with cmake 3.5.1 and gcc 5.4.0.
I still don't understand why
catkin
is doing that, but I noticed that compiling withcatkin_make_isolated
instead ofcatkin_make
seems to avoid the issue, whatever its cause.I think it'd help if you could give a little bit more info (as these sort of things tend to be highly platform/os/version of CMake dependent). So: could you add your platform, OS and version of relevant parts of your build chain (ie: gcc)?
Just an observation: Kinetic was specced with CMake
3.0.2
(see REP-3). You're running3.5.1
. That is quite a difference.