generate_messages fails with ros_comm
While installing with source, I've started seeing this error after synching ros_comm
src to the latest commit (not sure if the error starts happening since this particular commit or earlier).
So far I only see this error while building either/both rqt_common_plugins or/and rqt_robot_plugins metapkgs, particularly with the packages rqt_image_view
, raqt_rviz
where neither of them use the target
mentioned in the error message.
The error doesn't happen when I switch ros_comm
to binary (1.9.46-0quantal-20130625-1625-+0000
).
catkin 0.5.67, Ubuntu 12.10
$ catkin_make
:
-- +++ processing catkin package: 'roscpp'
-- ==> add_subdirectory(ros_comm/clients/roscpp)
-- Boost version: 1.49.0
-- Found the following Boost libraries:
-- signals
-- filesystem
-- system
-- roscpp: 1 messages, 3 services
CMake Error at /home/rosuser/catkin_ws/build/ros_comm/clients/roscpp/cmake/roscpp-genmsg.cmake:53 (add_custom_target):
add_custom_target cannot create target "roscpp_generate_messages_cpp"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/rosuser/catkin_ws/src/rqt_common_plugins/rqt_image_view".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/groovy/share/genmsg/cmake/genmsg-extras.cmake:280 (include)
ros_comm/clients/roscpp/CMakeLists.txt:35 (generate_messages)
CMake Error at /home/rosuser/catkin_ws/build/ros_comm/clients/roscpp/cmake/roscpp-genmsg.cmake:100 (add_custom_target):
add_custom_target cannot create target "roscpp_generate_messages_lisp"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/rosuser/catkin_ws/src/rqt_common_plugins/rqt_image_view".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/groovy/share/genmsg/cmake/genmsg-extras.cmake:280 (include)
ros_comm/clients/roscpp/CMakeLists.txt:35 (generate_messages)
CMake Error at /home/rosuser/catkin_ws/build/ros_comm/clients/roscpp/cmake/roscpp-genmsg.cmake:147 (add_custom_target):
add_custom_target cannot create target "roscpp_generate_messages_py"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/rosuser/catkin_ws/src/rqt_common_plugins/rqt_image_view".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/groovy/share/genmsg/cmake/genmsg-extras.cmake:280 (include)
ros_comm/clients/roscpp/CMakeLists.txt:35 (generate_messages)
```
What can be wrong? Thank you!
Update-1) I see a similar error with different combination, which I've found a workaround for but don't understand yet.
-- +++ processing catkin package: 'tf'
-- ==> add_subdirectory(geometry/tf)
-- Boost version: 1.46.1
-- Found the following Boost libraries:
-- thread
-- signals
-- tf: 1 messages, 1 services
CMake Error at /home/noodlelover/catkinws/build/geometry/tf/cmake/tf-genmsg.cmake:41 (add_custom_target):
add_custom_target cannot create target "tf_generate_messages_cpp" because
another target with the same name already exists. The existing target is a
custom target created in source directory
"/home/noodlelover/catkinws/src/rqt_robot_plugins/rqt_rviz".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:280 (include)
geometry/tf/CMakeLists.txt:20 (generate_messages)
:
-- Found PythonLibs: /usr/lib/libpython2.7.so
-- +++ processing catkin package: 'tf_conversions'
-- ==> add_subdirectory(geometry/tf_conversions)
-- Eigen found (include: /usr/include/eigen3)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed
Workaround for ...
Your examples and descriptions of what you have in your workspace are incomplete and do not contain enough information to reproduce the issue. Please state which repos you have in your workspace, which versions and the executed commands including their full output.