Trying to build master of ROS2 on my ubuntu box as of this morning and I’m getting a following failure. Any idea what might be wrong and how to fix it?
+++ Building ‘rosidl_generator_py’
==> ‘. /home/breh/ros2_wsx/build/rosidl_generator_py/cmake__build.sh && /usr/bin/make cmake_check_build_system’ in ‘/home/breh/ros2_wsx/build/rosidl_generator_py’
==> ‘. /home/breh/ros2_wsx/build/rosidl_generator_py/cmake__build.sh && /usr/bin/make -j2 -l2’ in ‘/home/breh/ros2_wsx/build/rosidl_generator_py’
[ 2%] Generating Python code for ROS interfaces
[ 18%] Built target rosidl_generator_py__rosidl_generator_c
[ 20%] Built target rosidl_generator_py__cpp
[ 36%] Built target rosidl_generator_py__rosidl_typesupport_introspection_c
[ 52%] Built target rosidl_generator_py__rosidl_typesupport_introspection_cpp
[ 68%] Built target rosidl_generator_py__rosidl_typesupport_c
[ 68%] Built target rosidl_generator_py
[ 68%] Built target rosidl_generator_py__py
Scanning dependencies of target rosidl_generator_py__rosidl_typesupport_c__pyext
make[2]: *** No rule to make target ‘rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_c.c’, needed by ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_c__pyext.dir/rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_c.c.o’. Stop.
CMakeFiles/Makefile2:1134: recipe for target ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_c__pyext.dir/all’ failed
make[1]: *** [CMakeFiles/rosidl_generator_py__rosidl_typesupport_c__pyext.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
Scanning dependencies of target rosidl_generator_py__rosidl_typesupport_introspection_c__pyext
make[2]: *** No rule to make target ‘rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_introspection_c.c’, needed by ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_introspection_c__pyext.dir/rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_introspection_c.c.o’. Stop.
CMakeFiles/Makefile2:71: recipe for target ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_introspection_c__pyext.dir/all’ failed
make[1]: *** [CMakeFiles/rosidl_generator_py__rosidl_typesupport_introspection_c__pyext.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Hi,
I can’t reproduce your bug on my debian testing. How do you keep your workspace up to date? Switched to the master branches on all repositories and calling vcs pull src on a regular base? This can lead to problems if a repository was renamed or moved.
I’m attaching my repos list to this post.
Did you already try deleting the build an install folder and rebuilding ros2 afterwards?
I tried a fresh build in a container yesterday evening and could not reproduce this issue.
Just to clarify, did you try to remove your build folder before recompiling ?
Do you have the exact same error after your fresh checkout ?
If you run vcs status --hide in your source directory, do you have any outstanding changes on this packages or its dependencies?
Hmm, really weird. It was a complete fresh checkout. Created a new directory, new src, imported the repositories and ran ament. When I do the same thing with beta1 (different workspace, but clean checkout as well), everything compiles fine. However master fails with the error above.
I’m using cmake version 3.5.1
python: Python 2.7.12
python3: Python 3.5.2
My repos.list is just taken with vcs export src > ros2.txt from a working setup. Perhaps recheck the dependencies. I might be that the depedencies have changed since you did your original setup.
Just to make sure: you did the following steps:
delete your old workspace,
create new one either with my repos.list or the one from the wiki,
build the workspace with the commands from the wiki?
Did you get any different error with my repos.list ?
Sorry I know you are repeating yourself, if installing all the dependencies don’t fix it, could you provide the list of commands you ran with the exact arguments rather than a description, that would make it easier to reproduce
Thanks for helping :). After going back and forth and trying all sorts of stuff, the problem turned out to be the shell I used - it was setup to ros2-beta1 workspace, i.e. it had AMENT_PREFIX_PATH, LD_LIBRARY_PATH and all sorts of other variables pointing to the previously built beta1 workspace.
The way to fix it was very simple - just opened a fresh shell without any ROS2 setup and the build from there works just fine.
Thanks again for all your assistance, I’m back in the game
Out of my own intellectual curiosity, I’d love to hear your approach to building and developing within containers. (In a new thread, or feel free to message me directly.)