core: fix symlink resolution in get_core_dynamic_linker
Metadata
Current evaluation
Merged canonical/snapcraft#1170 as commit b19e9cf68, fixing relative symlink resolution in get_core_dynamic_linker so classic snap builds work on affected architectures.
Resolution: closed resolved
Reason: PR canonical/snapcraft#1170 was merged as commit b19e9cf68. It resolved relative core dynamic-linker symlink handling and restored classic snap builds on i386 and other affected architectures.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The existing code did not handle relative symlinks correctly, they were
expanded relative to /snap/core/current, not the directory they resided in.
This is why classic snap builds only worked on amd64 and ppc64el on Launchpad.
LP: [#1665165](https://bugs.launchpad.net/snapcraft/+bug/1665165)
No test because I don't see how to add one (afaict, get_core_dynamic_linker is currently untested).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/snapcraft#1170 as commit b19e9cf68, fixing relative symlink resolution in get_core_dynamic_linker so classic snap builds work on affected architectures. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged to snapcraft main as commit b19e9cf68. PR fixed relative symlink expansion in get_core_dynamic_linker (resolved against the symlink's own directory instead of /snap/core/current), so classic snap builds work on non-amd64 Launchpad architectures (LP bug #1665165). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#1170 (b19e9cf68), fixing relative core dynamic-linker symlink resolution so classic snap builds work on affected architectures. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for symlink resolution in get_core_dynamic_linker. Relative symlinks were incorrectly expanded relative to /snap/core/current, breaking classic snap builds on architectures like i386. Approved by reviewers, passed CI, and merged. Verified via integration tests. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for symlink resolution in get_core_dynamic_linker. Relative symlinks incorrectly expanded relative to /snap/core/current, breaking Launchpad classic builds. Verified on i386 and merged after CI fixes and maintainer review. |
Update history
No update history recorded yet.
Related work
-
Caused By:
snapcraft (launchpad)#1665165
(confidence 99%)
Linked Launchpad bug documenting classic snap build failures on non-amd64 architectures; fixed by this PR.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1722521 core dynamic linker detection fails on ppc64el and s390x | snapcraft (launchpad) | closed | Fixed in snapcore/snapcraft PR #1600 (commit 1016c7021, "options: fix core-dynamic-linker on ppc64el/s390x"): dropped stray leading slashes from the core-dynamic-linker paths so os.path.join works, plus added parametrized tests covering all architectures. | |
| #1650946 unhelpful error when building a classic snap: classic confinement requires the core_dynamic_linker to be set | snapcraft (launchpad) | closed | Resolved: the cryptic "classic confinement requires the core_dynamic_linker to be set" error was fixed by snapcore/snapcraft PR #1025 (better diagnostic) and PR #1112 / commit 49b39ef9a, which auto-installs/unpacks the core snap; Launchpad builds snapcraft 2.27+ via LP: #1650946. | |
| #1672495 ld-linux-x86-64.so.2 links to a non-existent file | snapcraft (launchpad) | closed | Merged canonical/snapcraft#1189 (commit 78d1883ca) to resolve the dynamic-linker symlink before checking existence during classic-snap builds, fixing this broken-link handling. | |
| #3087 meta: remove snapd workaround for classic for core20 onwards | snapcraft | merged | Merged canonical/snapcraft#3087 as commit 244b997ca, removing the automatic classic snapcraft-runner workaround for core20 and newer while retaining it for legacy bases. | |
| #1189 core: resolve ld link first. | snapcraft | merged | Merged PR #1189 as commit 78d1883ca, resolving ld symlinks before existence checks in classic-confinement builds and fixing LP #1672495. | |
| #1039 Check the older ubuntu-core snap name for core dynamic linker. | snapcraft | closed | Closed unmerged after maintainers chose migration from deprecated ubuntu-core to core. The proper classic-snaps setup landed in PR #1112 via commit 49b39ef9a. | |
| #1796199 Generically determine the linker | snapcraft (launchpad) | closed | Implemented generic core linker selection by resolving core-snap symlinks; merged via canonical/snapcraft#1170 (commit b19e9cf68). | |
| #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. |