← Back to issue list

Colcon build failed with extension ros2-humble-ros-base

View original Github issue

Metadata

Project
snapcraft
Number
#5329
Type
issue
State
open
Author
czarekk215
Labels
Status: Triaged Type: Question
Created
Updated
Closed
—

Current evaluation

ROS 2 humble extension colcon build fails with ModuleNotFoundError: lark when compiling msg/srv packages; maintainer gave a python3-lark build-packages workaround, no author response since Mar 2025

Suggested action: keep open

Reason: Maintainer @artivis explicitly triaged it (labels 'Status: Triaged', 'Type: Question') and diagnosed the failure ('the build fails because it cannot find the Python3 lark package') with a concrete workaround (`build-packages: [python3-lark]`), but the root cause — lark/rosidl_parser not being pulled in by the ros2-humble-ros-base extension build environment — was never confirmed fixed, and an internal ticket CRAFT-4357 was created for it. The reporter did not respond to the request for a public example, so there is no minimal reproducer and no confirmation that the workaround is sufficient, which keeps actionability moderate rather than high. ros2-humble/core22 is a legacy combination (repo history shows the default moved to ros2-jazzy and a newer core26 extension), capping impact.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 10 Complexity: 35 Confidence: 60 Actionability: 45

Issue body

### Bug Description When I, build my ros2 package for the first with using as a ``` yaml extensions: [ros2-humble-ros-base] ``` I have error with building packages with msg and srv files. ``` bash :: ModuleNotFoundError: No module named 'lark' ``` But when I first build snap with basic options using like here https://github.com/snapcraft-docs/ros2-talker-listener-core22/blob/main/snapcraft.yaml, and than I switch to content sharing, so remove `stage-packages` from parts and add switch extensions to `[ros2-humble-ros-base]`. It starts building messages packages ### To Reproduce 1. Build snap for the first time using Content-sharing setup from here: https://snapcraft.io/docs/ros2-applications, but use ros package with msg pack. ### Environment - LXD - Ubuntu 22.04 LTS on ARM chip ### snapcraft.yaml ```yaml name: my-ros2-snap description: | This is a snap for testing ros2 version: '1.0' summary: Test for ros2 confinement: devmode base: core22 parts: ros2-workspace-test: plugin: colcon source: src/ local-files: plugin: dump source: snap/local/ organize: '*.sh': usr/bin/ apps: my-component: command: ros2 run wisevision_action_executor automatic_action_service plugs: [network, network-bind] extensions: [ros2-humble-ros-base] ``` ### Relevant log output ```shell *EXPERIMENTAL* extension 'ros2-humble-ros-base' enabled *EXPERIMENTAL* extension 'ros2-humble-ros-base' enabled Installed package repositories Repulling ros2-workspace-test ('stage-packages' property changed) :: Downloading package: ros-humble-rcpputils/snap/snapcraft/13867/lib/python3.12/site-packages/apt/package.py:810: Warning: W:Download is performed unsandboxed as root as file '/root/.cache/snapcraft/download/ros-humble-rcpputils_2.4.4-1jammy.20241128.002909_arm64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) acq.run() Failed to run the build script for part 'ros2-workspace-test'. :: + colcon build --base-paths /root/parts/ros2-workspace-test/src --build-base /root/parts/ros2-workspace-test/build --merge-install --install-base /root/parts/ros2-workspace-test/install/opt/ros/snap --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PREFIX_PATH=/snap/ros-humble-ros-base-dev/current/usr --parallel-workers 2 :: --- stderr: notification_msgs :: Traceback (most recent call last): :: File "/root/parts/ros2-workspace-test/install/opt/ros/humble/share/rosidl_generator_c/cmake/../../../lib/rosidl_generator_c/rosidl_generator_c", line 8, in <module> :: from rosidl_generator_c import generate_c :: File "/root/parts/ros2-workspace-test/install/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_generator_c/__init__.py", line 15, in <module> :: from rosidl_cmake import convert_camel_case_to_lower_case_underscore :: File "/root/parts/ros2-workspace-test/install/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_cmake/__init__.py", line 24, in <module> :: from rosidl_parser.parser import parse_idl_file :: File "/root/parts/ros2-workspace-test/install/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_parser/parser.py", line 20, in <module> :: from lark import Lark :: ModuleNotFoundError: No module named 'lark' :: gmake[2]: *** [CMakeFiles/notification_msgs__rosidl_generator_c.dir/build.make:87: rosidl_generator_c/notification_msgs/msg/notification.h] Error 1 :: gmake[1]: *** [CMakeFiles/Makefile2:212: CMakeFiles/notification_msgs__rosidl_generator_c.dir/all] Error 2 :: gmake: *** [Makefile:146: all] Error 2 :: --- :: Failed <<< notification_msgs [1.21s, exited with code 2] Check the build output and verify the project can work with the 'colcon' plugin. Failed to execute pack in instance. Recommended resolution: Run the same command again with --debug to shell into the environment if you wish to introspect this failure. Full execution log: '/home/cezary/.local/state/snapcraft/log/snapcraft-20250312-150713.792155.log' ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 10
Complexity: 35
Confidence: 60
Actionability: 45
keep open ROS 2 humble extension colcon build fails with ModuleNotFoundError: lark when compiling msg/srv packages; maintainer gave a python3-lark build-packages workaround, no author response since Mar 2025
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 38
Complexity: 20
Confidence: 75
Actionability: 80
keep open ROS 2 extension build fails with missing 'lark' Python module when building packages with msg/srv files. Maintainer provided workaround but root cause (missing dependency in extension) unresolved.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 28
Staleness: 55
Complexity: 30
Confidence: 65
Support Request: 70
keep open Colcon build fails with ModuleNotFoundError for 'lark' when using ros2-humble-ros-base content-sharing extension to build ROS 2 packages with msg/srv files. Maintainer provided workaround (add python3-lark to build-packages). Triaged, awaiting reporter confirmation.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 80
close stale ROS2 snap build fails with ModuleNotFoundError for lark when using ros2-humble-ros-base extension. Maintainer provided a workaround adding python3-lark to build-packages, but author has not responded in over 18 months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 15
Confidence: 88
Support Request: 85
close stale Colcon build fails with ros2-humble-ros-base extension due to missing Python lark module. Maintainer provided a configuration workaround, but the thread has been inactive for over 15 months.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.