Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std-msgs: the recipe does not generate the message header files #50

Closed
bulwahn opened this issue Mar 25, 2013 · 8 comments · Fixed by #57
Closed

std-msgs: the recipe does not generate the message header files #50

bulwahn opened this issue Mar 25, 2013 · 8 comments · Fixed by #57

Comments

@bulwahn
Copy link
Contributor

bulwahn commented Mar 25, 2013

The CMakeLists file (https://github.com/ros/std_msgs/blob/0.5.7/CMakeLists.txt) contains the line:

generate_messages()

This should produce the message header files in the devel directory.

But, the generated Makefile from the cmake/catkin call does not contain the annotations to call gencpp and generate the header files, that I actually expected.

The generate_messages() or add_message_files(...) in the CMakeLists.txt seems to be ignored.

This needs further investigation.

This issue then leads to the failure in roscpp, e.g. missing String.h file.

@bulwahn
Copy link
Contributor Author

bulwahn commented Mar 25, 2013

In https://github.com/ros/ros_comm/blob/groovy-devel/clients/roscpp/CMakeLists.txt,
the line

add_dependencies(roscpp roscpp_gencpp rosgraph_msgs_gencpp std_msgs_gencpp)

should cause the std_msgs cpp headers to be generated.

@bulwahn
Copy link
Contributor Author

bulwahn commented Mar 27, 2013

The target std_msgs_gencpp is not available in roscpp (and its also not directly available in std_msgs).
To me it is still unclear where this target is defined.

@herbrechtsmeier
Copy link
Contributor

Can you find the targets in a native ros build? Maybe something with the add_custom_target generation in genmsg don't work.

@herbrechtsmeier
Copy link
Contributor

The problem is the missing /usr/etc/ros/genmsg/* in the sysroot. Without this the "find message generators in all workspaces" in genmsg-extras.cmake.em fails and reports no available message generators.

@bulwahn
Copy link
Contributor Author

bulwahn commented Mar 27, 2013

@herbrechtsmeier: So we must just add the files /usr/etc/ros/genmsg/* in the gencpp and genlisp recipe to the sysroot. Is that right?

@herbrechtsmeier
Copy link
Contributor

@bulwahn We have to add the path to the native sysroot and therefore have to manual call sysroot_stage_dir for this path as the path is not a default path and thereby not capture by the default sysroot_stage_dirs function.

You have to add the following lines to the catkin.bbclass:

SYSROOT_PREPROCESS_FUNCS += "catkin_sysroot_preprocess"

catkin_sysroot_preprocess () {
    sysroot_stage_dir ${D}${prefix}/etc ${SYSROOT_DESTDIR}${prefix}/etc
}

@bulwahn
Copy link
Contributor Author

bulwahn commented Mar 28, 2013

@herbrechtsmeier: Okay, I see. Your suggestion solves this issue. Please commit that with a reference to this issue.
NB: "#" in the commit message automatically adds a reference in github to the issue you want to refer to.

@herbrechtsmeier
Copy link
Contributor

@bulwahn I will commit a patch when I am back in my office at the end of next week.

herbrechtsmeier added a commit to herbrechtsmeier/meta-ros that referenced this issue Apr 4, 2013
The CMake generate_messages function from the genmsg package
detects the installed message generators via files in the
/usr/etc/ros/genmsg directory. Stage the /usr/etc directory
manually as it is not a common path.

Fixed ros#50

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants