ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can't build package with catkin

asked 2013-01-03 13:41:09 -0500

nunojpg gravatar image

I have a repo install of Groovy on Xubuntu 12.04.1.

nuno@ubuntu:~$ source /opt/ros/groovy/setup.bash 
nuno@ubuntu:~$ mkdir -p catkin_ws/src
nuno@ubuntu:~$ cd catkin_ws/
nuno@ubuntu:~/catkin_ws$ catkin_make
Base path: /home/nuno/catkin_ws
Source space: /home/nuno/catkin_ws/src
Build space: /home/nuno/catkin_ws/build
Devel space: /home/nuno/catkin_ws/devel
Install space: /home/nuno/catkin_ws/install
Creating symlink "/home/nuno/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/groovy/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/nuno/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/nuno/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/nuno/catkin_ws/install" in "/home/nuno/catkin_ws/build"
####
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using CATKIN_DEVEL_PREFIX: /home/nuno/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.58
-- BUILD_SHARED_LIBS is on
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nuno/catkin_ws/build
####
#### Running command: "make -j1" in "/home/nuno/catkin_ws/build"
####

The workspace is created ok, but then if I add a package it doens't build.

nuno@ubuntu:~/catkin_ws$ cd src/
    nuno@ubuntu:~/catkin_ws/src$ catkin_create_pkg beginner_tutorials std_msgs rospy roscpp
    Created file beginner_tutorials/CMakeLists.txt
    Created file beginner_tutorials/package.xml
    Created folder beginner_tutorials/include
    Created folder beginner_tutorials/src
    Successfully created files in /home/nuno/catkin_ws/src/beginner_tutorials. Please adjust the values in package.xml.
    nuno@ubuntu:~/catkin_ws/src$ cd ..
    nuno@ubuntu:~/catkin_ws$ catkin_make
    Base path: /home/nuno/catkin_ws
    Source space: /home/nuno/catkin_ws/src
    Build space: /home/nuno/catkin_ws/build
    Devel space: /home/nuno/catkin_ws/devel
    Install space: /home/nuno/catkin_ws/install
    ####
    #### Running command: "make cmake_check_build_system" in "/home/nuno/catkin_ws/build"
    ####
    ####
    #### Running command: "make -j1" in "/home/nuno/catkin_ws/build"
    ####    
    nuno@ubuntu:~/catkin_ws$ source devel/setup.bash 
    nuno@ubuntu:~/catkin_ws$ catkin_make
    Base path: /home/nuno/catkin_ws
    Source space: /home/nuno/catkin_ws/src
    Build space: /home/nuno/catkin_ws/build
    Devel space: /home/nuno/catkin_ws/devel
    Install space: /home/nuno/catkin_ws/install
    ####
    #### Running command: "make cmake_check_build_system" in "/home/nuno/catkin_ws/build"
    ####
    ####
    #### Running command: "make -j1" in "/home/nuno/catkin_ws/build"
    ####
    nuno@ubuntu:~/catkin_ws$

I run into this while trying to compile some tutorial packages, but I thinks this empty package is enough to demonstrate the issue.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-01-03 22:16:37 -0500

KruseT gravatar image

You are right, this is a bug. catkin_make does not trigger a re-build when new packages are added to src.

Created report at: https://github.com/ros/catkin/issues/290

In the meantime, you can go into the build folder and run

$ cmake .
edit flag offensive delete link more
1

answered 2013-01-03 15:44:07 -0500

130s gravatar image

The output you posted seems ok to me - you have nothing to build in your package. If none of source/msg/srv files don't get built in tutorials like following, that's a problem.

Just listing a couple of tutorials that introduce how to build your files:

Creating msg / srv

Writing a Simple Publisher and Subscriber (C++)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-03 13:41:09 -0500

Seen: 3,067 times

Last updated: Jan 03 '13