← Back to issue list

SNAPCRAFT_ARCH_TRIPLET not usable with core22 base

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1973376
Type
issue
State
closed
Author
~sdeziel
Labels
—
Created
Updated
Closed

Current evaluation

Closed without a code fix: core22 requires CRAFT_ARCH_TRIPLET instead of SNAPCRAFT_ARCH_TRIPLET; the reporter confirmed Snapcraft 7.0.2 builds successfully with the replacement.

Resolution: closed not a bug

Reason: The environment-variable rename was part of the core20-to-core22 migration, so SNAPCRAFT_ARCH_TRIPLET was no longer supported for core22. In the 2022-06-08 closing update, the reporter confirmed that replacing it with CRAFT_ARCH_TRIPLET worked in Snapcraft 7.0.2.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Building a snap using core22 as base fails when using $SNAPCRAFT_ARCH_TRIPLET (https://github.com/simondeziel/microceph/commit/bb1493b9506301106e7ea8aa969b048d55ee6d88): $ snapcraft Launching instance... Installed package repositories ... Executed parts lifecycle Generated snap metadata Cannot pack snap file: Command '['snap', 'pack', '--compression', 'xz', PosixPath('/root/prime')]' returned non-zero exit status 1. (error: cannot pack "/root/prime": cannot validate snap "microceph": layout "/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ceph" uses invalid mount point: reference to unknown variable "$SNAPCRAFT_ARCH_TRIPLET") The same works when switching to the older core20 base as done in https://github.com/simondeziel/microceph/commit/816142c4491443724bdf6aa239f2a47c3cf7a1ff

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Closed without a code fix: core22 requires CRAFT_ARCH_TRIPLET instead of SNAPCRAFT_ARCH_TRIPLET; the reporter confirmed Snapcraft 7.0.2 builds successfully with the replacement.
stealth/space-bunny-alpha — closed not a bug Closed without a recorded code fix; core22 builds worked in Snapcraft 7.0.2 after replacing SNAPCRAFT_ARCH_TRIPLET with CRAFT_ARCH_TRIPLET, as confirmed by the reporter.
stealth/space-bunny-alpha — closed stale Closed with no comments, explanation, or recorded fix. Related core22 architecture-triplet variable handling was later addressed in #4486 and Snapcraft 8.
qwen/qwen3.6-35b-a3b — — SNAPCRAFT_ARCH_TRIPLET layout failures with core22 were reported but the ticket closed without comments or resolution, indicating it was abandoned. No fix was provided.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report details a core22 build failure where snapcraft rejects SNAPCRAFT_ARCH_TRIPLET in layout mount points during packing. Core20 remains compatible.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The issue reports $SNAPCRAFT_ARCH_TRIPLET causing snap pack failures with the core22 base. No fix was implemented or discussed, indicating the report was abandoned or superseded by base version changes.
qwen3.6-35b-a3b-mtp-q6 — — The $SNAPCRAFT_ARCH_TRIPLET variable fails during snap packing with the core22 base. The report was closed without resolution, fix, or comments, indicating it was abandoned.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#4486 $CRAFT_ARCH_TRIPLET_BUILD_FOR doesn't work on core22 snapcraft closed Fixed in Snapcraft 8: core22 app environment blocks now expand CRAFT_ARCH_TRIPLET_BUILD_FOR and CRAFT_ARCH_TRIPLET.
82%
#4677 snapcraft 7.x fails to replace new variables snapcraft closed Closed as unsupported/works-as-designed: CRAFT_ARCH_TRIPLET_BUILD_FOR needs craft-parts 1.24.0 but Snapcraft 7.5.x pins 1.19.7. Maintainers (tigarmo, mr-cal) said no backport is planned; use CRAFT_ARCH_TRIPLET instead. The variable works from Snapcraft 8.
77%
#1997752 base core20: wrong arch triplet snapcraft (launchpad) closed Wrong SNAPCRAFT_ARCH_TRIPLET for core20 build-on/run-on builds fixed by adding SNAPCRAFT_ARCH_BUILD_ON/BUILD_FOR and *_TRIPLET_BUILD_FOR envvars (PR #4313, commit 93a9d8170); follow-up #4332 (48bd0632f) errors on unevaluable multi-arch cases.
76%
#1674828 SNAPCRAFT_SETUP_CORE=1 doesn't work for foreign architectures snapcraft (launchpad) closed Closed as obsolete when core-based classic builds moved to base snaps; no foreign-architecture code fix was identified.
74%
#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.
71%
#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.
70%
#1976221 Missing linker base while building with core22 base snapcraft (launchpad) closed Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded.
70%