← 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 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.

Suggested action: close stale

Reason: Core20 support was explicitly dropped in commit fa7952b4d ('chore!: drop core20 (#6019)') and snapcraft_legacy was removed in ffb164b7a, eliminating the code path that needed the backport fix. The issue is no longer applicable to the current codebase.

Impact: 25 Quick Win: 13.75 Staleness: 80 Complexity: 45 Confidence: 82 Support Request: 10

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
qwen/qwen3.8-27b
Impact: 25
Quick Win: 13.75
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 40
Complexity: 55
Confidence: 90
Support Request: 10
keep open Fails building core20 snaps on non-snap distros due to broken LXD detection. Triaged and under discussion. Requires backporting craft-providers detection logic to snapcraft_legacy to fix apt and snap installation checks.

Update history

No update history recorded yet.

Related work

  • Caused By: snapcraft#6019 (confidence 90%)

    PR #6019 dropped core20 support, removing the feature this issue targets

  • Related To: snapcraft#4960 (confidence 50%)

    Referenced in a 2025-04-28 comment as a similar issue failing on apt code instead of snap code

Related issues

Issue Project State Summary Similarity
#1866300 snapcraft fails to build core20 snap snapcraft (launchpad) closed Closed without a documented fix. The multipass hang and lxd traceback preventing core20 builds were not addressed, indicating the report was abandoned or superseded by newer snapcraft versions.
80%
#4408 Snapcraft 7 fails with inline deb822 signing blocks snapcraft open Snapcraft 7 core20 LXD builds fail on hosts with modern apt deb822 Signed-By blocks due to a legacy apt package check in snapcraft_legacy. Triaged; root cause identified, but snapcraft_legacy and core20 have since been removed from the codebase.
73%
#1996508 snapcraft try with core22 doesn't support lxd snapcraft (launchpad) closed Closed without resolution. The snapcraft try --use-lxd command fails with core22 bases due to an LXD provider limitation. No fix was implemented, and the report was abandoned after extended inactivity.
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 Reports that snapcraft --target-arch=i386 on a core20 base silently builds an amd64 snap instead of failing early, wasting build time. Unlabelled, 0 comments, inactive ~5 years; a related core20/i386 bug was closed as superseded by improved arch parsing.
72%
#5316 Snapd error `cannot set "core.experimental.snapd-snap"` when repacking a core20 snap snapcraft closed Fixed in Snapcraft 8.12. The failure resulted from snapd 2.68.4 removing the core.experimental.snapd-snap flag. Snapcraft now conditionally applies the flag based on the snapd version, resolving the build error for core20 and core18 environments.
71%
#1979269 core22 build just hangs if lxd has no network connectivity snapcraft (launchpad) open Snapcraft core22 build hangs indefinitely at 'launching instance' when LXD has no network connectivity; reporter asks for better error feedback. Open ~4.2 years with no labels, comments, or maintainer interaction.
70%
#2099923 Snapcraft builds are failing: install of snap "snapcraft" failed snapcraft (launchpad) open Snapcraft builds failing due to outdated snapd (2.61) on build infrastructure unable to install core20 base. Issue is 556 days old with no maintainer response.
70%
#1846195 provide snapcraft docker image for core18 snapcraft (launchpad) open Request for canonical-provided core18-based snapcraft docker images (official ones were xenial-based). 7 years old, no comments or labels; core18 is EOL and the project has moved to core20+, so the request is no longer applicable.
70%