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

Missing dependency on ament_cmake_flake8? #198

Closed
130s opened this issue Jul 14, 2023 · 1 comment · Fixed by #199
Closed

Missing dependency on ament_cmake_flake8? #198

130s opened this issue Jul 14, 2023 · 1 comment · Fixed by #199
Assignees

Comments

@130s
Copy link
Contributor

130s commented Jul 14, 2023

Issue report

Required Info:

  • Operating System: humble
  • Installation type: Bin
  • Version or commit hash:
    # ros2 pkg xml rosidl_generator_py                                                  
    <package format="3">
      <name>rosidl_generator_py</name>
      <version>0.18.0</version>
    

Steps to reproduce issue

Buildfarm output https://build.ros2.org/job/Rpr__smach__ubuntu_jammy_amd64/2/console for ros/executive_smach#112 where a dependency on ament_cmake_flake8 is removed in a downstream package (smach_msgs) so that none of the packages in the repo in the PR depends on nor call ament_cmake_flake8 any more.

(I haven't figured out exactly what command was called when the reported error occured. My guess is either some sort of `rosidl` command was called, or `colcon build`
:
17:32:59 -- Found PythonExtra: .so  
17:32:59 CMake Error at /opt/ros/rolling/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:335 (find_package):
17:32:59   By not providing "Findament_cmake_flake8.cmake" in CMAKE_MODULE_PATH this
17:32:59   project has asked CMake to find a package configuration file provided by
17:32:59   "ament_cmake_flake8", but CMake did not find one.
17:32:59 
17:32:59   Could not find a package configuration file provided by
17:32:59   "ament_cmake_flake8" with any of the following names:
17:32:59 
17:32:59     ament_cmake_flake8Config.cmake
17:32:59     ament_cmake_flake8-config.cmake
17:32:59 
17:32:59   Add the installation prefix of "ament_cmake_flake8" to CMAKE_PREFIX_PATH or
17:32:59   set "ament_cmake_flake8_DIR" to a directory containing one of the above
17:32:59   files.  If "ament_cmake_flake8" provides a separate development package or

Expected behavior

In a downstream interface package, no error during cmake regarding ament_cmake_flake8Config.cmake / ament_cmake_flake8-config.cmake should be seen while building rosidl package, even when the downstream interface package does NOT explicitly depend on ament_cmake_flake8.

Actual behavior

The error posted in "Steps to reproduce issue" section occurs.

130s added a commit to 130s/rosidl_python that referenced this issue Jul 14, 2023
@130s
Copy link
Contributor Author

130s commented Jul 14, 2023

In ver 0.19.0, ament_cmake_flake8 IS find_package-ed when ADD_LINTER_TESTS is enabled, which is true in the case of ros/executive_smach#112 so failure occurring in that pkg makes sense.

https://github.com/ros2/rosidl_python/blob/0.19.0/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake#L335

130s added a commit to 130s/rosidl_python that referenced this issue Jul 14, 2023
ros2#198)

Signed-off-by: Isaac Saito <130s@2000.jukuin.keio.ac.jp>
130s added a commit to 130s/rosidl_python that referenced this issue Jul 14, 2023
ros2#198)

Signed-off-by: Isaac Saito <130s@2000.jukuin.keio.ac.jp>
@clalancette clalancette self-assigned this Jul 27, 2023
clalancette added a commit that referenced this issue Aug 4, 2023
#198) (#199)

* Fix: Missing dependency that causes cmake error in downstream (resolves #198)

Signed-off-by: Isaac Saito <130s@2000.jukuin.keio.ac.jp>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants