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

Error on rosbuild.cmake ; CMake Error at CMakeLists.txt

asked 2012-06-26 07:53:26 -0600

Astronaut gravatar image

updated 2012-06-26 08:54:41 -0600

Lorenz gravatar image

Hello

After installing ROS Fuerte wanted to install some packages. I installed them through some instalation script. But I got an Error in ros make. I was enable to build any rosbuild-based packages. I receive the following error during "rosmake":

The C compiler identification is GNU 4.4.3
The CXX compiler identification is GNU 4.4.3
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
CMake Error at CMakeLists.txt:2 (include):
  include could not find load file:

    /core/rosbuild/rosbuild.cmake


CMake Error at CMakeLists.txt:12 (rosbuild_init):
  Unknown CMake command "rosbuild_init".

Please can you help me?

This is a part of my installation script

echo "====================================================="
echo "1) Installing ROS (Fuerte)"
echo "====================================================="
echo "====================================================="
echo "Setting up source list"
echo "====================================================="
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list'
echo "====================================================="
echo "Setting up keys"
echo "====================================================="
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
echo "====================================================="
echo "====================================================="
echo "Update repository list for Ubuntu"
echo "====================================================="
sudo apt-get update
echo "====================================================="
echo "====================================================="
echo "Update Ubuntu"
echo "====================================================="
sudo apt-get upgrade
echo "====================================================="
echo "====================================================="
echo "Installing ROS stacks (C Turtle base)"
echo "====================================================="
sudo apt-get install ros-fuerte-desktop-full
echo "====================================================="
echo "====================================================="
echo "Setup bashrc to contain ros-environment"
echo "====================================================="
echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
source ~/.bashrc
echo "====================================================="


# Download all files from UTS POW ROS (Fuerte) repo and some small data files for testing:
svn co  ~/svn/POW/ROS/Fuerte

echo "======================================"
echo "Install Internal ROS packages"
echo "======================================"

cd ~/svn/POW/ROS/Fuerte/utils/amcl_listener
cmake ./
make
cd ~/svn/POW/ROS/Fuerte/utils/pow_analyzer
cmake ./
make

I got the error for the both packages.

edit retag flag offensive close merge delete

Comments

Yes. I execute cmake ./ for some internal and external packages. So first should I comment the cmake and execute only the make?So second how to add my local checkouts to the ROS_PACAKGE_PATH and to set ROS_WORKSPACE.?

Any seguestions please?

Astronaut gravatar image Astronaut  ( 2012-06-26 23:22:39 -0600 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2012-06-26 12:17:57 -0600

Lorenz gravatar image

updated 2012-06-27 00:08:41 -0600

It seems like you are executing cmake . in some ros packages. That's something you should never ever do since for a few reasons:

  1. Calling cmake will overwrite the ROS Makefile with a platform-specific auto-generated Makefile.

  2. With cmake you normally do out-of-source builds, i.e. you do something like mkdir build; cd build; cmake .. This allows for easily removing all generated files by just removing the build directory. The standard ROS makefile does exactly this.

Also, it seems like something is wrong with your ros configuration. I suggest using rosws to manage local checkouts of repositories instead of checking them out manually. I cannot see where you add your local checkouts to the ROS_PACAKGE_PATH and where you set ROS_WORKSPACE. Both is required to build your packages.

Edit: Check out this question for a quick introduction on how to create a ros workspace and add repositories to it. The rosws tutorial is much more detailed though.

edit flag offensive delete link more
0

answered 2012-06-28 01:03:19 -0600

Astronaut gravatar image

I have done the changes as you said, but still not working. I got the following errors when I try to instal the packages through instalation scrpt

Install Internal ROS packages

make: * No targets specified and no makefile found. Stop.

make: * No targets specified and no makefile found. Stop.

2b) Install external ROS packages

===================

Run new bashrc file

======================================

2c) Install External ROS packages

./install_ros_pwh.sh: line 91: cd: /home/bojan/Desktop/PowRos/utils/gps_umd/gps_common: No such file or directory make: * No targets specified and no makefile found. Stop. mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake .. [rosbuild] Building package cereal_port CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/private.cmake:99 (message): [rosbuild] rospack found package "cereal_port" at "", but the current directory is "/home/bojan/Desktop/PowRos/utils/cereal_port". You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order. Call Stack (most recent call first): /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location) CMakeLists.txt:12 (rosbuild_init)

-- Configuring incomplete, errors occurred! make: * [all] Error 1

Please any help¿

this is the instalation script after changing i made

echo "=====================================================" echo "1) Installing ROS (Fuerte)" echo "=====================================================" echo "=====================================================" echo "Setting up source list" echo "=====================================================" sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list' echo "=====================================================" echo "Setting up keys" echo "=====================================================" wget http://packages.ros.org/ros.key -O - | sudo apt-key add - echo "=====================================================" echo "=====================================================" echo "Update repository list for Ubuntu" echo "====================================================="

sudo apt-get update

echo "=====================================================" echo "=====================================================" echo "Update Ubuntu" echo "====================================================="

sudo apt-get upgrade

echo "=====================================================" echo "=====================================================" echo "Installing ROS stacks (C Turtle base)" echo "=====================================================" sudo apt-get install ros-fuerte-desktop-full echo "=====================================================" echo "=====================================================" echo "Setup bashrc to contain ros-environment" echo "=====================================================" echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc source ~/.bashrc echo "====================================================="

echo "=====================================================" echo "2) Checking out and install the UTS POW repository" echo " and all required ROS packages" echo "2a) Checking out and install the UTS POW code and data repository" echo "====================================================="

Download all files from UTS POW ROS (Fuerte) repo and some small data files for testing:

svn co https://develop.eng.uts.edu.au/projects/cas/CAS/svn/prince_wales_hosp/dev/ros/Fuerte ~/Desktop/PowRos

svn ~/Desktop/PowRos

echo "======================================" echo "Install Internal ROS packages" echo "======================================"

cd ~/Desktop/PowRos/utils/amcl_listener

cmake ./

make cd ~/Desktop/PowRos/utils/pow_analyzer

cmake ./

make

Install all External ROS packages required for POW project

echo "===========================================================" echo "2b) Install external ROS packages" echo "==========================================================="

svn co http://isr-uc-ros-pkg.googlecode.com/svn/stacks/lse_imu_drivers/trunk/lse_xsens_mti ~/Desktop/PowRos/utils/lse_xsens_mti

svn co http://isr-uc-ros-pkg.googlecode.com/svn/stacks/serial_communication/trunk/cereal_port ~/Desktop/PowRos/utils/cereal_port

git clone http://ram.umd.edu/git/ros/gps_umd.git ~/Desktop/PowRos/utils/gps_umd

git clone http://robotics.ccny.cuny.edu/git/ccny-ros-pkg/scan_tools.git ~/Desktop/PowRos/utils/scan_tools

Create the new ROS_PACKAGE_PATH

echo "export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/Desktop/PowRos" >> ~/.bashrc

source ~/Desktop/Workspace/setup.bash

echo "===================" echo "Run new bashrc file" echo "===================" source ~/.bashrc

echo "======================================" echo "2c) Install External ROS packages" echo "======================================"

cd ~/Desktop ... (more)

edit flag offensive delete link more
0

answered 2012-06-26 23:22:02 -0600

Astronaut gravatar image

Yes. I execute cmake ./ for some internal and external packages. So first should I comment the cmake and execute only the make?So second how to add my local checkouts to the ROS_PACAKGE_PATH and to set ROS_WORKSPACE.?

Any seguestions please?

edit flag offensive delete link more

Comments

You never call cmake directly for ROS packages. They normally all provide makefiles, so just call make. There is only one case where you have to call cmake by hand and that's when you are building the ROS Fuerte core components by hand.

Lorenz gravatar image Lorenz  ( 2012-06-27 00:10:29 -0600 )edit

I have done the changes as you said, but still not working. I got the following errors when I try to instal the packages through instalation scrpt

Install Internal ROS packages

make: * No targets specified and no makefile found. Stop. make: * No targets sp

Astronaut gravatar image Astronaut  ( 2012-06-28 01:01:25 -0600 )edit

Question Tools

Stats

Asked: 2012-06-26 07:53:26 -0600

Seen: 9,990 times

Last updated: Jun 28 '12