← Back to issue list

Can't build Core20 snaps on non-snap distros

View original Github issue

Metadata

Project
snapcraft
Number
#4960
Type
issue
State
open
Author
dstathis
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

Core20 LXD builds reject distro-installed LXD on NixOS/Arch; a maintainer specified a backport, while core20 support now requires Snapcraft 8.

Suggested action: keep open

Reason: The report provides exact versions, a command, and an error, and the maintainer pinpointed both the legacy LXD check and the craft-providers logic to backport. Commits fa7952b4d and ffb164b7a removed core20 and snapcraft_legacy from main, but the current release notes explicitly retain Snapcraft 8 for core20 builds, so the affected workflow is not demonstrably obsolete. No resolving commit was found; further action is needed in the Snapcraft 8 codebase.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 24 Complexity: 42 Confidence: 91 Actionability: 88

Issue body

### Bug Description When running on nixos, I get the following error from snapcraft despite lxd being installed: ``` [nix-shell:~/repos/grafana-agent-snap]$ snapcraft_legacy --use-lxd You need 'LXD' set-up to build snaps: snap support is required to continue: https://docs.snapcraft.io/installing-snapd/6735. ``` ### To Reproduce Pack a core20 charm using the `--use-lxd` flag on nixos. ### Environment snapcraft 8.2.5 lxd 5.21.1 LTS ### snapcraft.yaml ```shell name: grafana-agent version: '0.40.4' summary: A telemetry collector for sending metrics, logs, and trace data license: Apache-2.0 contact: simon.aronsson@canonical.com issues: https://github.com/canonical/grafana-agent-snap/issues source-code: https://github.com/canonical/grafana-agent-snap website: https://grafana.com description: "Grafana Agent is a telemetry collector for sending metrics, \nlogs, and trace data to the opinionated Grafana observability stack.\n" base: core20 grade: stable confinement: classic compression: lzo apps: grafana-agent: daemon: simple command: "${SNAP}/agent -config.expand-env -config.file /etc/grafana-agent.yaml" install-mode: disable restart-condition: on-failure architectures: - build-on: amd64 - build-on: arm64 parts: wrapper: plugin: dump source: ./snap/local source-type: local override-build: | cp agent-wrapper $SNAPSNAPSNAPCRAFT_PART_INSTALL/ grafana-agent: plugin: go source: https://github.com/grafana/agent source-type: git source-tag: "v0.40.4" build-snaps: - go build-packages: - build-essential - libsystemd-dev stage-packages: - libsystemd0 override-build: | export USE_CONTAINER=0 export GOFLAGS="-mod=readonly -tags=promtail_journal_enabled" make agent agentctl cp build/grafana-agent $SNAPSNAPSNAPCRAFT_PART_INSTALL/agent cp build/grafana-agentctl $SNAPSNAPSNAPCRAFT_PART_INSTALL/agentctl ``` ### Relevant log output ```shell - ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 24
Complexity: 42
Confidence: 91
Actionability: 88
keep open Core20 LXD builds reject distro-installed LXD on NixOS/Arch; a maintainer specified a backport, while core20 support now requires Snapcraft 8.
qwen/qwen3.6-35b-a3b
Impact: 10
Quick Win: 3
Complexity: 10
Confidence: 90
Actionability: 30
close resolved Core20 snap builds fail on non-snap distros (NixOS) due to LXD snap detection. The issue proposed backporting craft-providers logic to snapcraft_legacy, but core20 support and snapcraft_legacy have since been removed from the project.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 14
Staleness: 80
Complexity: 45
Confidence: 82
Support Request: 10
close stale Core20 snap builds fail on non-snap distros (NixOS) due to LXD snap detection. Triaged with a proposed backport fix, but core20 support and snapcraft_legacy have since been removed from the project, making the issue no longer applicable.
qwen/qwen3.6-35b-a3b
Staleness: 25
Complexity: 50
Confidence: 85
Support Request: 5
keep open Bug preventing core20 snap builds on non-snap distros due to LXD detection failures. Currently triaged with a maintainer-proposed backport solution and internal ticket tracking.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 60
Confidence: 90
Support Request: 10
keep open Bug reporting failure to build core20 snaps on non-snap distros like NixOS due to LXD snap dependency. Triaged, acknowledged by maintainer, linked to internal ticket, and discussed with a proposed backport solution.

Update history

No update history recorded yet.

Related work

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

    PR #6019 removed core20 support from current Snapcraft, while the release notes still direct core20 builds to Snapcraft 8.

Related issues

Issue Project State Summary Similarity
#1866300 snapcraft fails to build core20 snap snapcraft (launchpad) closed Closed without a documented fix after core20 Multipass/LXD failures; core20 build-base support was unavailable and the workaround was destructive mode.
81%
#2012074 snapcraft cannot build snap by default on aarch64 snapcraft (launchpad) open ARM64 default builds failed on Snapcraft 7.3.1 because core20 selected amd64-only Multipass images; later defaults use core22/LXD on Linux, addressing the reported path.
75%
#1862256 snapcraft should complain loudly when building base: core20 snap on i386 snapcraft (launchpad) closed Closed as superseded: improved architecture parsing rejects unsupported core20/i386 builds, making a dedicated check unnecessary; snapcraft#4392 improved this handling.
73%
#1982420 libdevmapper-dev fails to install as build-package using snapcraft:core20 (Multipass) snapcraft (launchpad) open core20 Multipass builds can retain libdevmapper1.02.1 from focal-backports, breaking libdevmapper-dev installation. Acknowledged and externally tracked; LXD and explicit backports workarounds exist.
73%
#2009520 core18/20: inconsistent architecture parsing snapcraft (launchpad) closed Superseded by snapcore/snapcraft#4340 and #4341. Core22+ overlapping build-on handling merged in #3821 (4876b53); core20 support was declined.
73%
#2099923 Snapcraft builds are failing: install of snap "snapcraft" failed snapcraft (launchpad) open Reported Launchpad Bionic non-i386 builds cannot install Snapcraft 7.x/stable because core20 needs snapd 2.61; the issue remains open, untriaged, and unanswered.
73%
#1943603 snapcraft --target-arch=i386 does not build i386 images, because core20 does not support i386 and yet the build starts and wastes time snapcraft (launchpad) open Legacy Snapcraft accepted an unsupported core20/i386 target, wasted build time, and produced an amd64 snap; current validation excludes i386 and drops core20.
72%
#1996508 snapcraft try with core22 doesn't support lxd snapcraft (launchpad) closed Core22 support for snapcraft try --use-lxd was added by merged PR snapcore/snapcraft#3981 (commit 2691262b8) and released on edge.
72%
#5003 Building snap with `core20` failed with non-informative error message snapcraft open The misleading core20 snapcraft-pack error was fixed by merged PR #5616 (commit b511004af), which ran the lifecycle for legacy core20 snaps.
71%
#4408 Snapcraft 7 fails with inline deb822 signing blocks snapcraft open Snapcraft 7's core20 LXD fallback failed on valid inline deb822 Signed-By keys; the affected legacy/core20 code has since been removed.
70%