← Back to issue list

Snapcraft 7.1.0 fails to find stage package when cross-compiling

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1983009
Type
issue
State
closed
Author
~koen-vervloesem
Labels
craft-1216
Created
Updated
Closed

Current evaluation

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

Closed. Snapcraft 7.1.0 fails to find stage packages like bluez when cross-compiling from amd64 to arm64/armhf, breaking builds. Issue closed without a provided resolution or fix.

Suggested action:

No scores available.

Issue body

I tried the architectures support to cross-compile a snap for arm64 and armhf. So I added the following lines to my snapcraft.yaml: ```yaml architectures: - build-on: amd64 build-for: amd64 - build-on: [amd64, arm64] build-for: arm64 - build-on: [amd64, armhf] build-for: armhf ``` After running `snapcraft` on my amd64 machine, the amd64 snap is built correctly, but the arm64 and armhf builds fail with the error **Stage package not found in part 'theengs-gateway': bluez.** Previously (with Snapcraft 7.0) I built the arm64 snap on a jammy LXC container on an arm64 machine, and the armhf snap on an a jammy LXC container on an armhf machine, and this just worked: the stage package bluez was found and the resulting snaps installed and ran fine locally. Building the arm64 snap on arm64 with Snapcraft 7.1 also works. So it seems something is going wrong with stage packages when cross-compiling. Here's the project: https://github.com/theengs/gateway-snap Here's the pull request where I try to use the architectures support: https://github.com/theengs/gateway-snap/pull/7 Relevant part of the logs: ``` 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:42.596 Requested stage-packages: ['bluez'] 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.491 Marking bluez (and its dependencies) to be fetched 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.492 Stage package not found in part 'theengs-gateway': bluez. 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 Traceback (most recent call last): 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/part_handler.py", line 846, in _fetch_stage_packages 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 fetched_packages = packages.Repository.fetch_stage_packages( 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/packages/deb.py", line 261, in wrapped 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 return method(*args, **kwargs) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/packages/deb.py", line 588, in fetch_stage_packages 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 apt_cache.mark_packages(set(package_names)) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/packages/apt_cache.py", line 302, in mark_packages 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 raise errors.PackageNotFound(name_arch) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 craft_parts.packages.errors.PackageNotFound: Package not found: bluez. 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 During handling of the above exception, another exception occurred: 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 Traceback (most recent call last): 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/parts/parts.py", line 170, in run 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 aex.execute(action, stdout=stream, stderr=stream) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/executor.py", line 301, in execute 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 self._executor.execute(actions, stdout=stdout, stderr=stderr) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/executor.py", line 126, in execute 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 self._run_action(act, stdout=stdout, stderr=stderr) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/executor.py", line 189, in _run_action 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 handler.run_action(action, stdout=stdout, stderr=stderr) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/part_handler.py", line 161, in run_action 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 state = handler(step_info, stdout=stdout, stderr=stderr) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.496 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/part_handler.py", line 182, in _run_pull 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.497 fetched_packages = self._fetch_stage_packages(step_info=step_info) 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.497 File "/snap/snapcraft/x1/lib/python3.8/site-packages/craft_parts/executor/part_handler.py", line 854, in _fetch_stage_packages 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.497 raise errors.StagePackageNotFound( 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.497 craft_parts.errors.StagePackageNotFound: Stage package not found in part 'theengs-gateway': bluez. 2022-07-27 20:05:43.822 :: 2022-07-27 20:05:43.497 Full execution log: '/tmp/snapcraft.log' 2022-07-27 20:05:45.095 Failed to execute pack in instance. 2022-07-27 20:05:45.099 Traceback (most recent call last): 2022-07-27 20:05:45.099 File "/snap/snapcraft/7986/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 452, in _run_in_provider 2022-07-27 20:05:45.099 instance.execute_run(cmd, check=True, cwd=output_dir) 2022-07-27 20:05:45.099 File "/snap/snapcraft/7986/lib/python3.8/site-packages/craft_providers/lxd/lxd_instance.py", line 221, in execute_run 2022-07-27 20:05:45.099 return self.lxc.exec( 2022-07-27 20:05:45.099 File "/snap/snapcraft/7986/lib/python3.8/site-packages/craft_providers/lxd/lxc.py", line 326, in exec 2022-07-27 20:05:45.099 return runner(final_cmd, **kwargs) # pylint: disable=subprocess-run-check 2022-07-27 20:05:45.099 File "/snap/snapcraft/7986/usr/lib/python3.8/subprocess.py", line 516, in run 2022-07-27 20:05:45.099 raise CalledProcessError(retcode, process.args, 2022-07-27 20:05:45.099 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-theengs-gateway-on-amd64-for-arm64-519419', '--cwd', '/root/project', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'SNAPCRAFT_MANAGED_MODE=1', 'SNAPCRAFT_BUILD_INFO=1', 'SNAPCRAFT_IMAGE_INFO={"build_url":"https://github.com/theengs/gateway-snap/actions/runs/2749306160"}', 'snapcraft', 'pack', '--enable-manifest', '--build-for', 'arm64']' returned non-zero exit status 1. ``` I have attached the full logs.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed. Snapcraft 7.1.0 fails to find stage packages like bluez when cross-compiling from amd64 to arm64/armhf, breaking builds. Issue closed without a provided resolution or fix.
qwen/qwen3.6-35b-a3b Closed without resolution. Snapcraft 7.1.0 failed to locate the bluez stage package during amd64 to arm64/armhf cross-compilation. The report was abandoned due to inactivity.
qwen3.6-35b-a3b-mtp-q6 Closed without comments or explicit resolution. Snapcraft 7.1.0 failed to locate the bluez stage package during amd64 to arm64/armhf cross-compilation, breaking builds that worked in version 7.0.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.