In Groovy, rosmake fails the first time it is run on the industrial_msgs package. This doesn't occur in Fuerte. The output of rosmake is shown below. Commenting out:
rosbuild_find_ros_package(actionlib_msgs)
include(${actionlib_msgs_PACKAGE_PATH}/cmake/actionbuild.cmake)
genaction()
in the CMakeLists.txt (also shown below) results in a successful build. The package also successfully builds the second time that rosmake is ran (without commenting out anything in CMakeLists.txt. Has anybody seen this or know of a solution?
CMakeLists.txt
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)
rosbuild_find_ros_package(actionlib_msgs)
include(${actionlib_msgs_PACKAGE_PATH}/cmake/actionbuild.cmake)
genaction()
rosbuild_init()
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
rosbuild_gensrv()
#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosmake output
[ rosmake ] Last 40 linesdustrial_msgs: 25.8 sec ] [ 1 Active 5/7 Complete ]
{-------------------------------------------------------------------------------
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python2.7
-- Action Files:
[rosbuild] Building package industrial_msgs
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
-- Using CATKIN_DEVEL_PREFIX: /home/sedwards/ros/groovy/ros_industrial_trunk/industrial_core/industrial_msgs/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Found gtest: gtests will be built
-- catkin 0.5.63
CMake Error at /opt/ros/groovy/share/ros/core/rosbuild/public.cmake:369 (add_custom_target):
add_custom_target cannot create target "rosbuild_premsgsrvgen" because
another target with the same name already exists. The existing target is a
custom target created in source directory
"/home/sedwards/ros/groovy/ros_industrial_trunk/industrial_core/industrial_msgs".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
CMakeLists.txt:15 (rosbuild_init)
[rosbuild] WARNING: rosbuild_genmsg() was called, but the roslang package cannot be found. Message generation will NOT occur
CMake Error at /opt/ros/groovy/share/ros/core/rosbuild/public.cmake:790 (add_dependencies):
add_dependencies Adding dependency to non-existent target:
rosbuild_precompile
Call Stack (most recent call first):
CMakeLists.txt:23 (rosbuild_genmsg)
[rosbuild] WARNING: rosbuild_gensrv() was called, but the roslang package cannot be found. Service generation will NOT occur
CMake Error at /opt/ros/groovy/share/ros/core/rosbuild/public.cmake:753 (add_dependencies):
add_dependencies Adding dependency to non-existent target:
rosbuild_precompile
Call Stack (most recent call first):
CMakeLists.txt:25 (rosbuild_gensrv)
-- Configuring incomplete, errors occurred!
-------------------------------------------------------------------------------}
Originally posted by sedwards on ROS Answers with karma: 1601 on 2013-02-23
Post score: 0