Ask Your Question
5

catkin metapackage now requires CMakeLists.txt?

asked 2013-03-31 16:53:38 -0500

bit-pirate gravatar image

updated 2014-01-28 17:15:59 -0500

ngrennan gravatar image

I updated my ROS installation today and now catkin_make is spitting warnings for my metapackages:

-- ~~ - ycs_msgs (metapackage) WARNING: The metapackage 'ycs_msgs' has no CMakeLists.txt. Please add one to the package source. You can use the following file: /opt/yujin/ycs/catkin_ws/build/catkin_generated/metapackages/ycs_msgs/CMakeLists.txt

The two things I wonder about now are:

  • The warning tells me to add a CMakeLists.txt to my metapackages, while the instructions on the catkin wiki page tells me different:

Metapackages do not require a CMakeLists.txt file. If one is provided, it is ignored by catkin.

  • The proposed CMakeLists.txt contains the new macro call catkin_metapackage(). Is there any information about this functionality out there?
edit retag flag offensive close merge delete

Comments

I had an old CmakeLists.txt (created by catkin_create_pkg) in one metapackage which caused the build to break, since they are not ignored anymore. Those old lists make catkin think these metapackages are non-catkin packages. Might be worth to send out a warning on ros-users.

bit-pirate gravatar imagebit-pirate ( 2013-03-31 17:08:32 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
5

answered 2013-03-31 18:36:40 -0500

jbohren gravatar image

updated 2013-03-31 18:38:12 -0500

This was discussed on the ros-buildsystem sig as well as in the ROS platform group meetings, and subsequently added to REP-127 as shown in the history here on github on March 7th.

I'm really surprised this change was released into groovy. I thought it wasn't going to take effect until Hydro.

From REP-127 as it reads today:

The empty tag is used to indicate that a package is a metapackage which implies that it does only have a fixed minimal CMakeLists.txt which will only install the package.xml file. This information is necessary for the ROS wiki to show the relationship between these metapackages and other packages and as a backward compatibility with rosbuild. Non-metapackages must not depend on metapackages but instead on the packages they depend on.

The CMakeLists.txt file for a metapackage is supposed to look like:

cmake_minimum_required(VERSION 2.8.3)
project(PACKAGE_NAME)
find_package(catkin REQUIRED)
catkin_metapackage()

From the buildsystem sig mailing list (@tkruse):

So the currently favoured solution will be to allow CMakeLists.txt with metapackages. In order to encourage users to not fill their metapackages with anything else than just the installation of the package manifest itself, catkin will scan the CmakeLists.txt and warn if users put in more than the minimally required lines. This may still change if someone has a better idea, or other blockers appear.

edit flag offensive delete link more

Comments

+1 to making these changes only in Hydro, not in Groovy. Where do I open a defect issue for that?

joq gravatar imagejoq ( 2013-04-01 02:03:41 -0500 )edit

Haha, everywhere? Probably worth emailing the buildsystem sig, adding an issue on the catkin github project, a pull request on the rep project, and sending a singing telegram to Dirk's home...

jbohren gravatar imagejbohren ( 2013-04-01 02:39:56 -0500 )edit
2

answered 2013-04-01 08:48:46 -0500

William gravatar image

updated 2013-04-01 12:09:48 -0500

The precipitation of this change was well covered by @jbohren

We are currently in the process of rolling out this change, unfortunately catkin hitting the public repositories was the first thing that had to happen, and it happened on a weekend.

I have just updated the wiki:

http://ros.org/wiki/catkin/package.xml#Metapackages

I am going to release bloom 0.3.3 (which also has changes related to this), republish the REP pages, regenerate the catkin documentation, and then send an email about the change.

As for why this is in groovy? It is not an API breaking change, it does nothing more than warn you if you are building a non compliant metapackage locally. The only case where it breaks is if you have a random CMakeLists.txt wandering around in the root of your metapackages, which is not correct anyways. On the flip side, releasing it into groovy prevents us from having yet further special case handling in tools like catkin_pkg and bloom.

As for documentation of catkin_metapackage, it is self documented:

https://github.com/ros/catkin/blob/groovy-devel/cmake/catkin_metapackage.cmake#L1

And those docs will be in the generated documentation for catkin, which will also be regenerated today as we roll this out.

UPDATE:

  • catkin's RST docs have been updated and will be regenerated tonight (this happens nightly)
  • bloom 0.3.3 has been released
  • hosted REP pages have been updated
  • email has been sent
edit flag offensive delete link more

Comments

Where did this email go to? IMO significant changes to the core parts of ROS should be announced visibly, that is ros-users, and prior to their release. Then people will know what work is linked to the next update.

bit-pirate gravatar imagebit-pirate ( 2013-04-01 13:43:13 -0500 )edit

Looks like I commented too early. Just received your email on ros-users. Thanks!

bit-pirate gravatar imagebit-pirate ( 2013-04-01 14:00:28 -0500 )edit

ros-users, I got a bounce (new email) which went to my spam folder, it should go out soon.

William gravatar imageWilliam ( 2013-04-01 14:00:53 -0500 )edit

We'll try to do better next time about features before releasing, I cannot speak for the rest of the team, but I think this didn't show up as a significant change as it shouldn't have impacted users other than the warning. In Hydro, for instance, it is required and produces an error.

William gravatar imageWilliam ( 2013-04-01 14:03:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-03-31 16:53:38 -0500

Seen: 2,050 times

Last updated: Apr 01 '13