← Back to issue list

Missing linker base while building with core22 base

View original Launchpad issue

Metadata

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

Current evaluation

Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded.

Resolution: closed not a bug

Reason: The reporter confirmed on 2022-05-31 that switching to Snapcraft 7.x fixed the failure. The report concerned the legacy implementation, while the supported 7.x codebase handled core22 correctly.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hi, While converting make-system-user (https://github.com/canonical/make-system-user) snap to work with Ubuntu 22.04, I changed the base keyword in snapcraft.yaml file from core20 to core22. After a build, I end-up with the following error message; `The format for the linker should be of the of the form <root>/ld-<X>.<Y>.so. 'ld-linux-x86-64.so.2' does not match that format. Ensure you are targeting an appropriate base` Here you can find the full logs and repro scenario; https://pastebin.ubuntu.com/p/YWB825yRhD/ It seems like either core22 version needs to be added => https://github.com/snapcore/snapcraft/blob/main/snapcraft_legacy/project/_project_options.py#L127 or according to the following code-block; https://github.com/snapcore/snapcraft/blob/ab81ed9ad90a89e2a4d5a5e61c6adc20889d94da/snapcraft_legacy/project/_project_options.py#L317 the snapcraft looks for the mentioned library dynamically inside the core22 path and it also exists as can be seen here; ``` root@jammy:/# find . -name "*ld-linux.so.2*" ./snap/core22/165/usr/lib/i386-linux-gnu/ld-linux.so.2 ./snap/core22/165/usr/lib/ld-linux.so.2 ``` Could you please let me know about what is happening? The problem is reproducible with a clean container as well as a clean Ubuntu 22.04 installation. Thanks

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded.
qwen/qwen3.8-27b — closed resolved Linker format error when building with core22 base in snapcraft legacy code. User confirmed switching to snapcraft 7.x (new codebase) resolves the issue; legacy _LINKER_VERSION_FOR_BASE map lacked core22 entry.
stealth/space-bunny-alpha — closed not a bug Resolved by switching from the affected Snapcraft release to Snapcraft 7.x; the reporter confirmed that this fixed core22 linker detection.
stealth/space-bunny-alpha — closed stale Closed after two days of inactivity without a documented fix; no PR or commit corrected core22 handling in the legacy linker lookup.
qwen/qwen3.6-35b-a3b — — Closed without resolution due to inactivity. The core22 linker format error remains unfixed and is likely abandoned or superseded by newer snapcraft versions.
qwen/qwen3.6-35b-a3b — — Abandoned. The core22 linker path mismatch error during snap builds remains unfixed. No patches or workarounds were provided.
qwen/qwen3.6-35b-a3b — — Abandoned and closed without resolution. No fix or merge was implemented to resolve the core22 linker base format error.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. Likely abandoned or superseded by snapcraft v7+, which replaced the legacy project options and updated base handling.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#4186 snap: migrate to core22 snapcraft merged PR #4186 merged, moving the Snapcraft snap's own build environment to base core22 (8 files, +71/-70), landing as commit 60033305b and closing the core22 migration issue #4166.
78%
#1984227 Snapcraft 7.1.1 does not build with core22 on riscv64 snapcraft (launchpad) closed Fixed in Snapcraft 7.1.2, which added the missing riscv64 support needed to build core22 snaps.
77%
#4246 Reported error message building base: core18 with newer snapcrafts is wrong snapcraft closed Closed without implementation after a maintainer confirmed the unsupported-base error also affected core17 and suggested clearer wording; no resolving PR or commit was linked.
76%
#4118 init: use core22 base for `snapcraft init` snapcraft merged Merged PR #4118 (mr-cal, CRAFT-1670): snapcraft init now scaffolds core22 as the default base instead of core20, with the command moved from snapcraft_legacy/ to snapcraft/ and a spread test added. Squash-merged as 4afc9e4c9.
76%
#1857019 cannot build snapd snap with build-base: core w/o base: core snapcraft (launchpad) closed Resolved in Snapcraft 3.10 by skipping ELF dependency checks when no runtime base is set, allowing snapd to use build-base: core.
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.
75%
#4166 Migrate Snapcraft to core22 snapcraft closed Snapcraft's own snap was migrated to base core22 by merged PR #4186 (commit 60033305b, 8 files, +71/-70), closing this tracking issue.
75%
#4850 fix: allow coreXX-desktop bases snapcraft merged Merged PR #4850 in commit 61efc790d, adding support for core22-desktop and core24-desktop bases and fixing the Snapcraft 8.x build regression.
74%
#3579 snap: move base to core20 (CRAFT-509) snapcraft merged Merged PR #3579 via ed2baf8bd, moving Snapcraft's own snap to the core20 base; implementation commit 18a974e01.
74%
#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.
74%