← Back to issue list

ROS2 Jazzy plugins fails with rosdep

View original Github issue

Metadata

Project
snapcraft
Number
#5600
Type
issue
State
closed
Author
rafal-gorecki
Labels
—
Created
Updated
Closed

Current evaluation

ROS2 Jazzy builds failed because rosdep's pkg_resources DeprecationWarning on stderr tripped the ROS plugin's output parsing. Hotfix PR #5609 was retargeted to #5615, merged as 721d86958, and shipped in Snapcraft 8.10.2.

Resolution: closed resolved

Reason: Merged PR #5615 (commit 721d86958) made the ROS plugin separate rosdep stderr from parsed stdout; maintainer @mr-cal confirmed the fix ships in Snapcraft 8.10.2 and the reporter verified the local build works. Root cause of the noise was also addressed upstream in rosdep 0.25.1 (ros-infrastructure/rosdep#984).

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description I have almost identical logs when building any snap on jazzy as in this issue: https://github.com/canonical/snapcraft/issues/4998 ### To Reproduce Build any of the snaps e.g https://github.com/canonical/ros2-teleop-snap ### Environment Ubuntu 24.04 LXD: 5.21.3 LTS ### snapcraft.yaml ```yaml https://github.com/canonical/ros2-teleop-snap/blob/jazzy/snap/snapcraft.yaml ``` ### Relevant log output ```shell :: + env -i LANG=C.UTF-8 LC_ALL=C.UTF-8 PATH=/snap/snapcraft/15082/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SNAP=/snap/snapcraft/15082 SNAP_ARCH=amd64 SNAP_NAME=snapcraft SNAP_VERSION=8.9.4 /snap/snapcraft/15082/bin/python -I /snap/snapcraft/15082/lib/python3.12/site-packages/snapcraft/parts/plugins/_ros.py stage-runtime-dependencies --part-src /root/parts/ros2-teleop/src --part-install /root/parts/ros2-teleop/install --ros-version 2 --ros-distro jazzy --target-arch amd64 --stage-cache-dir /root/.cache/snapcraft --base core24 :: Traceback (most recent call last): :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/snapcraft/parts/plugins/_ros.py", line 424, in <module> :: plugin_cli() :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/click/core.py", line 1161, in __call__ :: return self.main(*args, **kwargs) :: ^^^^^^^^^^^^^^^^^^^^^^^^^^ :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/click/core.py", line 1082, in main :: rv = self.invoke(ctx) :: ^^^^^^^^^^^^^^^^ :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/click/core.py", line 1697, in invoke :: return _process_result(sub_ctx.command.invoke(sub_ctx)) :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/click/core.py", line 1443, in invoke :: return ctx.invoke(self.callback, **ctx.params) :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/click/core.py", line 788, in invoke :: return __callback(*args, **kwargs) :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/snapcraft/parts/plugins/_ros.py", line 388, in stage_runtime_dependencies :: parsed = _parse_rosdep_resolve_dependencies( :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: File "/snap/snapcraft/15082/lib/python3.12/site-packages/snapcraft/parts/plugins/_ros.py", line 79, in _parse_rosdep_resolve_dependencies :: raise RosdepUnexpectedResultError(dependency_name, output) :: RosdepUnexpectedResultError: Received unexpected result from rosdep when trying to resolve Dependency(name='teleop_twist_joy', evaluated_condition=True): :: /usr/bin/rosdep:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html :: from pkg_resources import load_entry_point :: #apt :: ros-jazzy-teleop-twist-joy ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved ROS2 Jazzy builds failed because rosdep's pkg_resources DeprecationWarning on stderr tripped the ROS plugin's output parsing. Hotfix PR #5609 was retargeted to #5615, merged as 721d86958, and shipped in Snapcraft 8.10.2.
stealth/space-bunny-alpha — closed resolved ROS Jazzy build failures were fixed for Snapcraft 8.10.2 via #5609, merged through #5615 (721d86958), separating rosdep stderr warnings from parsed stdout.
qwen/qwen3.6-35b-a3b — — Fixed via merged hotfix PR #5609. Snapcraft now ignores rosdep's pkg_resources deprecation warning, preventing build failures. The change is merged and scheduled for Snapcraft 8.10.2.
qwen/qwen3.6-35b-a3b — — Snapcraft's ROS2 Jazzy plugin failed because rosdep's deprecation warning triggered an abort. A hotfix was merged to gracefully handle the warning, resolving the issue. The fix is included in Snapcraft 8.10.2.
qwen/qwen3.6-35b-a3b — — Fixed via merged hotfix PR #5609. The ROS2 Jazzy plugin failure caused by rosdep deprecation warnings triggering errors was resolved by gracefully handling the output. The patch is included in Snapcraft 8.10.2.
qwen3.6-35b-a3b-mtp-q6 — — rosdep deprecation warnings caused snapcraft to abort ROS2 Jazzy builds. Snapcraft merged hotfix PR #5609 to gracefully handle the upstream warning. The reporter verified the fix, which is scheduled for release in snapcraft 8.10.2.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5615 (confidence 98%)

    Merged PR carrying the fix for #5600 (commit 721d86958), shipped in Snapcraft 8.10.2

  • Related To: canonical/snapcraft#5609 (confidence 95%)

    Original hotfix PR by MirkoFerrati; retargeted to #5615 and then closed

  • Related To: canonical/snapcraft#4998 (confidence 90%)

    Preceding identical Jazzy rosdep failure, fixed upstream by rosdep 0.25.1

  • Caused By: rosdep#1011 (confidence 70%)

    Upstream rosdep ticket reporting the deprecation warning noise on stderr

Related issues

Issue Project State Summary Similarity
#4998 ROS2 Jazzy plugins fails with `rosdep` 0.25 snapcraft closed ROS2 Jazzy plugin compatibility was restored in rosdep 0.25.1 via ros-infrastructure/rosdep#984, eliminating the pkg_resources deprecation output that broke rosdep parsing.
88%
#5615 Ros plugin: handle stderr separated from stdout, fixes #5600 snapcraft merged Merged PR #5615 as commit 721d86958, separating rosdep stderr from parsed stdout and fixing ROS Jazzy dependency resolution in Snapcraft 8.10.2.
77%
#1882288 ROS plugins: allow skip keys for rosdep snapcraft (launchpad) closed Fixed in snapcraft plugins V2 via PR #3536 and #3566. Rosdep resolution was changed to use locally available packages, making a 'skip keys' option unnecessary.
72%