ethz-asl / rotors_simulator

RotorS is a UAV gazebo simulator
1.24k stars 759 forks source link

catkin build error: catkin_package() absolute include dir #355

Open Michael9792 opened 7 years ago

Michael9792 commented 7 years ago

The process of catkin build won't succeed. The error says:

CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:291 (message):
  catkin_package() absolute include dir
  '/home/michaelxu/catkin_ethz_asl/devel/rotors_gazebo_plugins/include/' does
  not exist
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  CMakeLists.txt:181 (catkin_package)
-- Configuring incomplete, errors occurred!

Failed to build package 'rotors_gazebo_plugins' because the following command:

# Command to reproduce:
cd /home/michaelxu/catkin_ethz_asl/build/rotors_gazebo_plugins && /home/michaelxu/catkin_ethz_asl/build/rotors_gazebo_plugins/build_env.sh /usr/bin/cmake /home/michaelxu/catkin_ethz_asl/src/rotors_simulator/rotors_gazebo_plugins -DCATKIN_DEVEL_PREFIX=/home/michaelxu/catkin_ethz_asl/devel/rotors_gazebo_plugins -DCMAKE_INSTALL_PREFIX=/home/michaelxu/catkin_ethz_asl/install; cd -

# Path to log:
cat /home/michaelxu/catkin_ethz_asl/build/build_logs/rotors_gazebo_plugins.log

Exited with return code: 1 

I use Ubuntu 14.04 and ROS Indigo. My ros-indigo-catkin version is 0.6.18. My protobuf-compiler version is 2.5.0.

However, after I deleted ${CATKIN_DEVEL_PREFIX}/include/${PACKAGE_NAME} here, the process of catkin build succeeded.

So is there any problem with this line? Thanks for all the developers!

ffurrer commented 7 years ago

@Michael9792 Is this resolved?

Michael9792 commented 7 years ago

@ffurrer Yes, catkin build succeeded after I had deleted ${CATKIN_DEVEL_PREFIX}/include/${PACKAGE_NAME} here.

So my point is that whether we should delete ${CATKIN_DEVEL_PREFIX}/include/${PACKAGE_NAME}. In other word, is this a bug?

hitimo commented 7 years ago

Have you tried

cd  /home/michaelxu/catkin_ethz_asl/
catkin init
catkin config --merge-devel # Necessary for catkin_tools >= 0.4.
catkin config --extend /opt/ros/indigo
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

before compiling?

Michael9792 commented 7 years ago

Wow! It works! Great thanks @hitimo! My python_catkin_tools version is 0.4.4, so I need to add catkin config --merge-devel. Could you please tell me why this line is necessary for catkin_tools version>=0.4? I only know the meaning of catkin config --merge-devel from here. Anything will be very helpful!

jgoppert commented 7 years ago

I can confirm this fixes the build issue, but since merge-devel isn't default, can we fix this so that it is less cumbersome to build?

amrii1 commented 7 years ago

i use ubuntu 16.04 and ros kinetic, i had the same problem, but now i'm getting this error when trying to build the gazebo_plugins s thanks :)